print out the force acting on the center of mass of a molecule

Hi,

I want to a run a simulation in lammps with several polymers and I want to print out the positions of the COM and the force acting on the COM.
To print out the positions in the COM I know that I have to do:

compute CM all com/molecule
fix aveCM all ave/time 4000 1 4000 c_CM[1] c_CM[2] c_CM[3] file out_com.dat mode vector

how can I do it for the force?
I looked around in the manual and mail list but didn't find anything...
Thank you very much for your help!

Marta

You can use compute atom/molecule, which

will sum up any per-atom value on a per-molecule
basis, then send it to fix ave/time in the same

manner. For an argument to compute atom/molecule

you could use an atom-style variable like

variable fx atom fx

Steve