Dear LAMMPS developers,
We are studying a system made of a few particles into a framework that is kept frozen in our simulation. We are aware that LAMMPS is imposing the conservation of the total linear momentum[1], assuming the system under study does not have any external force applied. This is performed using the variable “extra_dof” that, by default, is equal to the dimension of the system, and the degree of freedom is 3N-3.
extra_dof = domain->dimension
dof = domain->dimension * natoms_temp
dof -= extra_dof + fix_dof
For very few particles under an external field, the “extra_dof” is changing the dynamics that we want to study, leading to lower kinetic energy. We have tried “compute_modify extra/dof 0” and “compute modify extra/dof 0 dynamic/dof yes” from the manual[2]. Those modifications help in retrieving the correct value for the degree of freedom (3N) but we still get the same lower kinetic energy and a lower temperature than what we expect from canonical distribution. Results with/without “compute_modify extra/dof” are attached below, and a brief input file is also attached.
We are wondering if the command “compute_modify extra/dof” should be applied differently, or some other commands can help us to get the correct canonical distribution for our case. We will be happy to give more details on our tests if it is needed. We would be happy to modify the source code if this is the only way to get what we need.
We really appreciate your help and the time.
Best greetings,
Henglu
[1] https://lammps.sandia.gov/doc/fix_nh.html
[2] https://lammps.sandia.gov/doc/compute_modify.html#compute-modify-command
Canonical distribution using “lammps-stable_3Mar2020”
Canonical distribution
temperature 298.00 K
kinetic energy 3.72 kJ/mol
LAMMPS SETTINGS
compute allTemp all temp
compute CH4Temp CH4 temp
compute framTemp fram temp
compute CH4ke CH4 ke
fix 1 CH4 nvt temp 298 298 100*dt
Average properties from log.lammps
temp 14.00 K
alltemp 14.00 K
CH4temp 297.84 K
framtemp 0.00 K
ke 3.48 kJ/mol
CH4ke 3.48 kJ/mol
Average Ek from CH4 velocities
ke 3.47 kJ/mol
Ek distribution (shown in the fig)
Canonical distribution using “lammps-stable_3Mar2020” with compute_modify extra/dof
Canonical distribution
temperature 298.00 K
kinetic energy 3.72 kJ/mol
LAMMPS SETTINGS
compute allTemp all temp
compute CH4Temp CH4 temp
compute framTemp fram temp
compute CH4ke CH4 ke
compute_modify CH4Temp extra/dof 0 dynamic/dof yes
fix 1 CH4 nvt temp 298 298 100*dt
Average properties from log.lammps
temp 14.00 K
alltemp 14.00 K
CH4temp 279.22 K
framtemp 0.00 K
ke 3.48 kJ/mol
CH4ke 3.48 kJ/mol
Average Ek from CH4 velocities
ke 3.47 kJ/mol
Ek distribution (shown in the fig)