pair_style polymorphic command

Dear Lammps-community,

In the pair_style polymorphic command documentation, I understand that users can modify the six functions (U, V, F, P, W, G) to create their own analytical or tabular form of the potentials. I am looking to modify to a Stillenger-Weber like three-body term. Where do I modify these six functions for the analytical form? If I understand correctly, the examples in the “potential” folder are for the tabulated form. Is there an example for the analytical form?

Thank you,
Sammy Walker

I think that would require creating a new derived class

that overwrites one of the methods

in pair_polymorphic.cpp with your new analytic form.

E.g. the attractive() or ters_zetaterm_d() methods.

I’m CCing the authors to see if they have further comments.


Hi, Walker,
If you have the analytical form, the easiest way is just to use it to created a tabular file. Otherwise you would need to create a derived class as Steve suggested.