Compute stress/atom for a water box


Based on Lammps documents, one of the ways to compute the pressure tensor is to use compute stress/atom command and then sum over all the atoms in that group. However my question here is about computing pressure tensor for a water box containing both H and O atoms.
I basically set a group of O atoms and ran the simulation but output is too different compared to the case comute 1 all stress/atom.

Could you please write some clarification on compute stress/atom command for water box?


All information you would need is in the manual. Issues beyond that are predominantly issues with understanding statistical thermodynamics and that would be beyond the scope of the LAMMPS area of this forum.

In general, requests like “Can somebody explain XXX to me in more detail?” are not likely to be answered with something different than pointing you to the manual and/or text books like I just did.
They are too unspecific and open ended (so if people make the wrong assumption they would be spending a lot of effort explaining things you already know well enough), and often not relevant to the software you are using, which is what the LAMMPS categories are about.