LJ1-4 interactions in periodic systems

GROMACS version: 2019.6 - 2023.1
GROMACS modification: No

So, I was experimenting with these FF parameters in Gromacs - so far mostly for fun (learning LAMMPS and Gromacs a bit better), now trying for very minor profits (just wanted some ZIF-like structures for some ML-project relatively fast).

I managed to convert all the bonded interactions just fine and if I compare the energy-statistics on a single-point evaluation of their LAMMPS-input-file to Gromacs, everything is ok. Also the SR-LJ/Coloumb-energies are ok (a bit off (1-2%), but that seems to be expected), when turning of 1-4-interactions in LAMMPS and Gromacs (I still have the [ pairs ]-section for 1-4s and nrexcl=3), but set FudgeLJ to 0).

Things diverge though, if I add LJ 1-4-interactions back (with FudgeLJ=1). I get a very large energy contribution in the gromacs-output for LJ1-4 vs LJ(SR) (9e5 vs -2e4) and this is very different to LAMMPS.

What is really weird to me is that I get (approximately) the same energy I get with LAMMPS, when I set FudgeLJ=0 and include the 1-4-interactions in the general non-bonded calculation (with nrexcl=2) - which (if I don’t have my brain wrapped around unhealthily) should be the same¹?!

¹ it is indeed with a very simple test system of 5 particles in a row, connected by type-5 bonds

Not so much addressing the main point, but if it is indeed a small system, you could compute the expected LJ forces/energy “by hand” as a known-good reference.

that helped, I was just stupid and my ad-hoc-FF-conversion code did never expect 5-rings. (Was quite trivial, once I printed the pair-potentials with gdb)