[lammps-users] pressure with fix spring/self

Dear List,

I am using fix spring/self to make a semirigid pore that is filled with a liquid. I want to run npt for the
pore/liquid system.

I would like to know if / how the harmonic forces that are introduced with the spring/self fix affect the
computed pressure. If I fix the value to $p, will that be the pressure of the liquid or will be different to
compensate for a different pressure exerted by the fixed particles under the restraint?

thanks for your help,

The pressure LAMMPS computes is via a virial
that only includes atom-atom interactions. The
only exception is a couple of fixes that include
their contribution to the virial, like fix shake
and fix rigid which are special kinds of constraints.

So for an external spring, the virial contribution
due to the spring force on the atoms is not
included in the virial (or pressure), However if
the spring deforms the system, the atoms act
differently on each other, and those interactions
do contribute to a modified pressure.