Writing a custom Potential

Hi everyone,
I’ve just started learning molecular dynamics using LAMMPS. For my project on quasicrystals, I want to use a LJG potential, but I could not find the potential on the list of potentials in LAMMPS. Potential is of the form:
Can anyone help me in this?

LJ-Gaussian Potential
Please look at the potential form here. I want to use this interaction potential for self-assembly study of qc.

Hi @Rafshan, welcome! I think this might be a better question for the #openkim folks who specialize in interatomic potentials. I’ve moved your question there.


You can certainly create a KIM Model implementing the form you indicate. Perhaps the easiest way to do this would be to use the Exp6_KongChakrabarty_1973_ArNe__MO_946046425752_002 model (https://doi.org/10.25950/367a9eda) and edit the source code file Exp6_KongChakrabarty_1973_ArNe.f90 to modify the calc_phi, calc_phi_dphi, and calc_phi_dphi_d2phi functions to implement your form.

Then, you can build and install the model and use it with the KIM model interface in LAMMPS.

1 Like

Thanks for the help, I will certainly look into it.

Since this is a pair potential, the easiest option might be to tabulate it and use https://docs.lammps.org/pair_table.html (the link contains all the details you need). Especially if you are still testing this it might not be worth it to implement a full KIM model.

Of course, if the potential is useful for other scientists and you plan to publish results with it, it would be nice to have it in KIM.

1 Like