schrodinger / coordgenlibs

Schrodinger-developed 2D Coordinate Generation
BSD 3-Clause "New" or "Revised" License
42 stars 28 forks source link

Distorted depiction #97

Open ptosco opened 3 years ago

ptosco commented 3 years ago

I found a combination of ring systems that yields a distorted depiction:

from rdkit import Chem
from rdkit.Chem import rdDepictor

rdDepictor.SetPreferCoordGen(True)
Chem.MolFromSmiles("CC1C2CCC1CC(c1cccc3cc(-c4ccc5cccc(S)c5c4)sc13)C2")

image

Interestingly, removing either the methyl or the thiol groups yields a non-distorted depiction.

ZontaNicola commented 3 years ago

Thanks! I can reproduce this. I wonder if the methyl somehow interfers with a template for that ring system. @rachelnwalker is it possible to get an idea of what happens during the minimizatino step of this molecule?

rachelnwalker commented 3 years ago

This is interesting! @ZontaNicola, here are the animations (sorry about the mirrored coordinates)

Fragment DOF minimization stage:

https://user-images.githubusercontent.com/39069546/120018608-40ecdb80-bf9c-11eb-8e7e-be5cd26ce352.mp4

FF Minimization stage:

https://user-images.githubusercontent.com/39069546/120018642-5104bb00-bf9c-11eb-9210-4d5084f620df.mp4

d-b-w commented 3 years ago

ooh, that's very exciting. It looks like the dof step freaked out about the 1-0 and 3-4 bonds crossing.

ZontaNicola commented 3 years ago

wow so interesting, thanks! It looks like the shape of the fragment changed from having the 1 atom as a bridge to having 3-4 as a bridge but somehow the coordinates weren't updated somewhere so the connection to the rest of the molecule is wrong... looks like the work of a CoordgenFlipRingDOF

ZontaNicola commented 3 years ago

I disabled this kind of DoFs (I understand the problem but I don't think it's worth fixing at this stage). attaching a pic

PR will follow

Screenshot 2021-06-01 at 17 11 58
ptosco commented 3 years ago

@ZontaNicola I found another one in the same vein, again with a bridged system, in case you wish to check it against your fix:

from rdkit import Chem
from rdkit.Chem import rdDepictor

rdDepictor.SetPreferCoordGen(True)
Chem.MolFromSmiles("c1ccc(CC2CCC3CCC2N3C)cc1")

image

Thanks a lot!

ZontaNicola commented 3 years ago

Thank you, @ptosco! here's what it looks like for me now

Screenshot 2021-07-08 at 18 04 38
ptosco commented 3 years ago

@ZontaNicola Thanks for the super quick reply! Great to hear that, you are awesome!

ZontaNicola commented 3 years ago

^_^