LAMMPS : Potential energy of entire system is coming almost two time as the sum of potential energy of individual atoms in the system calculated by
compute 3 all pe/atom
compute 4 all reduce sum c_3
commands.
Physically both should be equal in magnitude.
Here I am writing the input commands file.
___________________________________________________
fix 1 all nve
fix 2 all temp/rescale 20 2000.0 2000.0 10.0 1.0
timestep 1.0
thermo 1
run 1000
unfix 2
compute 3 all pe/atom
compute 4 all reduce sum c_3
thermo_style custom step temp pe etotal c_4
dump 20 all custom 10 Trajectory_nve_2000 id xu yu zu vx vy vz c_3
run 1000
____________________________________________________________
OUTPUT of thermo_style
Step Temp PotEng TotEng c_4
1000 1996.2558 -1459674.8 -1445209.2 -748980.04
1001 1997.0884 -1459680.7 -1445209.1 -748987.39
______________________________________________________________
Now just see the 3rd and the last column of the output. The 3rd column is the PE of entire system and the last column is the sum of the PE of individual atoms. These two quantity should be equal but they differs by a multiplicative factor of approximately two. I don't understand why ? Can anybody help me to resolve the issue ?
Omkar