assertion failure in grompp
When having an mdp option with both old and current name present in an mdp file, e.g. verlet-buffer-drift and verlet-buffer-tolerance, an assertion fails in grompp.
Program: gmx grompp, version 2018.1-dev-20180116-35654e9af
Source file: src/gromacs/utility/keyvaluetreebuilder.h (line 417)
Function: std::map<std::basic_string<char>, gmx::KeyValueTreeValue>::iterator gmx::KeyValueTreeObjectBuilder::addProperty(const string&, gmx::KeyValueTreeValue&&)
Duplicate key value
Add check in grompp to avoid assertion failure
With an mdp file with a parameter present with both the current name
and the old name which automatically gets replaced, an assertion
would fail. Now a fatal error is issued.
#4 Updated by Mark Abraham over 2 years ago
I think that the correct behaviour here should be to reject the mdp file, telling the user that their input is inconsistent. We should not be guessing that they got the value right for the current name.
I'd further suggest that even if the value is the same for both names, we should still reject the mdp file because there's likely to be something going on that warrants the user inspecting their file.