Skip to content

Force field optimization fix#39

Open
erm42 wants to merge 3 commits into
masterfrom
ff_patch
Open

Force field optimization fix#39
erm42 wants to merge 3 commits into
masterfrom
ff_patch

Conversation

@erm42

@erm42 erm42 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Taking advantage of the more robust RDKit mol object builder from PR #36 , I clean up the generation of INCHI keys (yarp/yarpecule/yarpecule.py -> self.get_inchi()) and attempt to make a quick fix for issue #31

Overview of changes:

  • Generate INCHI keys via RDKit mol object. This avoids the need to write a temporary MOL file to disk. Turns out, also, you don't need the geometry in order to generate the INCHI key, at least not the first 14 characters, which is all that we care about
  • Quick bug fix in the helper/read_pkl.py script (pretty sure I broke this in PR Pre-enum filter: product blinders #29 )
  • Added FF opt functions for both RDKit and Open Babel in yarp/util/ folder
  • Updated the quick_geom_opt() function in yarp/reaction/generate_rxns.py to first attempt to form the product geometry using RDKit, then fall back to Open Babel if RDKit changes the connectivity of the product. If neither RDKit nor Open Babel can form a valid product with UFF, we throw the reaction out (verbose messages should trigger)
  • Added testing cases for 3 molecules, two of which fail for RDKit/pass for Open Babel FF optimizations, and one which fails for Open Babel/passes for RDKit.

erm42 added 3 commits June 26, 2026 11:33
- attempt to use rdkit, then fall back to (more reliable) open babel
- add checks for preserved connectivity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant