[lammps-users] Energy Conservation Problem w/ LJ

Hi,
    I've recently begun using LAMMPS and have created a situation that leads to a lack of energy conservation. While using a modified LJ potential I found that fluctuations in PE did not equal fluctuations in KE. I then debugged, eventually stripping the run down to a static box w/ a small timestep using unmodified Lammps code. I still find peculiar movements in the PE on the order 10*delta(KE). Is there a reason for the fluctuations that I have not noticed? I have attached the input file as well as a small graph of the fluctuations.
Mike Salerno

PE+KE.jpg

input-rate-1E-5-nobond-fixvol (1.94 KB)

Mike,
a reason for your poor energy conservation may be that you are specifying cutoffs for the LJ interactions that are too short (the standard is 2.5 sigma).
The truncation of the potential before it decays to ~0 will produce the impulse that leads to non conservation of the energy.
vale

Thanks for the suggestion. Discontinuity in the potential is indeed causing the energy changes! Specifying the option "pair_modify shift yes" shifts the potential so that energy = 0 at the cutoff radius and eliminates unwanted energy fluctuations.
mike
Quoting Valeria Molinero <[email protected]...>: