Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smi is not a recognised Open Babel format #1898

Open
yurivict opened this issue Oct 14, 2018 · 1 comment
Open

smi is not a recognised Open Babel format #1898

yurivict opened this issue Oct 14, 2018 · 1 comment

Comments

@yurivict
Copy link

yurivict commented Oct 14, 2018

This script fails:

import pybel
mymol=pybel.readstring('smi','CCOC(=O)C')
mymol.addh()
mymol.make3D()
print mymol.write(format='mol2')
Traceback (most recent call last):
  File "x.py", line 3, in <module>
    mymol=pybel.readstring('smi','CCOC(=O)C') 
  File "/usr/local/lib/python2.7/site-packages/pybel.py", line 199, in readstring
    raise ValueError("%s is not a recognised Open Babel format" % format)
ValueError: smi is not a recognised Open Babel format

But when queried, it says that smi is supported:

import pybel
print sorted(pybel.informats)
['CONFIG', 'CONTCAR', 'CONTFF', 'HISTORY', 'MDFF', 'POSCAR', 'POSFF', 'VASP', 'abinit', 'acesout', 'acr', 'adfout', 'alc', 'aoforce', 'arc', 'axsf', 'bgf', 'box', 'bs', 'c09out', 'c3d1', 'c3d2', 'caccrt', 'can', 'car', 'castep', 'ccc', 'cdjson', 'cdx', 'cdxml', 'cif', 'ck', 'cml', 'cmlr', 'crk2d', 'crk3d', 'ct', 'cub', 'cube', 'dallog', 'dalmol', 'dat', 'dmol', 'dx', 'ent', 'exyz', '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', 'jin', 'jout', 'log', 'lpmd', 'mcdl', 'mcif', 'mdl', 'ml2', 'mmcif', 'mmd', 'mmod', 'mol', 'mol2', 'mold', 'molden', 'molf', 'moo', 'mop', 'mopcrt', 'mopin', 'mopout', 'mpc', 'mpo', 'mpqc', 'mrv', 'msi', 'nwo', 'orca', 'out', 'outmol', 'output', 'pc', 'pcjson', 'pcm', 'pdb', 'pdbqt', 'png', 'pos', 'pqr', 'pqs', 'prep', 'pwscf', 'qcout', 'res', 'rsmi', 'rxn', 'sd', 'sdf', 'siesta', 'smi', 'smiles', 'smy', 'sy2', 't41', 'tdd', 'text', 'therm', 'tmol', 'txt', 'txyz', 'unixyz', 'vmol', 'xml', 'xsf', 'xyz', 'yob']

Downstream FreeBSD bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194599

Version 2.4.1 on FreeBSD 11.2 installed from the port.

@andizuend
Copy link

Related to above, I received the same ValueError after installing openbabel/pybel Python bindings using an unofficial .whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/#openbabel on a Windows (11) machine (Python 3.9; pip install openbabel did not work). The apparent reason for the pybel ValueError was that after installing openbabel 3.1.1 on Windows (GUI version), there is an environment variable BABEL_DATADIR set under the Windows environment variables. Deleting or renaming that variable entry solved the "ValueError: smi is not a recognised Open Babel format" issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants