Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Oct 2014 19:12:14 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 194599] New: OpenBabel 2.3.2 Python binding pybel does not recognize supported formats
Message-ID:  <bug-194599-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194599

            Bug ID: 194599
           Summary: OpenBabel 2.3.2 Python binding pybel does not
                    recognize supported formats
           Product: Ports Tree
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: Needs Triage
          Severity: Affects Only Me
          Priority: Normal
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs@FreeBSD.org
          Reporter: ftorazyne@mail.ru

Function readstring() from OpenBabel 2.3.2 Python binding pybel does not
recognize any supported format - 'smi','pdb' etc. Code like a

import pybel 
mymol=pybel.readstring('smi','CCOC(=O)C') 
mymol.addh() 
mymol.make3D() 
print mymol.write(format='mol2') 

receives this error: 

Traceback (most recent call last): 
 File "./test.py", line 6, in <module>
 mymol=pybel.readstring('smi','CCOC(=O)C') 
 File "/usr/local/lib/python2.7/site-packages/pybel.py", line 179, in
readstring 
 raise ValueError("%s is not a recognised Open Babel format" % format) 
ValueError: smi is not a recognised Open Babel format 

But pybel.informats contain 'smi' key: 

>>> import pybel 
>>> print sorted(pybel.informats) 
['CONFIG', 'CONTCAR', 'HISTORY', 'POSCAR', 'VASP', 'abinit', 'acesout', 'acr',
'adfout', 'alc', 'arc', 'axsf', 'bgf', 'box', 'bs', 'c09out', 'c3d1', 'c3d2',
'caccrt', 'can', 'car', 'castep', 'ccc', 'cdx', 'cdxml', 'cif', 'ck', 'cml',
'cmlr', 'crk2d', 'crk3d', 'ct', 'cub', 'cube', 'dat', 'dmol', 'dx', 'ent',
'fa', 'fasta', 'fch', 'fchk', 'fck', 'feat', 'fhiaims', 'fract', 'fs', 'fsa',
'g03', 'g09', 'g92', 'g94', 'g98', 'gal', 'gam', 'gamess', 'gamin', 'gamout',
'got', 'gpr', 'gro', 'gukin', 'gukout', 'gzmat', 'hin', 'inchi', 'inp', 'ins',
'jout', 'log', 'mcdl', 'mcif', 'mdl', 'ml2', 'mmcif', 'mmd', 'mmod', 'mol',
'mol2', 'mold', 'molden', 'molf', 'moo', 'mop', 'mopcrt', 'mopin', 'mopout',
'mpc', 'mpo', 'mpqc', 'mrv', 'msi', 'nwo', 'out', 'outmol', 'output', 'pc',
'pcm', 'pdb', 'pdbqt', 'png', 'pos', 'pqr', 'pqs', 'prep', 'pwscf', 'qcout',
'res', 'rsmi', 'rxn', 'sd', 'sdf', 'smi', 'smiles', 'sy2', 't41', 'tdd',
'text', 'therm', 'tmol', 'txt', 'txyz', 'unixyz', 'vmol', 'xml', 'xsf', 'xyz',
'yob']

It was established in discussion at OpenBabel forum
(http://forums.openbabel.org/Error-in-Pybel-readstring-smi-format-not-recognized-td4657776.html)
that function OBConversion.SetInFormat from openbabel.py returns "False" for
any format specificator whenever it is supported or not.

I should underline, that OpenBabel was installed from port, i.e. was compilied
from sources at my machine, and I do not use any pre-compilied OpenBabel
binaries. I used gcc4.2 and gcc4.8.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-194599-13>