[lammps-users] ways to calculate the volume of liquid

Hi, Steve,
I have a question about calculate the pressure of liquid. My system is a liquid slab confined between two solid walls and I want to obtain the pressure of liquid. However, the “compute pressure” can only get the pressure for entire system including both solid and liquid. So, I am trying to use the stress/atom and sum the diagonal components of the per-atom stress tensor for all liquid atoms. From there, I need to know the volume of my liquid slab. Unfortunately, my liquid slab doesn’t alway fill whole geometrical space between to walls, which makes me hard to compute the volume. Is there any way to compute the volume of a deformed liquid in Lammps like this case.

Best wishes,
Frank

Is there any way to compute the volume of a deformed liquid in Lammps like this case.

No. It's not even clear what the definition is, in this case. So
LAMMPS doesn't attempt
to calculate it. If you can define it precisely, then I think it
would be best to
post-process the calculation.

Steve