Dear LAMMPS users,

Hi,

During loading my system, I used the following variables:

variable strain equal “(lx - v_L0)/v_L0”

variable p1 equal “v_strain”

variable p2 equal “-pxx/10000”

variable p3 equal “-pyy/10000”

variable p4 equal “-pzz/10000”

variable p5 equal “-pxy/10000”

variable p6 equal “-pxz/10000”

variable p7 equal “-pyz/10000”

I also used the following variables:

compute stress all stress/atom NULL

compute stress1 all reduce sum c_stress[1]

compute stress2 all reduce sum c_stress[2]

compute stress3 all reduce sum c_stress[3]

compute stress4 all reduce sum c_stress[4]

compute stress5 all reduce sum c_stress[5]

compute stress6 all reduce sum c_stress[6]

variable pp1 equal (c_stress1)/(10000*vol)
variable pp2 equal (c_stress2)/(10000*vol)

variable pp3 equal (c_stress3)/(10000

*vol)*

variable pp4 equal (c_stress4)/(10000vol)

variable pp4 equal (c_stress4)/(10000

variable pp5 equal (c_stress5)/(10000

*vol)*

variable pp6 equal (c_stress6)/(10000vol)

variable pp6 equal (c_stress6)/(10000

By doing so, I obtained almost the same value for pp1 and p2 variables. However, I read in the manual and also in the LAMMPS community that in general they shouldn’t be due to not considering some interaction in the second method. So, does it mean that I’m missing something ?