Skip to content

Commit

Permalink
proteincomponent: tweak conversions to/from openmm/rdkit
Browse files Browse the repository at this point in the history
helps with some nonstandard residues previously giving KeyError AROMATIC

will not affect serialised representations (i.e. keys) as these don't use this path
  • Loading branch information
richardjgowers committed Jul 18, 2023
1 parent 980b812 commit 8d9fb2e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gufe/components/proteincomponent.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
1: BondType.SINGLE,
2: BondType.DOUBLE,
3: BondType.TRIPLE,
app.Single: BondType.SINGLE,
app.Double: BondType.DOUBLE,
app.Triple: BondType.TRIPLE,
app.Aromatic: BondType.AROMATIC,
None: BondType.UNSPECIFIED,
}
_BONDORDERS_RDKIT_TO_OPENMM = {
Expand Down Expand Up @@ -361,7 +365,8 @@ def chainkey(m):
a1 = atom_lookup[bond.GetBeginAtomIdx()]
a2 = atom_lookup[bond.GetEndAtomIdx()]
top.addBond(a1, a2,
order=_BONDORDERS_RDKIT_TO_OPENMM[bond.GetBondType()])
order=_BONDORDERS_RDKIT_TO_OPENMM.get(
bond.GetBondType(), None))

return top

Expand Down

2 comments on commit 8d9fb2e

@dwhswenson
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I guess that making a release gets me a notification, even when you commit directly to main. 🙄

@dwhswenson
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm, I guess there was a PR, just got merged infinitely fast?

Please sign in to comment.