SimTk/openmm — pull request #179 by swails (2013-10-19 17:55:03+00:00)
Title: Implement GBn2 (same as igb==8 in Amber), a significantly improved GB model

The commit logs contain the necessary information. This commit also improves the robustness of the Amber integration with OpenMM. Since AmberTools 12, the atomic number of each atom was stored in the topology file, so when this information is available the elements of the atoms in the Topology instance are set from this information instead of the error-prone way of trying to 'guess' the element from the atom name.

This commit also fixes a couple subtle bugs that would occur if a user tried to use the same AmberPrmtopFile class to create 2 different systems using different GB models. First, the GB parameters were cached rather than being regenerated each time getGBParms() was called, meaning that systems using the GBn and OBC1/OBC2/HCT models could not be correctly instantiated by calling createSystem() on the same AmberPrmtopFile object (but it would just use the wrong parameters rather than bombing out with an error). Even after this caching was removed, the GBn parameter determination actually overwrote the data stored in prmtop._raw_data['SCREEN'], meaning that any attempt to access the original SCREEN values after getGBParms was called for the GBn model would (silently) return the wrong values.