The extra 1/r is so when you multiply it by dx you get
the fx component. Anything with eflag/vflag computes
an energy/virial which is needed on some timesteps.
If you're only modifying two functions in pair_sw, then
you should derive a new class from it and replace those
two functions.
Steve