The shortest path to do this is to have it rely on the OFFMol class, and make the cheminformatics calls toolkit-agnostic.
Some of the functionality that we need is already implemented. There are some outstanding ones that need to be implemented.
We need a replacement for OE’s AtomBondSet object. It’s probably possible to do this using networkx graphs, but there’s some ambiguity about how stereochemistry will be preserved/interpreted without coordinates
We’ll need an RDKit-backed atom/bond.is_in_ring, but this shouldn’t be too hard
Maybe SMARTS syntax using rN can do this? Or does that only check for specific values of N?
Maybe there’s also some method call involving SSSR that can do this?
Maybe NetworkX can do this? find_cycles or something?
Are there some cycle sizes that are ignored or treated specially by OETK or fragmenter? What about 3- or 4-membered rings?
It’s possible we’ll need a way to force stereochemistry re-perception on command, but it’s unclear how exactly this will be used, since the networkx graphs won’t have coordinates.
Operational notes:
We’ll do this refactor in a large branch/PR of fragmenter and add new functionality in a large branch of OFFTK.
Priority
This is less important than the MVP for bespoke fitting.
Other issues:
Check on whether chemper ring-closing issue is still around/affects bespoke fitting pipeline. One possible wayt o do this is to take Jeff’s error case and see whether all torsion terms are fit using forcebalance, or if some torsions involving ring-closing bonds are ignored
0 Comments