openforcefield / openff-qcsubmit

Automated tools for submitting molecules to QCFractal
https://openff-qcsubmit.readthedocs.io/en/latest/index.html
MIT License
26 stars 4 forks source link

Deduplication inchi check vs aromaticity #255

Closed lilyminium closed 4 months ago

lilyminium commented 5 months ago

The deduplication check hashes molecules via inchikey, then tries to remap them via an isomorphism check. Unfortunately structures like the below have the same inchikey, but different bond orders/aromaticity perception, so this raises an assertion error here: https://github.com/openforcefield/openff-qcsubmit/blob/2fa465a87ffea4c5b02d5d0cd8622d1a22d4fe83/openff/qcsubmit/workflow_components/utils.py#L713-L723

In this particular case, adding aromatic_matching=False to the are_isomorphic check did fix it for me.

Screenshot 2024-01-30 at 8 51 13 pm Screenshot 2024-01-30 at 8 51 16 pm
jthorton commented 5 months ago

Ah another one for the ever-growing list of deduplication edge cases which is where the formal charge and bond order matching settings come from. I think your solution should be fine generally as this check is only ran if the inchi matches!

mattwthompson commented 4 months ago

This is hopefully caught by #260