smi support problem in pybel/openbabel python

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

smi support problem in pybel/openbabel python

Jianshu Hu
Hi everyone,

     I met a problem while trying to use openbabel in Python.

    Env:
        python: Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32
        obabel: Open Babel 2.4.0 -- Sep 22 2016 -- 18:19:48
        OS: win10
        pythong-binding: openbabel-2.4.0-cp27-cp27m-win32.whl

    Problem:
>>> from pybel import *
>>> mymol=readstring("smi","CCCC")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\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

    Trying to find out what happend:
        >>> sorted(informats)
['CONFIG', 'CONTCAR', 'CONTFF', 'HISTORY', 'MDFF', 'POSCAR', 'POSFF', 'VASP', 'abinit', 'acesout', 'acr', 'adfout', 'alc', 'aoforce', 'arc', 'axsf', 'bgf', 'box', 'bs', 'c09out', 'c3d1', 'c3d2', 'caccrt', 'car', 'castep', 'ccc', 'cdx', 'cif', 'ck', 'crk2d', 'crk3d', 'ct', 'cub', 'cube', 'dallog', 'dalmol', 'dat', 'dmol', 'dx', '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', 'inp', 'ins', 'jin', 'jout', 'log', 'lpmd', 'mcdl', 'mcif', 'mmcif', 'mmd', 'mmod', 'mold', 'molden', 'molf', 'moo', 'mop', 'mopcrt', 'mopin', 'mopout', 'mpc', 'mpo', 'mpqc', 'msi', 'nwo', 'orca', 'out', 'outmol', 'output', 'pcm', 'pdbqt', 'png', 'pos', 'pqr', 'pqs', 'prep', 'pwscf', 'qcout', 'res', 'rsmi', 'rxn', 'siesta', 'smy', 't41', 'tdd', 'text', 'therm', 'tmol', 'txt', 'txyz', 'unixyz', 'vmol', 'xsf', 'xyz', 'yob']
   
    I found there is no smi in pybel.informats, however the Openbabel GUI can read or write smi format correctly.

    Where goes wrong? The pybel no loner support smi format?

    PS: the openbabel in python has the same problem

    Thank you for helps,

    JS Hu

------------------------------------------------------------------------------

_______________________________________________
OpenBabel-scripting mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: smi support problem in pybel/openbabel python

Noel O'Boyle
Administrator
Did you install the 32-bit version of Open Babel?

- Noel

On 29 September 2016 at 15:07, Jianshu Hu <[hidden email]> wrote:

> Hi everyone,
>
>      I met a problem while trying to use openbabel in Python.
>
>     Env:
>         python: Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22)
> [MSC v.1500 32 bit (Intel)] on win32
>         obabel: Open Babel 2.4.0 -- Sep 22 2016 -- 18:19:48
>         OS: win10
>         pythong-binding: openbabel-2.4.0-cp27-cp27m-win32.whl
>
>     Problem:
>>>> from pybel import *
>>>> mymol=readstring("smi","CCCC")
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "C:\Python27\lib\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
>
>     Trying to find out what happend:
>         >>> sorted(informats)
> ['CONFIG', 'CONTCAR', 'CONTFF', 'HISTORY', 'MDFF', 'POSCAR', 'POSFF',
> 'VASP', 'abinit', 'acesout', 'acr', 'adfout', 'alc', 'aoforce', 'arc',
> 'axsf', 'bgf', 'box', 'bs', 'c09out', 'c3d1', 'c3d2', 'caccrt', 'car',
> 'castep', 'ccc', 'cdx', 'cif', 'ck', 'crk2d', 'crk3d', 'ct', 'cub', 'cube',
> 'dallog', 'dalmol', 'dat', 'dmol', 'dx', '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', 'inp', 'ins', 'jin', 'jout',
> 'log', 'lpmd', 'mcdl', 'mcif', 'mmcif', 'mmd', 'mmod', 'mold', 'molden',
> 'molf', 'moo', 'mop', 'mopcrt', 'mopin', 'mopout', 'mpc', 'mpo', 'mpqc',
> 'msi', 'nwo', 'orca', 'out', 'outmol', 'output', 'pcm', 'pdbqt', 'png',
> 'pos', 'pqr', 'pqs', 'prep', 'pwscf', 'qcout', 'res', 'rsmi', 'rxn',
> 'siesta', 'smy', 't41', 'tdd', 'text', 'therm', 'tmol', 'txt', 'txyz',
> 'unixyz', 'vmol', 'xsf', 'xyz', 'yob']
>
>     I found there is no smi in pybel.informats, however the Openbabel GUI
> can read or write smi format correctly.
>
>     Where goes wrong? The pybel no loner support smi format?
>
>     PS: the openbabel in python has the same problem
>
>     Thank you for helps,
>
>     JS Hu
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> OpenBabel-scripting mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
>

