Strange values in potential energy per atom

Hi all ,
Hi Steve,

I have used two versions of LAMMPS one is 11 Apr 2011 and other one is 10 Dec 2010 with all standard packages except GPU,MEAM,POEMS,REAX, SRD and no USER-packages.

I am pulling a periodic 3D box of polyethylene with 160 molecules each molecule having 200 atoms.
And i have used NPT ensemble. Now i am trying to get a potential energy per atom for that i used proper commands in input file as mentioned in manual. And aiso i have tried to extract potential energy due to pair , bond, angle, dihedral. By below commands like

compute peperatom all pe/atom
compute peglobal all reduce sum c_peperatom

compute pairpe all pe/atom pair
compute pairpe1 all reduce sum c_pairpe

compute bondpe all pe/atom bond
compute bondpe1 all reduce sum c_bondpe

compute anglepe all pe/atom angle
compute anglepe1 all reduce sum c_anglepe

compute dihedpe all pe/atom dihedral
compute dihedpe1 all reduce sum c_dihedpe

compute imppe all pe/atom improper
compute imppe1 all reduce sum c_imppe

Now i have printed all computed values in my log file by thermo_style command ac below

thermo_style custom step temp press pe c_peglobal c_pairpe1 c_bondpe1 c_anglepe1 c_dihedpe1 c_imppe1

In above thermo_style pe is direct global therm value and c_peglobal is from compute command. I observed that thermo pe and summed per atom pe value is not matching. Can you please figure out the problem and let me know.

For your reference i appended my input and output files below. And also this problem is coming same for pressure per atom also.

INPUT FILE:

units real

atom_style full
boundary p p p
pair_style lj/cut/opt 6.0
bond_style harmonic
angle_style cosine/squared
dihedral_style opls
special_bonds lj 0.0 0.0 0.0 dihedral no

read_data 200_PE_LAMMPS_INPUT

mass 1 14
mass 2 15

pair_coeff 1 1 0.0862233699 4.0685000000
pair_coeff 1 2 0.0862233699 4.0685000000
pair_coeff 2 2 0.2104232379 3.7654000000

pair_modify tail yes
neighbor 1.0 bin

bond_coeff 1 327.8159977500 1.5330000000
bond_coeff 2 327.8159977500 1.5310000000

angle_coeff * 89.4358472550 113.3000000000

dihedral_coeff * 1.8773287740 -1.0413681240 3.7164422040 0.0000000000

neigh_modify check yes # as default values used

timestep 2.0
run_style verlet

fix 1 all npt temp 100.00 100.00 500 x 0.0 0.0 500 y 0.0 0.0 500
fix 2 all temp/rescale 1 100.0 100.0 10 0.5
fix 3 all deform 1 z vel 0.0005 units box

compute peperatom all pe/atom
compute peglobal all reduce sum c_peperatom
compute pairpe all pe/atom pair
compute pairpe1 all reduce sum c_pairpe
compute bondpe all pe/atom bond
compute bondpe1 all reduce sum c_bondpe
compute anglepe all pe/atom angle
compute anglepe1 all reduce sum c_anglepe
compute dihedpe all pe/atom dihedral
compute dihedpe1 all reduce sum c_dihedpe
compute imppe all pe/atom improper
compute imppe1 all reduce sum c_imppe

thermo_style custom step temp press pe c_peglobal c_pairpe1 c_bondpe1 c_anglepe1 c_dihedpe1 c_imppe1

thermo 1

run 3000

OUTPUT FROM LOG FILE:

Step Temp Press PotEng peglobal pairpe1 bondpe1 anglepe1 dihedpe1 imppe1
0 0 -424.47644 -22455.137 -5299.7037 -22577.461 3233.5885 3537.7883 10506.38 0
1 53.035762 -108.24696 -23058.779 -5903.2933 -22580.845 2759.1665 3425.6737 10492.712 0
2 90.221798 311.30675 -25774.417 -8618.6191 -22598.822 751.20637 2825.4297 10403.567 0
3 95.492809 435.63846 -26272.507 -9116.6596 -22617.792 787.35771 2417.6667 10296.108 0
4 88.320161 322.97224 -24362.888 -7207.4885 -22635.854 2932.668 2313.3721 10182.326 0
5 79.630597 103.80995 -21438.99 -4284.4546 -22652.484 5893.6685 2416.5047 10057.856 0
6 79.246349 -67.623775 -19317.146 -2163.6538 -22671.282 8007.2718 2583.1192 9917.2369 0
7 90.908166 -80.837227 -19575.799 -2423.3136 -22693.996 7833.4358 2669.7297 9767.5171 0
8 107.94371 32.803672 -22080.569 -4928.9923 -22721.467 5534.9092 2623.8917 9633.6743 0
9 117.76357 115.9051 -24838.372 -7687.6981 -22745.645 2973.672 2551.7886 9532.4867 0
10 115.17732 60.281162 -26091.764 -8942.0795 -22765.922 1745.8743 2613.0611 9464.9069 0
11 108.95303 -95.076533 -25467.384 -8318.7254 -22783.647 2145.2127 2895.4473 9424.2621 0
12 90.190298 -343.01586 -23599.325 -6451.5529 -22799.022 3548.9811 3395.7719 9402.7158 0
13 85.401115 -465.07814 -21680.882 -4533.6123 -22813.424 4910.4337 3974.3272 9395.0513 0
14 86.759498 -439.82126 -20520.635 -3373.3137 -22829.785 5577.0377 4482.4038 9397.0297 0
15 92.734426 -261.67533 -20415.583 -3267.6801 -22851.22 5449.871 4725.672 9407.9971 0
16 98.573475 -1.173655 -21002.352 -3853.5434 -22874.583 4993.2695 4601.3484 9426.4222 0
17 106.03572 275.55501 -21731.136 -4581.407 -22901.155 4681.6998 4188.3159 9449.7327 0
18 106.1547 466.84913 -22330.161 -5179.8156 -22926.792 4584.1476 3685.8483 9476.9805 0
19 105.62884 567.69479 -22814.947 -5664.535 -22944.864 4460.2006 3313.1029 9507.0259 0
20 105.14182 566.81624 -23273.187 -6123.3768 -22959.239 4124.3761 3172.458 9539.0281 0

In the above output

4th column is thermo global potential energy
5th column is summed per atom potential energy
6th column is summed per atom potential due to pair force contribution only.
7th column is summed per atom potential due to bond force contribution only.
8th column is summed per atom potential due to angle force contribution only.
9th column is summed per atom potential due to dihedral force contribution only.
10th column is summed per atom potential due to improper force contribution only.

If i add 6th to 10th column values i am getting 5th column, but 5th column is not equal to 4th column?
Can you please clarify my doubts ?

thanks and regards,

grn

Please post your input data file.

Steve

Hi Steve,

I have attached my input data file, please check it once and let me know if there is any corrections.

thanks,
grn.

200_PE_LAMMPS_INPUT (5.16 MB)

Turn off this line and you will get agreement:

pair_modify tail yes

The tail correction is a global add-on to the pair energy.
There is no way to account for it on a per-atom basis.

Steve