[lammps-users] NPT - Control pressure of fluid only.

I am trying to do an NPT simulation. I have a solid surface substrate and a fluid. The manual says that the pressure is calculated based on all the atoms in the system. Is there any way to only use the atoms in the fluid when calculating the pressure.

Otherwise, it is very difficult for me to get my system at the required densities - If I do a simulation on the fluid only, I get my required densities at the correct pressure/temperature. But when I add my solid substrate, this no longer works as the atoms from the surface substrate are also used, which has large effects on the pressure of my system.

Thank You,
Michael Doig.

Take a look at the compute stress/atom command. You can assign a group id to your fluid and pass it in this command.

Also from the documentation: Peter

A couple thoughts. Compute pressure can't use a pressure
from one component; there would be partial volume to associate
with it. You can tell fix npt not to dilate the solid atoms with
the changing box. That should make their contribution to the
pressure nearly a constant, with little fluctuation. See the
dilate option. Or you can monitor things with compute stress/atom
as P Shannon suggested.

Steve