Dear LAMMPS users,

The LAMMPS version I use is 3Mar20

I have a question about how LAMMPS dumps forces.

In principal, I have a system with rigid walls that exert some pressure in the “z-direction” using “fix aveforce command”

Then, I am performing a calculation for the pressure in the z-direction using “compute stress/atom command” which with conversion to the pressure units produces the value that I wanted.

To be sure that I am in the thermodynamic conditions which I applied, I have also

performed the calculations of the pressure with the method of planes methodology with an auxiliary external program. It is essentially the eq. 14 of the paper specified in the LAMMPS documentation (B. D. Todd, Denis J. Evans, and Peter J. Daivis: “Pressure tensor for inhomogeneous fluids”, Phys. Rev. E 52, 1627 (1995)), i.e.

P_zz=1/2A \sum_i F_zi(sgn(zi-z))

while the kinetic part is assumed to be P_kin=kT \rho(zi)

where \rho(zi) is the local density taken from the density profile, exactly for the plane I take into account.

When I print the forces with “dump custom” command, and use the “fix aveforce” command, the resulting pressure profile (virial + kinetic parts) has approx. value of 0 atm in the middle of the slit.

On the other, hand, if I have the same system which was pre-equilibrated with “fix aveforce” command but now the walls are fixed (not integrated) and therefore there is no point of using “fix aveforce” (in other words, I assume that their position should correspond to the desired pressure), the resulting pressure profile (virial + kinetic parts) has the desired value in the middle of the slit.

Therefore, my question is: Does LAMMPS take into account the external forces that are applied with, for instance, “fix aveforce/addforce” commands to be printed by the “dump custom” command by the default, or is there some additional “modify” command to do so?

Thanks in advance,