Question on constraints (in *.top and *.mdp files)

GROMACS version: 2024.2
GROMACS modification: Yes/No

I’m new to GROMACS and a little confused about the constraints in the topology and mdp files.

In the topology file, we can use [ constraints ] to set up, e.g., the bond length constraints. In the mdp file, we also have a constraints keyword, which can be none/h-bonds/all-bonds/h-angles/all-angles.

If constraints = all-bonds, does it mean it will convert all bonds to constraints, or just the bonds under [ constraints ] in the topology file? I am assuming the latter, but I would like to confirm. Thanks.

If using constraints = all-bonds all bonds will be converted to constraints. In most cases constraints = h-bonds is enough to enable a 2 fs time step.

Thanks for confirming. What happens if I use constraints = none in the mdp file but set the constraints under [ constraints ] in the topology file? I assume the bonds under [ constraints ] will still be constrained?

Yes, that is correct.

Thanks for confirming.