Sorry, I did not pay attention to the email address.
The stress measurement is based on what we have on LAMMPS manual:
compute peratom bulk stress/atom
variable meanpress atom -(c_peratom[1]+c_peratom[2]+c_peratom[3])/3
Also I solved the problem, and to not leave the thread without any responses
I have attached 2 input files, one with the error and the other one without
error:
with error:
compute myCN bulk centro/atom 12
compute myKE bulk ke/atom
compute myPE bulk pe/atom
compute myCOM bulk com
compute peratom bulk stress/atom
compute vz bulk property/atom vz
WO error:
compute myCN bulk centro/atom 12
compute myKE bulk ke/atom
compute myPE bulk pe/atom
compute myCOM bulk com
compute peratom bulk stress/atom
compute vz bulk property/atom vz
It is quite interesting how changing the group option in compute commands
can change the structure (internal properties of simulation). Changes that
alter how the simulation behaves. I am not an expert, but I would say it is
some kind of bug.
there is no bug. what you get is what you are asking for. if you look
at the trajectory files with a text editor/viewer, you will see that
the coordinates are *exactly* the same in both cases. only that the
additional computed properties are only computed for a subset of the
atoms and set to zero in the "error" case. however, that is exactly
the expected behavior when you do a compute on a subgroup of atoms.
since this difference is not a small one, but between zero and
non-zero, one has to assume that the reason for seeing the undesired
behavior is not in the computation of those properties itself, but
rather in how this group of atom is defined.
looking at the group definitions it doesn't take much to recognize
that the "bulk" group, i.e. the one used in the "error" case is based
on a region defined with "box" units, whereas the rest is defined in
"lattice" units, which results in a scaling factor of almost 4, which
is commensurate with the size of the block that is visible in the
visualization.
in short, the bug is in your input (or in your lack of properly
checking it) and not in LAMMPS.
axel.