Hi all,

I was using the (relatively) new Chem.FindPotentialStereo() functionality
and was wondering how to set chiral tags on atoms with the new descriptors.
I couldn't find a function to do this, so I tried a workaround by using the
'old' SetChiralTag() function (see code below). However, the definitions of
these two descriptors don't always match, leading to changes in
stereochemistry. Is there a function to set chiral information with the new
descriptors?

Any help would be appreciated!

Cheers, Kas

>>> import rdkit
>>> from rdkit import Chem
>>> print("rdkit version " + rdkit.__version__)
rdkit version 2021.03.1
>>> mol1 = Chem.MolFromSmiles("C[C@@]12[C@](CCCC2)([H])CCCC1")
>>> mol2 = Chem.MolFromSmiles("CC12C(CCCC2)CCCC1")
>>>
>>> si = Chem.FindPotentialStereo(mol1)
>>> for element in si:
...     print(f'  Type: {element.type}, Which: {element.centeredOn},
Specified: {element.specified}, Descriptor: {element.descriptor} ')
...
...     atom = mol2.GetAtomWithIdx(element.centeredOn)
...     if element.descriptor == Chem.StereoDescriptor.Tet_CCW:
...         atom.SetChiralTag(Chem.ChiralType.CHI_TETRAHEDRAL_CCW)
...     elif element.descriptor == Chem.StereoDescriptor.Tet_CW:
...         atom.SetChiralTag(Chem.ChiralType.CHI_TETRAHEDRAL_CW)
...
  Type: Atom_Tetrahedral, Which: 1, Specified: Specified, Descriptor:
Tet_CCW
  Type: Atom_Tetrahedral, Which: 2, Specified: Specified, Descriptor: Tet_CW
>>> print(Chem.MolToSmiles(mol1) + "\n" + Chem.MolToSmiles(mol2))
C[C@]12CCCC[C@@H]1CCCC2
C[C@]12CCCC[C@H]1CCCC2
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to