coordgenlibs icon indicating copy to clipboard operation
coordgenlibs copied to clipboard

Distorted depiction

Open ptosco opened this issue 3 years ago • 9 comments

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.

ptosco avatar May 28 '21 15:05 ptosco

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?

ZontaNicola avatar May 28 '21 16:05 ZontaNicola

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

rachelnwalker avatar May 28 '21 17:05 rachelnwalker

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

d-b-w avatar May 28 '21 18:05 d-b-w

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 avatar May 29 '21 06:05 ZontaNicola

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

ZontaNicola avatar Jun 01 '21 15:06 ZontaNicola

@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!

ptosco avatar Jul 08 '21 15:07 ptosco

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

Screenshot 2021-07-08 at 18 04 38

ZontaNicola avatar Jul 08 '21 16:07 ZontaNicola

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

ptosco avatar Jul 08 '21 16:07 ptosco

^_^

ZontaNicola avatar Jul 08 '21 16:07 ZontaNicola