alanwilter / acpype

OFFICIAL: AnteChamber PYthon Parser interfacE
https://alanwilter.github.io/acpype/
GNU General Public License v3.0
195 stars 45 forks source link

ERROR: ACPYPE FAILED: No module named 'openbabel' #75

Closed archana433 closed 2 years ago

archana433 commented 2 years ago

=========================================================================== ERROR: ACPYPE FAILED: No module named 'openbabel' Traceback (most recent call last): File "/mnt/c/Users/ADesktop/gromac_trail/acpype/acpype/cli.py", line 109, in init_main molecule = ACTopol( File "/mnt/c/Users/A/Desktop/gromac_trail/acpype/acpype/topol.py", line 3271, in init if self.checkSmiles(): File "/mnt/c/Users/A/Desktop/gromac_trail/acpype/acpype/topol.py", line 352, in checkSmiles if checkOpenBabelVersion() >= 300: File "/mnt/c/Users/A/Desktop/gromac_trail/acpype/acpype/utils.py", line 18, in checkOpenBabelVersion import openbabel as obl ModuleNotFoundError: No module named 'openbabel' Total time of execution: less than a second Log tmp location: /tmp/tmp__19q4ap

I have installed acpype with git in ubuntu . and I also installed openbabel with sudo. still I am getting this error. i am trying the example only . $ ./run_acpype.py -i CCCC

please help.

alanwilter commented 2 years ago

Please, what were the specific commands you did to install acpype and openbabel? And what's your Ubuntu version and hardware architecture?

archana433 commented 2 years ago

Thank you for the response.

to install acpype - git clone https://github.com/alanwilter/acpype.git to install openbabel - apt-get install -y openbabel python3-openbabel libarpack++2-dev libgfortran5

system - Ubuntu 20.04.3 LTS, Processor - Intel® Core™ i7-9700 CPU @ 3.00GHz × 8

Thank you.

alanwilter commented 2 years ago

I can't reproduce your error. I used gitpod on my current master branch:

gitpod /workspace/acpype (alanwilter/error-acpype-failed-75) $ sudo apt-get install -y openbabel python3-openbabel libarpack++2-dev libgfortran5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
...
Setting up python3-openbabel (3.0.0+dfsg-3ubuntu3) ...
Setting up libopenblas-dev:amd64 (0.3.8+ds-1ubuntu0.20.04.1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...

gitpod /workspace/acpype (alanwilter/error-acpype-failed-75) $ ./run_acpype.py -i CCCC
===========================================================================
| ACPYPE: AnteChamber PYthon Parser interfacE v. 2022.1.26 (c) 2022 AWSdS |
===========================================================================
WARNING: no charge value given, trying to guess one...
==> ... charge set to 0
==> Executing Antechamber...
==> * Antechamber OK *
==> * Parmchk OK *
==> Executing Tleap...
==> * Tleap OK *
==> Removing temporary files...
==> Using OpenBabel v.3.0.0

==> Writing NEW PDB file

==> Writing CNS/XPLOR files

==> Writing GROMACS files

==> Disambiguating lower and uppercase atomtypes in GMX top file, even if identical.

==> Writing GMX dihedrals for GMX 4.5 and higher.

==> Writing CHARMM files

==> Writing pickle file smiles_molecule.pkl
==> Removing temporary files...
Total time of execution: 1s

The only thing I can think is you're mixing pythons, either using python2 or another python3 to run acpype but not the python where you added the python3-openbabel module.

To be sure, try that:

$ /usr/bin/python3 run_acpype.py -i CCCC

If it still fails, please run with -d option and send show the whole output debug. If it does work, please find out yourself what's wrong with your Linux python env.

Please, let me know the outcome anyway.

archana433 commented 2 years ago

hey, Thank you ! /usr/bin/python3 run_acpype.py -i CCCC - this command is working for me. Yes, it was mixing pythons, when I am using python3 it's working. Thank you!

$ python3 ./run_acpype.py -i CCCC

| ACPYPE: AnteChamber PYthon Parser interfacE v. 2022.1.26 (c) 2022 AWSdS |

WARNING: no charge value given, trying to guess one... ==> ... charge set to 0 ==> Executing Antechamber... ==> Antechamber OK ==> Parmchk OK ==> Executing Tleap... ==> Tleap OK ==> Removing temporary files... ==> Using OpenBabel v.3.1.0

==> Writing NEW PDB file

==> Writing CNS/XPLOR files

==> Writing GROMACS files

==> Disambiguating lower and uppercase atomtypes in GMX top file, even if identical.

==> Writing GMX dihedrals for GMX 4.5 and higher.

==> Writing CHARMM files

==> Writing pickle file smiles_molecule.pkl ==> Removing temporary files... Total time of execution: 1s