From a49cbbcc2c277ff3ed37995aa55c8514c745ef8c Mon Sep 17 00:00:00 2001 From: ChayaSt Date: Wed, 15 May 2019 20:21:11 -0400 Subject: [PATCH 1/2] perceive stereo before checking for missing stereo --- cmiles/_cmiles_oe.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmiles/_cmiles_oe.py b/cmiles/_cmiles_oe.py index 2f1775f..9adc8f7 100755 --- a/cmiles/_cmiles_oe.py +++ b/cmiles/_cmiles_oe.py @@ -359,6 +359,8 @@ def has_stereo_defined(molecule): # perceive stereochemistry oechem.OEPerceiveChiral(molecule) + oechem.OE3DToAtomStereo(molecule) + oechem.OE3DToBondStereo(molecule) unspec_chiral = False unspec_db = False From 868d5220a1fdba540485b5746eccf7e904e80680 Mon Sep 17 00:00:00 2001 From: ChayaSt Date: Wed, 15 May 2019 21:20:59 -0400 Subject: [PATCH 2/2] check if conformer is a molecule --- cmiles/_cmiles_oe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmiles/_cmiles_oe.py b/cmiles/_cmiles_oe.py index 9adc8f7..62b9fe3 100755 --- a/cmiles/_cmiles_oe.py +++ b/cmiles/_cmiles_oe.py @@ -302,7 +302,7 @@ def get_map_ordered_geometry(molecule, atom_map): if not molecule.GetDimension() == 3: raise RuntimeError("Molecule must have 3D coordinates for generating a QCSchema molecule") - if isinstance(molecule, oechem.OEMolBase): + if isinstance(molecule, oechem.OEMol): if molecule.GetMaxConfIdx() != 1: raise Warning("The molecule must have at least and at most 1 conformation")