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]


----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl

2016-04-13 19:13 GMT+02:00 Yun Ding <ydi...@lsu.edu>:

> 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
>
>
> ```
>
> import pybel
>
>
> lig = pybel.readfile('sdf', "xxx.sdf").next()
>
> types = [a.type for a in lig.atoms]
>
> ```
>
>
> Thanks!
>
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications
> Manager
> Applications Manager provides deep performance insights into multiple
> tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to