[lammps-users] fix seforce and pressure

Hello List,

I have the impression that fix setforce operates after the virial is computed in the pair routine.
So, in spite of the fix setforce 0 the group to which it applies still contributes to the pressure.
Is this right?

Is there any way -besides setting the pair interaction to zero- to make the contribution of a group
to the pressure zero in a meaningful way?

thanks for your help,

You're right, force constraints occur after the pair virial is
already computed. Some (like SHAKE) do their own virial correction).

If you don't want certain atoms to be part of the force or virial,
you could exclude them from the pairwise computation altogether.
E.g. set their pair coeffs to 0.0 (e.g. epsilon), or use the neigh_modify
command to exclude them on some criterion (e.g. atom type).