------------------------------------------------------------------------------
_______________________________________________
OpenBabel-scripting mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: smi support problem in pybel/openbabel python

Jianshu Hu
Yes, I install the 32-bit openbabel.
And yes, a lot of formats are missing.
However the GUI version can handle these format very well.
I think there is something wrong when binding the obabel to python in " pythong-binding: openbabel-2.4.0-cp27-cp27m-win32.whl"
However, I am not familiar with this part. So I don't know where goes wrong.
The only thing I can ensure is that the binding is for 2.40 version and python2.7

I have no idea what is going on in pybel.

Sad. :(

On Thu, Sep 29, 2016 at 11:00 PM, Noel O'Boyle <[hidden email]> wrote:
(ccing to openbabel-discuss as this mailing list is closed)

I notice that others formats are missing such as Mol file. There are 6
or 7 common formats loaded from formats_common.obf and these are all
missing. It must be that your virus checker or Windows firewall is
blocking that .obf file. I don't understand how the GUI can handle it
correctly though in that case. ??

- Noel

On 29 September 2016 at 15:54, Noel O'Boyle <[hidden email]> wrote:
> Did you install the 32-bit version of Open Babel?
>
> - Noel
>
> On 29 September 2016 at 15:07, Jianshu Hu <[hidden email]> wrote:
>> Hi everyone,
>>
>>      I met a problem while trying to use openbabel in Python.
>>
>>     Env:
>>         python: Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22)
>> [MSC v.1500 32 bit (Intel)] on win32
>>         obabel: Open Babel 2.4.0 -- Sep 22 2016 -- 18:19:48
>>         OS: win10
>>         pythong-binding: openbabel-2.4.0-cp27-cp27m-win32.whl
>>
>>     Problem:
>>>>> from pybel import *
>>>>> mymol=readstring("smi","CCCC")
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File "C:\Python27\lib\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
>>
>>     Trying to find out what happend:
>>         >>> sorted(informats)
>> ['CONFIG', 'CONTCAR', 'CONTFF', 'HISTORY', 'MDFF', 'POSCAR', 'POSFF',
>> 'VASP', 'abinit', 'acesout', 'acr', 'adfout', 'alc', 'aoforce', 'arc',
>> 'axsf', 'bgf', 'box', 'bs', 'c09out', 'c3d1', 'c3d2', 'caccrt', 'car',
>> 'castep', 'ccc', 'cdx', 'cif', 'ck', 'crk2d', 'crk3d', 'ct', 'cub', 'cube',
>> 'dallog', 'dalmol', 'dat', 'dmol', 'dx', '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', 'inp', 'ins', 'jin', 'jout',
>> 'log', 'lpmd', 'mcdl', 'mcif', 'mmcif', 'mmd', 'mmod', 'mold', 'molden',
>> 'molf', 'moo', 'mop', 'mopcrt', 'mopin', 'mopout', 'mpc', 'mpo', 'mpqc',
>> 'msi', 'nwo', 'orca', 'out', 'outmol', 'output', 'pcm', 'pdbqt', 'png',
>> 'pos', 'pqr', 'pqs', 'prep', 'pwscf', 'qcout', 'res', 'rsmi', 'rxn',
>> 'siesta', 'smy', 't41', 'tdd', 'text', 'therm', 'tmol', 'txt', 'txyz',
>> 'unixyz', 'vmol', 'xsf', 'xyz', 'yob']
>>
>>     I found there is no smi in pybel.informats, however the Openbabel GUI
>> can read or write smi format correctly.
>>
>>     Where goes wrong? The pybel no loner support smi format?
>>
>>     PS: the openbabel in python has the same problem
>>
>>     Thank you for helps,
>>
>>     JS Hu
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> OpenBabel-scripting mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
>>


