I just filed a bug report on about a possible bug [1] in the IsEster() function in OBBond. What I found is that IsEster() is true if there's a free carboxy group (i.e., no ester present). The bug report page has "eaten" the code formatting of the Python test, so I'm posting it here too, just in case. ============ import pybel ob = pybel.ob smi = [ 'OC(=O)', 'CC(O)=O', 'O=C(O)c1ccccc1'] for s in smi: mol = pybel.readstring('smi',s).OBMol for b in ob.OBMolBondIter(mol): if b.IsEster(): print "FOUND ESTER BOND" ============== By reading the online documentation, the function description seems to hint at an insufficient criterion, since the condition checked ("Is the bond an ester link (i.e., between a carbonyl C and an O)?") doesn't account for the portion that's establishing the bond (i.e., if it's not an alcohol, it's not an ester). [1] https://sourceforge.net/p/openbabel/bugs/970/
-- Stefano Forli, PhD Assistant Professor of Integrative Structural and Computational Biology, Molecular Graphics Laboratory Dept. of Integrative Structural and Computational Biology, MB-112F The Scripps Research Institute 10550 North Torrey Pines Road La Jolla, CA 92037-1000, USA. tel: +1 (858)784-2055 fax: +1 (858)784-2860 email: fo...@scripps.edu http://www.scripps.edu/~forli/ ------------------------------------------------------------------------------ _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel