Have you read the manual: Yes. I used the scripts from Lammps manual
MD simulation experience: Yes, several years, with Gromacs, Amber and OpenMM
Lammps experience: No. Started recently
Lammps version: 20230208
Lammps execution command: mpirun -np xxx lmp -in in.tip4p
Can you provide your input scripts and results: Yes. Please check this: Input scripts and results
Dear All:
I have been recently introduced to Lammps because of its good modularity and robustness. I have been conducting the simulation of water with different water models/force fields for my project.
I want to first get my hands on Lammps by conducting a TIP4p simulation with the scripts already provided by the Lammps manual:
https://docs.lammps.org/Howto_tip4p.html
There I found two different flavors to conduct it, the first one is “implicit” (and will be quoted as implicit from now on), and the second one is “explicit” (and will be quoted as explicit from now on).
I (almost) exactly copied all the scripts from the manual, with only a few modifications that I anticipate should be very safe to do. They are listed below:
- The box size and the number of molecules. The manual script uses a smaller simulation size with 33 waters and a box with (10A, 10A, 10A) size to maintain a ~1g/mL density. I modified it to be 216 waters and the box with (18.68A, 18.68A, 18.68A) to maintain the same density.
- The
t_damp
for thefix nvt
, from 100 fs used by the manual, to 500 fs. - The logfile writing frequency of SHAKE. Manual does it every 10000 steps, I just let it not print to the file at all.
- The total steps. I just let it run longer to be 2ns so I can make the first 1ns to be equilibration run (which is ample because liquid water can be equilibrated with ~100ps) and discard later.
- The
thermo_style
to output time as well.
I have also attached my input scripts and the molecular geometry files. I also preserved the original lines from the scripts in comments for easy check.
As such, I conducted the simulation. Meanwhile, I have conducted another simulation on Gromacs (and later in OpenMM) with the same setup as much as possible in order to have some reference to compare with: same waters, same force field, same t_damp, same box, same energy output frequency, etc. All the common cares for an NVT MD were done as well, e.g. equilibration.
After I got the results from Lammps for both methods, I found some “issues”, and I further compared them with the Gromacs/OpenMM results together with the literature result from TIP4p, and found more “issues”. I would like to summarize them as below:
- In Lammps, the Etotal from implicit and explicit differs hugely: the implicit has
-2000
scale, while the explicit has-80000
scale. - Between Lammps and Gromacs/OpenMM, after proper unit conversions, the implicit agrees with Gromacs/OpenMM in the scale at least, but the explicit disagrees hugely with Gromacs/OpenMM.
- The isochoric heat capacity, C_V, calculated from the Etotal by the fluctuation formalism, \frac{\langle E^2\rangle-\langle E\rangle^2}{k_BT^2} are both hugely different from the Gromacs/OpenMM result:
Implicit: 180683.5\ \mathrm{J\ K^{-1} mol^{-1}}
Explicit: 170938.7\ \mathrm{J\ K^{-1} mol^{-1}}
Gromacs: 86.5\ \mathrm{J\ K^{-1} mol^{-1}}
OpenMM: 84.2\ \mathrm{J\ K^{-1} mol^{-1}}
Literature: 83.7\ \mathrm{J\ K^{-1} mol^{-1}}
(Literature is Phys. Chem. Chem. Phys. , 2011,13 , 19663-19688. It is C_P instead but one will expect C_V is only slightly smaller than it)
So my questions are below:
- Is there anything I did fundamentally wrong on the input script to cause such a discrepancy between the Lammps implicit and explicit? Or between the Lammps and Gromacs/OpenMM?
- The two values from Lammps actually agrees with each other. Then what do you think causes the discrepancy between Lammps and Gromacs/OpenMM? Are they expected?
- I understand that C_V is an extensive property, so one needs to divide the number of molecules in order to get the numbers shown above (and they are actually “molar” isochoric heat capacity). I did divide
216
in order to get all the results above. However, some threads suggest that Lammps does NOT really “see” molecules, but atoms instead. I am thus wondering if both of those weird numbers from Lammps are caused by not finding the correct number to divide by (or say normalization)? - If it is only caused by using the wrong number 216 to do the normalization, then we should expect the MD and the trajectory are correct from Lammps. Then what should be the correct number to divide for the Lammps result in order to calculate the extensive thermodynamic properties? How can I identify such a number in Lammps?
Any suggestions or comments are highly appreciated. Thank you so much in advance and I’m looking forward to hearing back from you.
Sincerely,
Hanbo