Is it possible to add other form of lennard jones potential form (such as LJ9-3, LJ6-3) in gromacs?

GROMACS version: 2019 post
GROMACS modification: Yes/No
Hello,

thanks for attention! I would like to know if there is any way to set particular LJ interaction for a specific pair of type of atoms? If i just want to mapping the PES from DFT results and found the LJ 6-3 would give the best fitting.

GROMACS only supports the standard Lennard-Jones 12-6 (and Buckingham if you patch things), so you can’t choose LJ 9-3 or 6-3 just by looking at the topology. You have two viable choices if you want a bespoke LJ form fitted from DFT:

  1. Nonbonded interactions in a table (recommended)
    You can use table.xvg to specify a pair-specific potential and then turn it on with vdwtype = user. This gives you complete control over the energy/force curve, so LJ 6-3, 9-3, or anything else strange is OK. This is how most people accomplish surface or fitted PES work in GROMACS without changing the original code.

  2. changing the source code
    You’d have to change the nonbonded kernel (or introduce a new potential form), which is possible but difficult and breaks easily between versions. not worth it unless you’re keeping a fork.

Important note: Tabulated potentials still work well with the rest of the forcefield, but you need to be cautious with cutoffs, smoothing, and making sure they are consistent with PME (if electrostatics are involved).

So, yes, LJ 6-3 isn’t built in, but GROMACS does enable you utilize it via tabular interactions. That’s the best method to do it that will last.

Many thanks for your kind and helpful reply! I would like to try to use the tablulated nonbonded interactions as you have described in your first comment. I just have two questions that i need to be sure. First, is it possible to employ this table interaction in gromacs 2025 and 2026, or should I use the pre 2019 version such as gromacs 2018? The second is that I had studied the format of the tabulated file in the top folder. so in principle, can i fit my own LJ m-n just by giving the proper value in the table file? For example, I can even set LJ interactions for LJ 5-3 or LJ 4-2 by giving the proper value in a table file. Is my understanding correct?

Thanks again and wish you a happy new year!

I haven’t used tabulated potentials before so I’m not an expert, but current versions of GROMACS (2025/2026) don’t support them, so you’ll have to fall back to an older one. They will hopefully come back in the future, though.
And yes, you should be able to interpolate an arbitrary potential form if you set the appropriate values in the table. Hope I could help!