Hi lammps users,
Should force used to calculate virial term in pair_lj_cut.cpp equal to the value dumped out for those atoms within local cell.
I do know why force dumped turned to be smaller than the value used to calculate virial term.
Here is the input file…
dimension 3
boundary p p p
units lj
#communicate single cutoff 1.0
atom_style atomic
neighbor 2.0 nsq
neigh_modify delay 10
lattice fcc 0.71 origin 0.5 0.5 0.5
region rec block -5 5 -5 5 -5 5
create_box 1 rec
create_atoms 1 box units box
mass 1 1.0
LJ potentials
pair_style lj/cut 5
pair_coeff * * 1 1
compute 1 all pe/atom
initial velocities
velocity all create 1.0 123456701
fix 1 all nve #nph iso 0.076 0.076 0.03
timestep 0.005
thermo 1
thermo_style custom step temp pe ke press vol etotal
dump 1 all custom 1 atom.*.lj id mass type x y z vx vy vz fx fy fz
run 2