For most pair potentials, there are just 2 places in pair*.cpp where force
is computed. In the compute() function and the single() functiion. Pair lj/cut
has a few more versions, b/c it can be used by rRESPA in some additional modes.
You might ask, why not make every pair style have exactly one place where
force is computed, i.e. a single() routine that everything else calls. This
would be inefficient when you want to compute forces for a long list of
atom pairs at once, which is what compute() does.
For pair SW, it has a 2-body loop and a 3-body loop in compute(). If that
isn't similar to what you need, then you can write something else. Pair SW
uses standard neighbor lists to find 2-body and 3-body interactions. If you
need something different, you'll have to explain what it is.