Position restraints warning in gmx grompp

GROMACS version: 2021
GROMACS modification: Yes

this is more of a ‘philosophical’ question rather than a technical one: why does gmx grompp issue a warning if the number of atoms in the -r restraints file does not match the number of atoms in the -p topology file, rather than just a note?

My understanding is that it makes perfectly sense to have only the atoms that are effectively restrained in the restraints file, and I guess I am not the only only one doing it; is the warning issued just because this is not ‘as intended’ and GROMACS fears the user is doing something wrong, or is there some deeper reason (i.e. for some reason it’s more efficient to have topology and restraints exacty matching)?

I personally think issuing a warning is preferable. The position restraint coordinates should correspond to the used atom configuration and the best way to assert that is to check that the two match one-to-one. Raising a warning also requires user intervention, whereas notes can get lost in the mountain of text that grompp prints.

Experienced (or overconfident) users can of course preempt the check with -maxwarn before running, but I like that the default errs on the side of caution.

Petter

Another way to think of it is that the -r flag provides the reference configuration of the system, to which the current state should be compared. In that sense it makes sense to represent the entire system.

Also, the most common use case is to use the starting configuration as the reference configuration, such as with most equilibration procedures. In this case, -r and -c (which must match atom counts from the topology) are typically the same file, so having a mismatch is nonsensical.

Is it really the exception rather than the rule?
I wouldn’t personally say that a mismatch is ‘nonsensical’, also because in my experience -r and -c are almost never the same configuration (they are for equilibration runs, but not for production).
But anyway, my question wasn’t really about whether it’s ‘right’ or ‘wrong’, but rather if there is any subtlety due to which a mismatch is not beneficial when actually running the thing.