Hello everyone,
I’m working on a new pair potential that depends on particle orientation, and I would appreciate some feedback.
In my model, I’d like to modulate the interaction between particles using a weighting function—something similar to what Noguchi used in this paper (likely used in other publications as well, but this is the one I’m most familiar with).
The potential energy takes the form:
where ( w(r) ) is a weighting function that smoothly decays to zero at a cutoff distance ( r_\text{cut} ).
My main question is about how to correctly derive the force from this type of potential. I haven’t found many resources on this, even after searching the forum.
Specifically, should I differentiate the entire potential expression like this:
or is it acceptable to scale the derived force directly:
I came across this StackExchange post, which touches on a similar issue, but I’m not entirely convinced by the conclusion, since the full differentiation introduces an extra force term that shouldn’t be ignored.
I understand this may not be strictly LAMMPS-related, but I hope someone has encountered this kind of problem before, or perhaps there’s a LAMMPS pair style with a known implementation that could serve as a reference.
Best regards,
Pietro