How to define customized pair potential function

Hello,

I am using the LAMMPS version LAMMPS-64bit-19Sep2019. Could you please let me know if I can define my own customized pair potential function in place of an inbuilt pair_style. Take for example, in LJ potential, I would like to raise the repulsive part of the potential function to the order of 7 instead of 12. I tried defining the potential in tabular data form, but I do not want interpolation of data in the input itself. I want to define my own potential in a functional form for more flexibility.

I look forward to hearing from you soon. Thank you very much for your time and help.

With best wishes,
Arunjyoti Sinha Roy.

in general, if you want to change the implementation, you have to change the source code and then recompile to get a new executable. for windows that is non-trivial. you would be better off using the Windows subsystem for Linux and then compile and run LAMMPS inside the bash shell.

For your specific case of a Lennard-Jones potential with different exponents, you can also use pair style nm, which is a generalized Lennard-Jones.

axel.