I have to calculate the pressure profile binned in x direction for a VLE system of water. I am using compute stress/atom followed by the fix ave/spatial . Since the compute gives -(pressure* volume) values, what should the post processing step typically be? Should I divide the stress value by ( number. of atoms in the bin * volume of bin) ?

My inputfile is attached for reference.

I have read mails on this but I am unable to understand.

I have to calculate the pressure profile binned in x direction for a VLE
system of water. I am using compute stress/atom followed by the fix
ave/spatial . Since the compute gives -(pressure* volume) values, what
should the post processing step typically be? Should I divide the stress
value by ( number. of atoms in the bin * volume of bin) ?
My inputfile is attached for reference.

please always attach input files in plain text and not some format that
may require multiple steps for people to even read them, let alone try them
out. the easier it is for people to follow what you are showing them, the
higher the chance to get (good) help.

I have read mails on this but I am unable to understand.

please always remember, that a prerequisite for successful application of
a scientific software is that you are familiar with the underlying science.
you cannot expect that documentation and mailing list have prefabricated
answers for all questions. they provide the pieces and it is *your* task to
assemble them to a complete answer. so you should ask yourself: what
decides whether a property needs to be averaged over the number of
particles or not? what defines the volume for converting stress to
pressure? have you come across the term "intensive" and "extensive"
properties? it is probably a good idea to read up on all of this in a text
book on (statistical) thermodynamics and it also doesn't hurt to discuss
with your colleagues and your adviser.

You may also find it useful to look at this example simulation, which shows how to obtain stress components for a lipid bilayer, and should be easy to adapt for a water-vapor interface.
Post processing to obtain pressure profiles can be done with this script.

Depending on how you are aggregating the stress/atom data, you may
need to multiply by the number of atoms in each bin and/or divide by
the volume of the bin. It is not very hard to figure out the correct
formula for any particular situation by simply checking that your
calculation satisfies the volume-extensive nature of the virial. That
is, if a volume is divided into two regions A and B:

V(A) + V(B) = V(A+B)

then:

p(A)V(A) + p(b)V(B) = p(A+B)V(A+B)

This is the same check that is described on the stress/atom doc page,
where the simulation volume is divided in to N regions associated with
the N atoms.

compute peratom all stress/atom NULL
compute p all reduce sum c_peratom[1] c_peratom[2] c_peratom[3]
variable press equal -(c_p[1]+c_p[2]+c_p[3])/(3*vol)
thermo_style custom step temp etotal press v_press