Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower case symbols in SMILES for bracket atoms in aromatic rings #3697

Open
pschwllr opened this issue Jan 6, 2021 · 0 comments · May be fixed by #7428
Open

Lower case symbols in SMILES for bracket atoms in aromatic rings #3697

pschwllr opened this issue Jan 6, 2021 · 0 comments · May be fixed by #7428
Labels

Comments

@pschwllr
Copy link

pschwllr commented Jan 6, 2021

Tested with rdkit versions (2020.09 and 2020.03), python 3.7

Minimal example:

from rdkit import Chem
smi = '[Al+]1cccccccccc1'
mol = Chem.MolFromSmiles(smi)
print(Chem.MolToSmiles(mol))
# prints 'c1ccccc[al+]cccc1'

[Al+] turned into [al+] when converted to a SMILES and is not readable anymore.

It seems that atoms in an aromatic ring get a lower case symbol independent of their type.

Example PubChem entry with this problem (https://pubchem.ncbi.nlm.nih.gov/compound/71310059)

smi = 'C1=CC=C(C=C1)OC2=CC3=C4NC(=C3C=C2)NC5=C6C=C(C=CC6=C7N5[Al+]N8C(=C9C=CC(=CC9=C8NC1=C2C=CC(=CC2=C(N1)N7)OC1=CC=CC=C1)OC1=CC=CC=C1)N4)OC1=CC=CC=C1.[Cl-]'
mol = Chem.MolFromSmiles(smi)
print(Chem.MolToSmiles(mol))
#prints '[Cl-].c1ccc(Oc2ccc3c4[nH]c([nH]c5c6ccc(Oc7ccccc7)cc6c6[nH]c7[nH]c([nH]c8c9ccc(Oc%10ccccc%10)cc9c([nH]4)n8[al+]n56)c4cc(Oc5ccccc5)ccc74)c3c2)cc1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant