Hello Lammps User

Recently I’ve been trying to compute pressure profiles on inhomogeneous systems. For example on slabs of liquid argon or liquids inside nanopores.

After reading some literature i found that pressure on inhomogeneous systems is not uniquely defined and that there are different ways of computing it. Let say for example the Virial route or the irving kirkwood method.

I know that the pressure profiles with the virial route can be computed with some post processing of the stress/atom output without limitations in the potential used. The irving kirkwood as i understand is not available in lammps, at least not in a simple way and not for all the potentials.

Here is my question.

If I have an inhomogeneous system lets say a slab of liquid argon facing the Z direction, by mechanical stability the component zz of the pressures tensor must be constant throughout the simulation box and the other components xx and yy will change at the interface. For what I have seen this is true for the irving kirkwood pressure but not for the virial computation, see for example figure 2 of the paper “Pressure Analyses at the Planar Surface of Liquid-Vapor Argon by a Test-AreaMolecular Dynamics Simulation”. Does this means a limitation on the virial route? I know that macroscopic properties as surface tension are not affect by this difference because is an integral, but if i am concern on pressure changes due to the inhomogeneity, Does this means that i cannot use the virial way of computing pressure?

I would appreciate some thoughts on this matters

Thank you

Matias