Internal force on one atom from other atoms within the same group

Dear Everyone,

I have a question on calculating force on an atom in a group that I specified. My simulation is for polymers.

Please see the figure attached for the detail question description.

Is there a command available in Lammps or a simple way for calculating the resultant internal force on an atom ONLY from the other atoms in the same group?

Thank you for any comments,

Lili Zhang

Internal force on atom within a group.jpg