------------------------------------------------------------------------------

_______________________________________________
OpenBabel-scripting mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: smi support problem in pybel/openbabel python

Jianshu Hu
Problem solved!!!!


USE THE ONE FROM PYTHON PIP!!!!!!

They have the same names but not the same contents.

😤😤😤😤

On Fri, Sep 30, 2016 at 12:03 AM, Jianshu Hu <[hidden email]> wrote:
Yes, I install the 32-bit openbabel.
And yes, a lot of formats are missing.
However the GUI version can handle these format very well.
I think there is something wrong when binding the obabel to python in " pythong-binding: openbabel-2.4.0-cp27-cp27m-win32.whl"
However, I am not familiar with this part. So I don't know where goes wrong.
The only thing I can ensure is that the binding is for 2.40 version and python2.7

I have no idea what is going on in pybel.

Sad. :(

On Thu, Sep 29, 2016 at 11:00 PM, Noel O'Boyle <[hidden email]> wrote:
(ccing to openbabel-discuss as this mailing list is closed)

I notice that others formats are missing such as Mol file. There are 6
or 7 common formats loaded from formats_common.obf and these are all
missing. It must be that your virus checker or Windows firewall is
blocking that .obf file. I don't understand how the GUI can handle it
correctly though in that case. ??

- Noel

On 29 September 2016 at 15:54, Noel O'Boyle <[hidden email]> wrote:
> Did you install the 32-bit version of Open Babel?
>
> - Noel
>
> On 29 September 2016 at 15:07, Jianshu Hu <[hidden email]> wrote:
>> Hi everyone,
>>
>>      I met a problem while trying to use openbabel in Python.
>>
>>     Env:
>>         python: Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22)
>> [MSC v.1500 32 bit (Intel)] on win32
>>         obabel: Open Babel 2.4.0 -- Sep 22 2016 -- 18:19:48
>>         OS: win10
>>         pythong-binding: openbabel-2.4.0-cp27-cp27m-win32.whl
>>
>>     Problem:
>>>>> from pybel import *
>>>>> mymol=readstring("smi","CCCC")
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File "C:\Python27\lib\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
>>
>>     Trying to find out what happend:
>>         >>> sorted(informats)
>> ['CONFIG', 'CONTCAR', 'CONTFF', 'HISTORY', 'MDFF', 'POSCAR', 'POSFF',
>> 'VASP', 'abinit', 'acesout', 'acr', 'adfout', 'alc', 'aoforce', 'arc',
>> 'axsf', 'bgf', 'box', 'bs', 'c09out', 'c3d1', 'c3d2', 'caccrt', 'car',
>> 'castep', 'ccc', 'cdx', 'cif', 'ck', 'crk2d', 'crk3d', 'ct', 'cub', 'cube',
>> 'dallog', 'dalmol', 'dat', 'dmol', 'dx', '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', 'inp', 'ins', 'jin', 'jout',
>> 'log', 'lpmd', 'mcdl', 'mcif', 'mmcif', 'mmd', 'mmod', 'mold', 'molden',
>> 'molf', 'moo', 'mop', 'mopcrt', 'mopin', 'mopout', 'mpc', 'mpo', 'mpqc',
>> 'msi', 'nwo', 'orca', 'out', 'outmol', 'output', 'pcm', 'pdbqt', 'png',
>> 'pos', 'pqr', 'pqs', 'prep', 'pwscf', 'qcout', 'res', 'rsmi', 'rxn',
>> 'siesta', 'smy', 't41', 'tdd', 'text', 'therm', 'tmol', 'txt', 'txyz',
>> 'unixyz', 'vmol', 'xsf', 'xyz', 'yob']
>>
>>     I found there is no smi in pybel.informats, however the Openbabel GUI
>> can read or write smi format correctly.
>>
>>     Where goes wrong? The pybel no loner support smi format?
>>
>>     PS: the openbabel in python has the same problem
>>
>>     Thank you for helps,
>>
>>     JS Hu
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> OpenBabel-scripting mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
>>



------------------------------------------------------------------------------

