SimTk/openmm — pull request #549 by swails (2014-07-21 20:28:51+00:00)
Title: Add NBFIX support to CHARMM parsers

This adds support for CHARMM NBFIX adjustments in the CHARMM parsers. Some notes:

1. It uses a `CustomNonbondedForce` with a 2D lookup table for the Lennard-Jones coefficients IFF NBFIX adjustments are detected. Otherwise, everything is handled via the `NonbondedForce`.
2. The 1-4 exceptions are handled via `NonbondedForce`.
3. The long range correction is turned on by default to match the default behavior for `NonbondedForce` (and the switch is handled in a compatible way as well).
4. Atom types are condensed so that the lookup tables are almost* as small as possible.

*No types with an "NBFIX" attached to it are compressed since the NBFIXes are stored as dicts paired with the atom type name. This could possibly be optimized if two atom types have the same NBFIXes, but the bookkeeping gets complex in this case. There are not many NBFIX modifications in CHARMM36, though, so this is very unlikely to hurt performance very much.