I am running NPT simulations of SPC water and Lennard Jones like solute. I am interested in computing a virial like quantity, and hence need to output the forces (WITHOUT the constraints forces added on by SHAKE) on each of the atoms. Is there any way to do this (I am presently using dump to output to the forces but I am not sure if these include the constraint forces) ?
Dumps happen at the end of the timestep, so they do include
all added constraints. I can't think of a simple way to get
the forces before constraints are added. It would take some
new coding. But I doubt that you really want the forces
without constraints, especially SHAKE, since they are part
of the water model itself. The fix shake adds in virial
contributions due to the forces it adds. So the final virial
or pressure that any LAMMPS command computes, will
include inter-atom and SHAKE forces.
Just added a fix store/force command that will
allow you to output forces stored before constraints
are applied. See the 24Dec09 patch.
Thanks for that ! I figured out that virial like quantity I was
interested in can also be computed by taking a sum of the forces
and projecting it onto the radial vector describing the center
of the molecule. That way I could avoid the constraint forces.