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

Bad coordinates for some very ring-y structures #83

Open
d-b-w opened this issue Mar 16, 2021 · 0 comments
Open

Bad coordinates for some very ring-y structures #83

d-b-w opened this issue Mar 16, 2021 · 0 comments

Comments

@d-b-w
Copy link
Collaborator

d-b-w commented Mar 16, 2021

This issue: rdkit/rdkit#3491 reports that coordgen gives pretty bad coordinates (lots of clashes or very long bonds) for a couple of molecules.

from rdkit import Chem
from rdkit.Chem import rdDepictor
from rdkit.Chem.Draw import IPythonConsole
# following SMILES seems good without SetPreferCoordGen option.
smi = 'C12CC3CC(CC3C1)C2'
ring = Chem.MolFromSmiles(smi)
rdDepictor.SetPreferCoordGen(False)
ring

ring = Chem.MolFromSmiles(smi)
rdDepictor.SetPreferCoordGen(False)
ring

looks like:
bad1

Another example:

 from rdkit.Chem import rdDepictor
 from rdkit.Chem import rdCoordGen
 
def get_image(smiles):
 mol = Chem.MolFromSmiles(smiles, sanitize=True)
 rdDepictor.SetPreferCoordGen(True)
 rdCoordGen.AddCoords(mol)
 rdDepictor.Compute2DCoords(mol)
 return mol

molec = 'C1=CC=C(N(C2=CC=CC=C2)C2=CC3=C4B(C5=CC=CC=C5N3C3=CC=CC=C3)C3=C(C=C5C(=C3)B3C6=C(C=CC=C6)N(C6=CC=CC=C6)C6=CC(N(C7=CC=CC=C7)C7=CC=CC=C7)=CC(=C36)N5C3=CC=CC=C3)N(C3=CC=CC=C3)C4=C2)C=C1'
m = get_image(molec)
m

bad2

This is tracked in schrodinger's internal bug tracker as https://jira.schrodinger.com/browse/CRDGEN-271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant