Energy calculation in LAMMPS

Hello,

I’m interesting in how LAMMPS calculates the energy. The problem is that I got some difference between LAMMPS and DL_POLY calculations and I beleive that DL_POLY has more correct results.

The testing sample is a simple bcc structure with Buckingham potential. Here is an output of LAMMPS (first) and DL_POLY(second) for 1 step run of 16000 atoms with very small timestep. The difference of both potential and total energies is nearly 3%. The output is followed by LAMMPS startup file and DLPOLY control and field files. The only difference in units is time (fs vs ps). I will appreciate if anyone can tell me how to solve this problem.

Sincerely,
Tymofiy Lukinov.

Step Temp PotEng KinEng Enthalpy TotEng Press Volume

Hello,

I'm interesting in how LAMMPS calculates the energy. The problem is that I
got some difference between LAMMPS and DL_POLY calculations and I beleive
that DL_POLY has more correct results.

The testing sample is a simple bcc structure with Buckingham potential. Here
is an output of LAMMPS (first) and DL_POLY(second) for 1 step run of 16000
atoms with very small timestep. The difference of both potential and total
energies is nearly 3%. The output is followed by LAMMPS startup file and
DLPOLY control and field files. The only difference in units is time (fs vs
ps). I will appreciate if anyone can tell me how to solve this problem.

absolute potential (and thus total) energies have no real meaning for
any kind of force field (or quantum chemistry) model, what matters are
energy *differences*.

so please take two similar but different configurations, feed it to
both programs and if you get the same energy difference, you are good.
if not, you can use the pair_write command or just two atoms with fix
move to scan the potential energy curve of that pair and compare it to
the result based on the underlying functional form of the potential,
and if you can find a discrepancy, we can start looking at the source
code and try to identify where this is coming from.

axel.

which numbers are 3% differerent. Have you tried an even
simpler config with 2 interacting atoms? Maybe one
of the codes is shifting the energy to 0 at the cutoff?

Steve

Hello everybody,

I checked the potential for two-particle interaction and found that DL_POLY set potential to 0 at r>r_cut, whereas LAMMPS set this value to 0 at r>=r_cut.
By increasing the cutoff radius from 8 to 22 ångström I get the energy difference near 0.1% for the same configuration. Thus I beleve this is a clue to the problem.

Sincerely,
Tymofiy Lukinov.

Again. It is not a problem.

Have you tried pair_modify shift yes?

Axel.