Free Energy dummy atom segment fault

GROMACS version: 2024.4
GROMACS modification: No

Hi, Gromacs developers and users,

I have a segmentation fault, which may be related to a bug.

I am working with the calculation of the free energy of a protein (1LBS, charge -1.00) by decoupling the interactions. I neutralize with 0.15 mol/L NaCl. When I perform the minimization and equilibration in batch for the 21 lambdas, a warning occurs:

“State B has non-zero total charge: 1.0000”

To try to neutralize state B, I added a dummy atom with zero charge in state A and charge -1.00 in state B. The warning is suppressed. However, when processing in batch, after the initial lambdas (usually after lambda 4, 5) a segmentation fault occurs in all other states.

Any ideas or solutions?

I am attaching some images and files.

Regards!

topol.top (1.2 MB)
min_0.mdp (2.3 KB)

Hi!

Debugging gmx mdrun and backtrace for lambda 4.
The segmentation fault starts from here and before there is no fault.

News: I tested on gromacs 2025-beta and the error is the same, with HIP.

Debugging attached.

Thanks.
debugging.txt (9.4 KB)

At a glance, it doesn’t look like a bug to me. The forces on atom 78209 are growing quickly and become infinite. Is that, by any chance, your dummy atom? What are the VdW parameters for it? Wouldn’t it be better to introduce a special type of ion, e.g., Cl_decouple?

Hi.

Yes, atom 78209 is a dummy atom and the VdW parameters are zero.

I am running tests and I believe that inserting a special ion to decouple along with the protein is the solution to the problem. I did this and inserted a special ion along with the protein topology, so I think this ion will be decoupled along with the protein, keeping the neutral charge in all lambdas.

Remember that I can only decouple 1 moleculetype.

I attach my topology, notice the ion in residue number 4625, opls_407.

I hope I am contributing in some way.

Thanks.
topol.top (1.2 MB)

That sounds like it should work. I haven’t tested it for a while, but I think you can use a separate molecule type, and decouple that one using the A and B states in its topology. I’m quite sure it works together with decoupling another molecule type using the mdp settings, but you might have to test it.

However, the important reason why it crashed before was that there were no VdW parameters on an atom that got its charges turned on. That will lead to the charge overlapping with another charged atom, in turn leading to a crash. sc-coul = yes might have helped.