Can you clarify what you mean here?
Is the pair style you are writing not already calculating the (pair contribution to) the energy per particle? (... that is...excluding many-body forces or long range electrostatics.... Are you using these?)
What contributions to the energy do you mean?
Contributions to the energy from bonds, angles, dihedrals... containing that atom? (What about fixes like "fix spring" or "fix wall"?)
This is not an input script command (and this string does not appear anywhere in the source code)
My guess would be what you are trying to do is not easy to do in a general way. But perhaps if you clarify what you want, someone can suggest something.