-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Atom ordering in AMBER improper torsions does not match LEaP #220
Comments
I think this is still an outstanding problem causing some discrepancies between OpenMM and LEaP-parameterized molecules. |
I don't believe it's possible to fix this. Last time I checked, the way Amber ordered improper torsions was not fully specified and not even internally consistent. For example, you could have the same residue appear twice in a protein, and in one residue a torsion would be ordered one way, and in the other residue it would be ordered a different way. |
@swails may have insight into this, but I thought it just involved some alphabetical sorting of torsions that could be recapitulated. It may not be worthwhile to match, however. |
Amber improper torsions are sadly done in a way that is not well-defined. The central atom comes third, and the other three are in alphabetical order by atom type. When two atoms involved in the improper torsion have the same type, the ordering becomes undefined, and indeed there are instances where leap will assign two different copies of the same ligand with different orders of impropers that are still consistent according to their sorting rules. I have plans to go into tleap and order by atom type, then order degenerate atoms by atom name, but I haven't done this yet. atom name should have been done from the beginning, since that choice does not suffer from undefined behavior (all atom names in a residue must be unique), and if you change the atom types as part of refactoring a force field, you might unknowingly change the ordering of the impropers. At the end of the day, these torsions are not rigorously derived, anyway -- they just exist to keep things planar. And they'll do that even if the order isn't exactly the same between programs. So I don't think it's a big deal. |
But didn't we find there were significant differences when running a set of OpenEye-prepped FDA-approved drugs through what was formerly |
Fun idea: Maybe we should test how much this impacts physical quantities like hydration free energies? |
@kyleabeauchamp and I are running into some weird issues with GAFF-to-ffxml conversion which seems to be due to the atom ordering in improper torsions assigned by
ForceField
not precisely matching the order they would be assigned by AmberTools LEaP. These differences result in small (but nonzero) energy differences in most cases, but make it very difficult to validate the conversion and may account for larger differences under different circumstances.Closer inspection of AmberTools LEaP code suggests that the difference may be primarily due to the fact that LEaP seems to alphabetically sort the improper torsions before applying the torsions, supposedly to "speed up" the search:
I wonder if doing this at the ffxml conversion step would be sufficient to eliminate this discrepancy, and could potentially allow you to remove some of the weird AMBER-specific juju in the assignment of impropers in
forcefield.py
.The text was updated successfully, but these errors were encountered: