Re: [Open Babel] set the atom type in python interface

2016-04-13 Thread Maciek Wójcikowski
Hi, Here you go: from openbabel import OBAtomAtomIter,OBTypeTable # setup typetable to translate atom types typetable = OBTypeTable() typetable.SetFromType('INT') typetable.SetToType('SYB') lig = pybel.readfile('sdf', "xxx.sdf").next() types = [typetable.Translate(a.type) for a in lig.atoms]

[Open Babel] set the atom type in python interface

2016-04-13 Thread Yun Ding
Dear all, I would like to get the SYB type of the atom using the python interface, however, it always gives the INT type, how can I set it to be SYB type? By studying the C++ code I know how to do it in C++. But using python is much more convenient for me. So far my code is like ```