-
Notifications
You must be signed in to change notification settings - Fork 23
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
Test intramolecular interactions in polycyclic systems with Amber #900
Conversation
Working through a funky ring-like molecule, trying to keep hydrogens off to make the files almost human-legible: In: ForceField("openff-2.1.0.offxml").create_interchange(
Molecule.from_smiles(
"C1#CC#CC#C1",
).to_topology()
).to_prmtop("tmp") Out: Just the relevant bit:
In the dihedrals section, there are a total of 6 dihedrals, covering the forward direction 0-1-2-3, 1-2-3-4, 2-3-4-5 and the backwards direction 0-5-4-3, 1-0-5-4, 5-0-1-2. The 1-4 pairs are 0-3, 1-4, 2-5; the second time a dihedral is listed, the third atom has a negative sign on it. (In this case no third atoms are index 0, conveniently or by rearrangement, I'm not sure). This all seems accurate with respect to what's documented. (To get from the internal to Amber index in this section, just multiply by three, these are indices into an array of dihedral parameters.) Working through the exclusions, now: all intramolecular pairs should have their interactions zeroed out (1-2, 1-3) or scaled (1-4). Nothing in this bond graph is farther than three nodes away when considering minimum distances. If
Note that Amber only lists That all seems fine to me. For good measure, I ran it through OpenMM to ParmEd In [1]: from openff.toolkit import *
In [2]: import parmed
In [3]: topology = Molecule.from_smiles( "C1#CC#CC#C1",).to_topology()
In [4]: !rm parmed.prmtop
In [5]: parmed.openmm.load_topology(
...: topology=topology.to_openmm(),
...: system=ForceField("openff-2.1.0.offxml").create_openmm_system(topology),
...: ).save("parmed.prmtop") and got a file that treats these sections identically: https://gist.github.com/mattwthompson/4cc00f9257a53a261322fcff416102f8
Something's quite wrong, still. Running a larger molecule through the machinery shows that vdW energies differ with larger polycyclic rings, something like 0.2 kJ/mol/ring. This would explain why @Yoshanuikabundi is seeing horrible results with NADP
(The extra output in the middle is a raw print of the As another check I thought it's be useful to look at a long alkane, maybe isolating if this is a problem with rings or not. It appears to just be a problem everywhere:
|
Here's a representative input file (not sure the jargon, it's what I pass through to
|
A helpful commenter points out that Amber uses the same exclusion policy for electrostatics and vdW interactions; so, given that the electrostatics energies match decently well, that's probably not the culprit. On a whim I decided to see what happens when I turn off the switching function and, well, that seems to fix it. So #470 lives, and the switching function needs to be looked into more. |
Description
#688
Checklist