|
From: S J. S. <swa...@gm...> - 2006-06-30 18:45:48
|
Geoff,
So here is an interactive session which displays the unusability of
OBTypeTable: I think the problem lyes in the Translate method. It
should be rerwapped ot take a single int as input and return a string
or throw an exception.
Josh
===========================
>>> import openbabel
>>> ttab=openbabel.OBTypeTable()
>>> ttab.SetToType("SYB")
True
>>> ttab.SetFromType("INT")
True
>>> ttab.Translate(1)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/dock/linux/lib/python2.4/site-packages/openbabel.py",
line 188, in Translate
def Translate(*args): return _openbabel.OBTypeTable_Translate(*args)
NotImplementedError: No matching function for overloaded 'OBTypeTable_Translate'
>>> ttab.Translate(1,1)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/dock/linux/lib/python2.4/site-packages/openbabel.py",
line 188, in Translate
def Translate(*args): return _openbabel.OBTypeTable_Translate(*args)
NotImplementedError: No matching function for overloaded 'OBTypeTable_Translate'
>>> ttab.Translate('1','1')
==============================
*** Open Babel Warning in Translate
Cannot perform atom type translation: table cannot find requested types.
False
On 6/30/06, Geoffrey Hutchison <ge...@ge...> wrote:
>
> On Jun 29, 2006, at 6:50 PM, S Joshua Swamidass wrote:
>
> > How are we to use OpenBabel::OBTypeTable in python?
> >
> > It seems as if the wrapper is broken.
>
> As I don't use Python much myself, I think you'll have to be a bit
> more specific. What did you try to do that didn't work? What version
> of the wrapper (and Open Babel) are you using?
>
> Thanks,
> -Geoff
>
|