snurr-group / mofid

A system for rapid identification and analysis of metal-organic frameworks
https://snurr-group.github.io/mofid/
GNU General Public License v2.0
46 stars 24 forks source link

Inconsistent aromaticity of N-heterocycles #8

Open bbucior opened 5 years ago

bbucior commented 5 years ago

Certain heterocyclic compounds can yield unexpected SMILES in the upstream Open Babel library. For example, the code does not correctly assign bond orders to L_13 in the ToBaCCo MOFs. This effect occurs inconsistently, sometimes leading to multiple copies of the same linker with slightly different SMILES due to different bond orders or the introduction of radical notation.

Even if the bug is fixed upstream, I suspect the presence of charged organic molecules may exacerbate the issue. Currently, framework.cpp assigns formal charges to the carboxylate and certain rings after the bond orders are detected. Aromaticity detection may be improved if the overall partial charge is assigned before running OBMol::PerceiveBondOrders, for example by using the number/location of coordinated metals.

These are some potentially relevant issues on the upstream project for reference: