SMILES with positively charged carbon not round trip-able through SDF #1229

Open
coleb opened this Issue Dec 22, 2016 · 0 comments

Projects

None yet

1 participant

@coleb
Contributor
coleb commented Dec 22, 2016
smi='O=[C+]1=NC=Nc2[nH]nc(Br)c21'
mol=Chem.MolFromSmiles(smi, sanitize=True)
assert mol is not None
sdf=Chem.MolToMolBlock(mol)
m2=Chem.MolFromMolBlock(sdf)
assert m2 is not None

MolFromMolBlock throws this warning:

RDKit ERROR: [09:59:39] Explicit valence for atom # 1 C greater than permitted

Which isn't entirely correct since the carbon is properly marked positively charged in the SDF file with this line:

M  CHG  1   2   1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment