Open j-wags opened 4 years ago
I'm able to reproduce this on my computer with the latest Toolkit version.
This is probably a general chemical perception problem (not specific to Angles -- AngleHandler just runs first and thus is the first to report the exception).
My current prime suspect is aromaticity. There may be something weird going on with Histidine's side chain, such that it's perceived differently when we load it to generate the SMARTS vs. when we load it to parameterize the molecule.
This bug reproduces when I only make an OFFXML for MainChain/HID
, and then try to parameterize the same.
The OFFXML reports the following SMARTS:
<Atom smirks="[H]C1=C([N:1](C(=N1)[H])[H])C([H])([H])[C@@]([H])([C]=O)[N][H]" epsilon="0.16999999991766696 * mole**-1 * kilocalorie" id="MainChain-HID_NA" sigma="3.2499985240310356 * angstrom"></Atom>
The parameterization reports the following OFFMol.to_smiles
output:
[H]C1=C(N(C(=N1)[H])[H])C([H])([H])[C@@]([H])(C(=O)N([H])C([H])([H])[H])N([H])C(=O)C([H])([H])[H]
I think I've fixed this by forcing the SMARTS and molecule to have their aromaticity re-perceived using the same aromaticity model in OpenEyeToolkitWrapper.find_smarts_matches
.
Working on this in the OFF Toolkits stereo_smarts_search
branch
https://github.com/openforcefield/openforcefield/pull/649
Until then, we should use a development build of the OpenFF toolkit, tuned to the stereo-smarts-search
branch when running the FF porting workflow.
This is blocked by an external dependency -- It will be resolved when the above-cited PR is merged and released in a stable OFFTK package.
https://github.com/openforcefield/openforcefield/pull/649 has been merged, but isn't yet in a stable release.
David Cerutti 22:38 Testing the script for computing energies, it is now getting stuck at HID, HIE, and HIP. I have commented those out and the thing picks up right at ILE, then LEU, up to TRP (thought so!) which again hits a snag. The complaint is that AngleHandler (always angle related) cannot find relevant valence terms. For TRP:
22:39 The rest seem fine.