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.
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?
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.
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.