_______________________________________________
OpenBabel-scripting mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: smi support problem in pybel/openbabel python

Noel O'Boyle
Administrator

Great. Good to know what the problem was too.


On 29 Sep 2016 5:43 p.m., "Jianshu Hu" <[hidden email]> wrote:
Problem solved!!!!


USE THE ONE FROM PYTHON PIP!!!!!!

They have the same names but not the same contents.

😤😤😤😤

On Fri, Sep 30, 2016 at 12:03 AM, Jianshu Hu <[hidden email]> wrote:
Yes, I install the 32-bit openbabel.
And yes, a lot of formats are missing.
However the GUI version can handle these format very well.
I think there is something wrong when binding the obabel to python in " pythong-binding: openbabel-2.4.0-cp27-cp27m-win32.whl"
However, I am not familiar with this part. So I don't know where goes wrong.
The only thing I can ensure is that the binding is for 2.40 version and python2.7

I have no idea what is going on in pybel.

Sad. :(

On Thu, Sep 29, 2016 at 11:00 PM, Noel O'Boyle <[hidden email]> wrote:
(ccing to openbabel-discuss as this mailing list is closed)

I notice that others formats are missing such as Mol file. There are 6
or 7 common formats loaded from formats_common.obf and these are all
missing. It must be that your virus checker or Windows firewall is
blocking that .obf file. I don't understand how the GUI can handle it
correctly though in that case. ??

- Noel

On 29 September 2016 at 15:54, Noel O'Boyle <[hidden email]> wrote:
> Did you install the 32-bit version of Open Babel?
>
> - Noel
>
> On 29 September 2016 at 15:07, Jianshu Hu <[hidden email]> wrote:
>> Hi everyone,
>>
>>      I met a problem while trying to use openbabel in Python.
>>
>>     Env:
>>         python: Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22)
>> [MSC v.1500 32 bit (Intel)] on win32
>>         obabel: Open Babel 2.4.0 -- Sep 22 2016 -- 18:19:48
>>         OS: win10
>>         pythong-binding: openbabel-2.4.0-cp27-cp27m-win32.whl
>>
>>     Problem:
>>>>> from pybel import *
>>>>> mymol=readstring("smi","CCCC")
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File "C:\Python27\lib\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
>>
>>     Trying to find out what happend:
>>         >>> sorted(informats)
>> ['CONFIG', 'CONTCAR', 'CONTFF', 'HISTORY', 'MDFF', 'POSCAR', 'POSFF',
>> 'VASP', 'abinit', 'acesout', 'acr', 'adfout', 'alc', 'aoforce', 'arc',
>> 'axsf', 'bgf', 'box', 'bs', 'c09out', 'c3d1', 'c3d2', 'caccrt', 'car',
>> 'castep', 'ccc', 'cdx', 'cif', 'ck', 'crk2d', 'crk3d', 'ct', 'cub', 'cube',
>> 'dallog', 'dalmol', 'dat', 'dmol', 'dx', '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', 'inp', 'ins', 'jin', 'jout',
>> 'log', 'lpmd', 'mcdl', 'mcif', 'mmcif', 'mmd', 'mmod', 'mold', 'molden',
>> 'molf', 'moo', 'mop', 'mopcrt', 'mopin', 'mopout', 'mpc', 'mpo', 'mpqc',
>> 'msi', 'nwo', 'orca', 'out', 'outmol', 'output', 'pcm', 'pdbqt', 'png',
>> 'pos', 'pqr', 'pqs', 'prep', 'pwscf', 'qcout', 'res', 'rsmi', 'rxn',
>> 'siesta', 'smy', 't41', 'tdd', 'text', 'therm', 'tmol', 'txt', 'txyz',
>> 'unixyz', 'vmol', 'xsf', 'xyz', 'yob']
>>
>>     I found there is no smi in pybel.informats, however the Openbabel GUI
>> can read or write smi format correctly.
>>
>>     Where goes wrong? The pybel no loner support smi format?
>>
>>     PS: the openbabel in python has the same problem
>>
>>     Thank you for helps,
>>
>>     JS Hu
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> OpenBabel-scripting mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
>>



------------------------------------------------------------------------------

_______________________________________________
OpenBabel-scripting mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
Loading...