I am trying to simulate SPC/E water in LAMMPS. I am comparing GROMACS and LAMMPS energy minimization to see if they both give same/similar energy. In my test with 500 SPC/E waters, the energies were different. So I tested EM on just one water molecule in vacuum. They both give different answers. I am attatching the folders that I used for comparing and all the data I generated as an example to test (the files should run directly without any need for any other file)
Can someone tell me if its not correct to compare the two softwares? Or what might be causing this disparity?
Thank you so much.
Best regards,
Ved gmx.zip (158 Bytes) lmp.zip (164 Bytes)
The absolute values of potential energies in classical models are arbitrary. What matters are potential energy differences and (even more importantly) forces.
It is non-trivial to make sure to have the exact same forces with different ways of handling long-range electrostatics. There will be some small differences due to details of the implementation (e.g. implicit tabulation of real space Coulomb in LAMMPS, approximation to the square root and vectorization in Gromacs). Also, minimization algorithms are can easily diverge between implementations, so comparing MD without a thermostat is more reliable.
Also, you didn’t say how different the numbers were.
I remember doing similar comparison in the past, and the agreement was reasonably good between GROMACS and LAMMPS for simple water models (i.e. at least the first digits of the energy were the same).
This was not known to me before, thanks a lot for sharing this information. The numbers were supposed to be included in the files I shared, but they were unfortunately empty. I will include the numbers in this message.
I can’t comment on the energy values, but your inputs contain some weird parameters, like a very odd cutoff of 5 Angstroms for all the interactions, and also very weird masses for oxygen and hydrogen in the Gromacs parameters (9.95140 and 4.03200 g/mol ?). Also, the bond and angle rigidity were specified in the LAMMPS files, but not used because of the shake. Was this intentional? Doesn’t it affect the energy values?
If you really want to compare LAMMPS and GROMACS, you need to double-check every single parameters and commands, and also clean the files and remove all unnecessary commands.
A single dipole molecule in a big periodic box is pretty much the worst case for comparing between LAMMPS and GROMACS. They use different algorithms for periodic electrostatics (PME vs P3M). The electrostatic mesh chosen will also be quite sensitive to choice of accuracy in a system with such small total charge yet highly localised. Bear in mind that the long-range electrostatics algorithms used in both LAMMPS and GROMACS are optimised for random distributions of equal charges (salts and proteins in water), not vacuum charge spikes.