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:
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: