-
Notifications
You must be signed in to change notification settings - Fork 88
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
What to do when rdkit.Chem.AssignStereochemistry does not add chiral code in Molecule.to_rdkit()? #196
Comments
Some potential fixes would be:
|
S and R are perceived in the sense that they're "global". CW/CCW are local in that they only look at the adjacent 4 neighbors. What exactly are you trying to do? |
So, this is a surprisingly deep issue. For for background: #146 Short version: The essential problem arises from the idea that an OFFMol has completely defined stereochemistry. After all, a person could make a stero-specific SMARTS, and we'd be expected to match it. However, while OpenEye records stereochemistry around groups like |
I see - am I correct in understanding that RDKit doesn't allow for over-specification of Stereochemistry, where as OEChem does? |
PS - CIP is poorly defined to start with. The cahn-ingold-prelog rules are pretty bullshit to start with anyways (so I'd avoid doing stuff that depends on R/S to start with). |
"over-specification" is a tricky thing to define. The two major toolkit differences are
So, one question is: Should these be "defining" features of a molecular topology in the context of an MD simulation? Inversion rates for pyramidal nitrogens are on the order of 1/microsecond, and can vary a lot depending on substituents. So, maybe. And if in doubt, yes. Another questions is: Is there physical justification for assigning different parameters due to atom (not bond) stereochemistry? Yes, if there are two or more chiral atoms in a molecule, it can have different properties. |
Yeah, I also don't like CIP. But it would take a long time to implement local stereochemistry, and we're already behind schedule. To stay on track we're going to stick with R/S. |
I'm implementing solution 1:
|
@andrrizzi Sounds good. You probably already caught this, but, when we have to do that override, make sure to do it after our last |
… RDKit cannot figure out the atom chirality.
Implemented in #209 . |
Likely related to #146 and #156 .
With certain molecules, (e.g. DrugBank_6355, which is molecule 156 in the MiniDrugBank test set) this call of
rdkit.Chem.Chem.AssignStereochemistry
results inIf the code continues, this line results in
KeyError: '_CIPCode'
.Differently from
from_rdkit()
, we already know what stereochemistry that atom should have so it doesn't make much sense to raise an exception.Is there a different way of setting the stereochemistry using S and R convention in RDKit? Alternatively, is there a way we can save the (read-only) chirality information in our
Atom
class using the CW/CCW notation alongside the S/R convention?The text was updated successfully, but these errors were encountered: