You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Loading a structure containing a porphyrin into an RDKit molecule instance and rewriting it to mol format introduces some double bonds with bond stereo 3/either
To Reproduce
In [1]: from rdkit import Chem
In [2]: print(Chem.MolToMolBlock(Chem.MolFromMolFile('./input.mol')))
Here's what's happening:
The ring bonds are all aromatic, so the fact that the stereochemistry is known is not used and they are unspecified.
The molecule is kekulized before writing it to a mol block and the writer then happily marks each of the new double bonds that are in the larger ring as unknown.
The solution is to modify the mol block writer to keep track of which bonds were originally aromatic and not write stereo tags for them. It's an easy fix.
commit 295eb87
Merge: 7e1f881d6171aa
Author: Riccardo Vianello <riccardo.vianello@gmail.com>
Date: Mon Jun 17 00:33:21 2024 +0200
Merge branch 'master' into fix/github7306
commit 7e1f881
Author: greg landrum <greg.landrum@gmail.com>
Date: Sun Jun 9 07:21:07 2024 +0200
revert one of the test changes
commit ddb982b
Author: greg landrum <greg.landrum@gmail.com>
Date: Sun Jun 9 05:52:45 2024 +0200
Fixesrdkit#7306
Do not cross bonds which were previously aromatic
Describe the bug
Loading a structure containing a porphyrin into an RDKit molecule instance and rewriting it to mol format introduces some double bonds with bond stereo 3/either
To Reproduce
input.zip
Configuration (please complete the following information):
The text was updated successfully, but these errors were encountered: