Skip to content

Instantly share code, notes, and snippets.

@GeauxEric
Created May 7, 2016 02:00
Show Gist options
  • Save GeauxEric/7d350d2bbffe1ea4542ea199837586ff to your computer and use it in GitHub Desktop.
Save GeauxEric/7d350d2bbffe1ea4542ea199837586ff to your computer and use it in GitHub Desktop.
atom name between INT and SYB in pybel
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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment