[lammps-users] work done by "fix setforce"


When I use "fix setforce" command in a simulation, I want to know both
(1) instantaneous "work rate" (= force*velocity) done by "fix setforce"
(2) cumulative "work" (time integral of force*velocity) done by "fix
setforce" during the simulation.

Is there any good way to compute these quantities?

Thank you.

Fixes can compute, store, and output quantities to thermodynamics.
Setforce already does this for the 3 components of force it wiped out.
So you could create a dervied class: setforce-spiff and add whatever
quantities you wanted - see the FixSetForce::thermo() routine.