Hi all, I'm running some code (Python 3.7, OB 3.1) that checks the chirality, so I thought about putting to put to work the know-how that Noel put together[1,2]. After some testing, I boiled down my experience to the following code: ============================ from openbabel import openbabel as ob mol_parser = ob.OBConversion() mol_parser.SetInAndOutFormats('smi','smi') # check 1 mol = ob.OBMol() mol_parser.ReadString(mol, 'Br[C@H](F)C') ob.PerceiveStereo(mol) print("is chiral:", mol.GetAtom(2).IsChiral()) # check 2 mol = ob.OBMol() mol_parser.ReadString(mol, 'BrC(F)C') ob.PerceiveStereo(mol) print("is chiral:", mol.GetAtom(2).IsChiral()) ============================
From my understanding of Noel's docs, I was expecting that the PerceiveStereo() method would get the same result for both molecules, therefore IsChiral() would be true in the two cases. Although, only the first is true, the second is not: $ python3 test_chiral.py is chiral: True is chiral: False According to the documentation IsChiral() checks "Is this atom chiral?", and is based on OBStereoFacade.HasTetrahedralStereo(), which checks "if atom with id is a tetrahedral center". So, is atom 2 chiral in both cases? To me that's clearly true, and it is independent from the fact that its configuration is defined or not. Is this correct, or am I missing something? Thanks! S [1] https://baoilleach.blogspot.com/2020/02/ [2] https://open-babel.readthedocs.io/en/latest/Stereochemistry/stereo.html -- Stefano Forli, PhD Assistant Professor Dept. of Integrative Structural and Computational Biology, MB-112A Scripps Research 10550 North Torrey Pines Road La Jolla, CA 92037-1000, USA. tel: +1 (858)784-2055 email: fo...@scripps.edu http://www.scripps.edu/faculty/forli/ _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss