Skip to content
New issue

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

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

Already on GitHub? # to your account

<< OpenBabel error >> #31

Open
icamps opened this issue Jun 1, 2019 · 2 comments
Open

<< OpenBabel error >> #31

icamps opened this issue Jun 1, 2019 · 2 comments

Comments

@icamps
Copy link

icamps commented Jun 1, 2019

Hello,

I installed OpenBabel and python-openbabel using apt (Ubuntu 19.04).

The problem is that after installing FragIt, I am getting the following error messages:

Error: OpenBabel could not be loaded.
Please make sure OpenBabel has been installed with python bindings.

But Babel and Babel-GUI are working fine when I call them from the command line.

Any idea how to make FragIt to see OpenBabel?

Regards,

@cstein
Copy link
Member

cstein commented Jun 3, 2019

Hi @icamps,

I just tried installing openbabel and python-openbabel using apt on a clean Ubuntu 19.04:

apt install openbabel python-openbabel

and afterwards I ran the following from the terminal:

$ python -c "import openbabel; print openbabel"
<module 'openbabel' from '/usr/lib/python2.7/dist-packages/openbabel.pyc'>

So to me it looks like you installed FragIt using python3 on Ubuntu 19.04 and then installed openbabel and python-bindings using apt which defaults to python 2.7. So you need to remove your installation of fragit and reinstall it using python2.7.

all the best

Casper

@icamps
Copy link
Author

icamps commented Jun 6, 2019

Hi @cstein

Thank you very much for your help.

I figure out how to install/run Fragit: I added "#!/usr/bin/python" to files /usr/local/bin/fragit-conf and /usr/local/bin/fragit, when I run python, it returns

Python 2.7.16 (default, Apr 6 2019, 01:42:57)
[GCC 8.3.0] on linux2

so it is Python 2.7, right?

Now, I am following the steps in the Wiki (How to use Fragit?) but I am getting the following output file (attached) with this message:
fragit.out.txt

Traceback (most recent call last):
File "/usr/local/bin/fragit", line 26, in
main(dirs)
File "/usr/local/lib/python2.7/dist-packages/fragit/cmdline.py", line 155, in main
out.setup()
File "/usr/local/lib/python2.7/dist-packages/fragit/gamessfmo.py", line 99, in setup
if self._do_jmol: self._dump_jmol()
File "/usr/local/lib/python2.7/dist-packages/fragit/gamessfmo.py", line 148, in _dump_jmol
self._writeTemplateFile(pt)
File "/usr/local/lib/python2.7/dist-packages/fragit/gamessfmo.py", line 159, in _writeTemplateFile
template.override()
File "/usr/local/lib/python2.7/dist-packages/fragit/template.py", line 99, in override
self.replacements['FRAGMENTQ'] = self.formatFragmentCharges()
File "/usr/local/lib/python2.7/dist-packages/fragit/template.py", line 88, in formatFragmentCharges
raise NotImplementedError
NotImplementedError

It is about OpenBabel?

Also: how can I uninstall FragIt?

Regards,

Camps

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

No branches or pull requests

2 participants