[lammps-users] many-body "pair" potentials

Hi all,

as you know, potentials like s-w, eam and tersoff are added as "pair"
potentials. I've added another three-body potential, also in the same
way, and I'd like to calculate E_pot of every atom in the system. I
can't see an easy way to do it, because in pair potentials E_pot of
atoms is calculated using the method single(), which takes as an
argument only distance two between atoms, so it won't work for
three-body forces.
Any ideas how it should be done?


I am in a similar situation - wishing to be able to output the potential energy (perhaps also the kinetic) for the tersoff type potential.

Now I haven’t looked through the code, but could you create an overload for the particular method? (overload is perhaps not the right term… basically a second definition of the method single() which takes two arguments, or make it take 2 or more input values where the new values are defaulted to a dummy value or some such).

I guess I now have the question of: if the potential energy can be outputted for the entire system as a whole, why can it not be done on an individual basis? I mean, in order to get the total (sum of parts), don’t you need the parts to sum?




I guess it all depends on what you want to do. If you want to introduce a three or more body potential, it should still work in combination with compute(), the routine used to calculate the forces during simulation. On the other hand, you are correct that single() could not deal with more than two bodies at a time. However, single() is only used in user-defined energy or virial calculations per particle such as dumps. So you could add a three body potential, but you should not expect dumps to function properly.


Because it's not implemented.

Probably Steve or other developers are the right people to decide,
what's the best way to implement it. This problem is one of
limitations that many-body potentials have because they are
implemented as Pair potentials. It can be fixed either by making Pair
more general, or by adding a new potential category.


We're thinking about more general ways to compute per-atom energy/stress,
particularly for many-body potentials. But nothing has been implemented
yet. It's basically a bookkeeping issue ...