-
Notifications
You must be signed in to change notification settings - Fork 892
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
AssignStereochemistry is removing valid cis/trans bond stereo #2404
Comments
Try:
print(Chem.MolToSmiles(mol, isomericSmiles=True))
I think this is the default now, but it didn’t use to be.
----
Brian Kelley
… On Apr 11, 2019, at 5:58 PM, yphillip ***@***.***> wrote:
Description:
I am having similar issues to what was presented in #1614 where AssignStereochemistry seems to be removing valid CIS/TRANS stereochemistry from a double bond.
RDKit Version:2018.09.1.0
mol = Chem.MolFromSmiles('CC(Cl)=CF')
mol.GetBondWithIdx(2).SetStereoAtoms(2,4)
mol.GetBondWithIdx(2).SetStereo(Chem.BondStereo.STEREOTRANS)
print(Chem.MolToSmiles(mol))
Chem.AssignStereochemistry(mol, force=True, cleanIt=True)
print(Chem.MolToSmiles(mol))
........
C/C(Cl)=C\F
CC(Cl)=CF
Additionally, I am able to still recapitulate the original problem presented in #1614, namely:
m = Chem.MolFromSmiles('CC(F)=CC(Cl)C')
m.GetAtomWithIdx(4).SetChiralTag(Chem.ChiralType.CHI_TETRAHEDRAL_CW)
assert m.GetBondWithIdx(2).GetBondType() == Chem.BondType.DOUBLE
m.GetBondWithIdx(2).SetStereoAtoms(2, 4)
m.GetBondWithIdx(2).SetStereo(Chem.BondStereo.STEREOCIS)
smi = Chem.MolToSmiles(m, True)
print(smi)
Chem.AssignStereochemistry(m)
print(Chem.MolToSmiles(m, True))
Chem.AssignStereochemistry(m, cleanIt=True)
print(Chem.MolToSmiles(m, True))
Chem.AssignStereochemistry(m, force=True)
print(Chem.MolToSmiles(m, True))
Chem.AssignStereochemistry(m, cleanIt=True, force=True)
print(Chem.MolToSmiles(m, True))
...
***@***.***(C)Cl
***@***.***(C)Cl
***@***.***(C)Cl
***@***.***(C)Cl
***@***.***(C)Cl
In the final line, the valid CIS/TRANS stereochemistry gets removed.
Is this bug still present? Or maybe have I misunderstood something? Thanks for the help.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hmm, still getting the same behavior.
|
I think that
|
That's good insight, d-b-w, thanks for that. There's a thread in the mailing list that discusses the different ways double bond stereochem is handled: https://sourceforge.net/p/rdkit/mailman/message/36484682/. My impression from that thread is there might still be some bugs with using STEREOTRANS/STEREOCIS to set double bond stereochemistry. |
Heh, I responded to that thread... Also I posted https://sourceforge.net/p/rdkit/mailman/message/36635528/ more recently about issues specifically with reactions. |
I think the current behavior of Of course this is one of those things where fixing it may open a giant can of worms and result in me immediately deciding that it's "by design". ;-) |
The historical reason this happens is because the old |
This issue was marked as stale because it has been open for 90 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Description:
I am having similar issues to what was presented in #1614 where AssignStereochemistry seems to be removing valid CIS/TRANS stereochemistry from a double bond.
Additionally, I am able to still recapitulate the original problem presented in #1614, namely:
In the final line, the valid CIS/TRANS stereochemistry gets removed.
Is this bug still present? Or maybe have I misunderstood something? Thanks for the help.
The text was updated successfully, but these errors were encountered: