Fix Deform and Fix NVE Ensemble

Dear Dr. Axel Kohlmeyer and LAMMPS Users,

Hello. I was curious if I could ask a question regarding fix nve and fix deform.

I have the following lines of code in my LAMMPS input script which inflates the simulation box that contains a fixed number of atoms. Each atoms interact with LJ potential.

fix 1 all langevin 1.0 1.0 2.0 542305
fix 2 all press/berendsen iso 0.0 0.0 10.0
fix 3 all nve

fix 4 all deform 1 x erate 0.0001 y erate 0.0001 z erate 0.0001 remap v

When I run this simulation, I see a simulation box inflating even though the deformation is subjected to NVE constraints (Constant number of particles, fixed volume and fixed enthalpy)

If NVE ensemble requires fixed volume and the volume of my simulation box is inflating, I was curious if I could ask why the script does not give me any error.

Thank you.

Sincerely,

Masato Koizumi

NVE itself doesn’t change system volume. You are asking to change volume using ‘fix deform’. That’s why volume is changed.

Sanjib

even worse is, that you are doing fix press/berendsen and fix deform
_AT THE SAME TIME_.
this is _VERY_ bad.

also, fix nve does not "enforce" and NVE ensemble. it is just plain
time integration without anything else, thus it will result in an NVE
ensembly if there is _NOTHING ELSE_ modifying the system _AND_ your
system is fully periodic. with fix deform, fix press/berendsen and fix
langevin, you have three fixes that modify the system. so you are in
no specific known ensemble at all.

axel.

Dear Dr. Axel Kohlmeyer and Mr. Sanjib Chandra,

Thank you so much for your advice.

fix press/berendsen was “unfixed” prior to the introduction of fix deform. Essentially, I have only fix deform and fix langevin modifying the system.

Rereading the manual and if I understood you correctly, fix nve only performs time integration of the Langevin equation (in my case) such that the Hamiltonian (total energy) of the system remains constant by definition of nve ensemble.

Therefore, even if the volume is changing, as long as there is a governing equation that can be time integrated and keeping the total energy constant, fix nve can work for any dynamic system.

If this is the case, how will the fix nve deal with the case where new atoms are being created in the simulation box (using create_atoms command) during the middle of a MD run which will change the Hamiltonian of the system?

Once again, thank you for all of your advice.

Sincerely,

Masato Koizumi