[lammps-users] Energy Not Conserved & Langevin Problems


I am using Ewald sums (actually, PPPM) on 320 charged particles between LJ walls. I am trying to use the langevin thermostat and am having issues. Firstly, my setpoint temperature does not look like it is being maintained. Secondly, total energy is not conserved.

I understand that while a system is equilibrating, temperatures will initially spike and later settle at the set point. However, after 55E6 timesteps with dt = 0.0001 the system temperature is still unsteady. I attached a plot of the temperature profile if that helps.

Why isn’t energy being maintained? Do I need a larger system? I’m not sure if it matters, but my LJ particles have a small sigma = 0.01 with a cut off of 0.025. Is my timestep too small such that the particles are get

Here’s an edited (for convenience) version of my code. I can provide more information if necessary:

Initialize simulation box

dimension 3
boundary p p f
units lj
atom_style charge

Create geometry

region simbox block -10 10 -10 10 -11 11 units box
create_box 2 simbox

#Insert particles
create_atoms 1 single 1 1 2 units box
… (inserting 320 particles in a cubic lattice)
create_atoms 2 single -4 4 -6 units box

Set masses

mass 1 1.0
mass 2 1.0

Set potentials

pair_style lj/cut/coul/long 0.025 10.0
pair_coeff * * 0.4 0.01
kspace_style pppm 1E-4
kspace_modify slab 3.0

velocity all create 1.0 3

neighbor 1 nsq
neigh_modify delay 0 every 1 check yes
fix bottom all wall/lj126 zlo -11 0.4 1.0 2.5 units box
fix top all wall/lj126 zhi 11 0.4 1.0 2.5 units box
fix thermostat all langevin 1.0 1.0 75 3
fix timeintegration all nve
timestep 0.0001
thermo_style custom step temp etotal pe ecoul evdwl press cpu # Set thermo data output
thermo 1000


N320_Temp.pdf (27.9 KB)