Hello everyone,

 I was trying to filter through the SMILES with missing stereochemistry
information. So I am using the below script to loop over the atoms and
check if the atom is a chiral center and if so, is the stereochemistry
information there or not.

mol = pybel.readstring('smi', smi)
>                 facade = ob.OBStereoFacade(mol.OBMol)
>                 for atom in mol:
>                         idx = atom.OBAtom.GetIdx()-1
>                         if facade.HasTetrahedralStereo(idx) and not
> facade.GetTetrahedralStereo(idx).GetConfig().specified:

It works for many cases, but I have figured out that in many cases like the
attached picture, though the stereochemistry of nitrogen is presented, it
will still get marked as none
(facade.GetTetrahedralStereo(idx).GetConfig().specified returns False). I
have scanned over 700k molecules and figured out that this happens to only
nitrogens that are in the ring. Just wanted to report this and ask if
anyone had a similar issue.

[image: Inline image 1]
OpenBabel-discuss mailing list

Reply via email to