Grompp shows no warning when reading redundant dih. parameters for the same atomtype from different .itp files.
If more than one file #included in the .top define parameters for the same type 9 dihedral, grompp throws no warning about overriding these parameters. Thus, the parameters effectively being used in the run are unclear to the user. grompp only throws warnings when the repeated dihedrals are on the same file.
As a minimal working example consists in #including in a .top twice the same file, which contains [ dihedraltypes ] directives with type 9 dihedrals in it.
Running grompp with a .top file constructed that way only throws warnings when the dihedrals are repeated in the same file.
The expected behavior (according to the documentation and the warning text) would be a warning that all dihedral definitions are being overriden when reading the second copy of the #include, since they are type 9 dihedrals involving the same 4 atomtypes in non-adjacent lines.
The attached tarball contains a charmm forcefield directory and a ddt.prm file defines a few dhedraltypes as type 9. The ddt.top file includes the ddt.prm file and then its identical copy ddt2.prm. Running grompp -f em.mdp -c cube.gro -p ddt.top throws two warnings. Commenting out the second and third multiplicities of the given dihedral eliminates the warnings.
Disallow overwriting of dihedral type 9
It is no longer allowed to repeat blocks of parameter of multiple
lines for dihedrals of type 9. It is also no longer allowed to
override parameters or dihedrals of type 9. Both are too complex
to properly check. It is still allowed to repeat parameters blocks
consisting of a single line.
Repeating a block with the same parameters would lead to incorrect
dihedral potentials and forces.
Fixed bug in arrayref.h interfaces.
#1 Updated by Berk Hess over 3 years ago
- Status changed from New to Accepted
The expected behavior would actually be no warnings at all, as grompp does not warn when parameters are listed multiple times with exactly the same values. The real issue here is that including the file twice leads to different dihedral parameters.
The construct of assigning multiple parameter lines to the same dihedral is asking for trouble...