Calculate net force on a group of atoms

Dear lammps users
I am a group of atoms as a rigid body that is being pulled out from another polymer material. I want to calculate net force (fx fy and fz) on this group of atoms. Which command is most suitable for this? Please advise.

I am using like this

compute frc BN property/atom fx fy fx
compute forc BN reduce sum c_frc[1] c_frc[2] c_frc[3]

Is it right? I mean will it take all the three force components fx fy and fz on each atom ?

Thanks

I suggest you try the commands and output their

results. Then examine them to see if they

produce what you expect.

Steve

Dear Steve,
Thank you for your response. I intend to calculate total force in x, y and z directions on a group of atoms. How can I ascertain that I a doing it correct? The other command that I think can work is fix store/force. I think both should give same results.

The doc page makes clear what fix store/force does. It may not be

the same as summing the force at the end of a timestep.

Steve