LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Imposing target volume/pressure
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Imposing target volume/pressure

From: Axel Kohlmeyer <akohlmey@...24...>
Date: Fri, 16 Jun 2017 14:57:39 -0400

On Fri, Jun 16, 2017 at 10:42 AM, Jonathan Severin <jseverin@...33....5349...> wrote:
Hi all,

At the end of an NPT relaxation, before switching to NVE (and fixing the volume), I'd like to make sure that I fix the volume corresponding to the pressure I was aiming for during the NPT. In other words I'd like to avoid starting my NVE production with a volume that corresponds to the maximum or minimum of the pressure curve, which fluctuates a lot in MD (for small systems at least).

​what i would recommend is the following:
- equilibrate with npT​ and record a suitably chosen sliding window average of the x, y, and z dimensions (or volume) of the box
- use change_box to adjust to a suitable averaged volume at the end of the run and switch to nVT while recording the (sliding window) averaged pressure.
- if you meet the target pressure (note, that small changes in volume have large changes in pressure due to the low compressibility of condensed phase media), switch to nVE, otherwise manually adjust the volume slightly and repeat until you are happy
- continue with nVE *without* rescaling of velocities. while your final instantaneous temperature may not be your desired target, it is *consistent* with the average and the instantaneous potential energy. if you change the kinetic energy, you'll undo part of your equilibration. consider your system like a kid on a swing (i.e. a harmonic oscillator): at the turning points, the kinetic energy (i.e. temperature) is zero (but potential energy maximal) and in the middle position kinetic energy is maximal (but potential energy minimal). if you rescale, you would slow down, when in the center, or add a kick when at the turning point and thus change the equilibrium state.

The same concern may arrise when thermostatting and I think some people impose the temperature at the end of the thermalization with:

velocity all scale ${target_temperature}

these people ​may have a misconception of what equilibration means. to me this does not make sense, considering the reasoning and protocol from above.

Similarly, is there a command that I could call at the end of an NPT run and that would change the volume to the one corresponding to the target pressure?

​see above.




Jonathan Severin

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...92......
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.