Error after installing gmx_MMPBSA

489 views
Skip to first unread message

Dr. Shine D

unread,
Oct 25, 2021, 6:22:26 AM10/25/21
to gmx_m...@googlegroups.com
Dear Mario,
I am using Ubuntu 18.04.6 version (not WSL)) and installed Amber 18 as per the instruction from gmx_MMPBSA manual . (Python version 3.9)
However, I could not figure it out the error just after installation of the prgm.
Pls find the error message below.
And also guide me fo setting the source if the error pertaining to that..
image.png

image.png
Thank you

Mario Sergio Valdes

unread,
Oct 25, 2021, 11:27:22 AM10/25/21
to gmx_MMPBSA
Currently, the Github repository version is not suitable for production. You must install the stable version from PyPI (python -m pip install gmx_MMPBSA)

The repository version brings many changes with it that have not been tested yet. For future installations, use the stable version unless we explicitly tell you otherwise. We are currently finalizing other projects urgently, but we hope to be able to release v1.5.0 very soon.

Note that gmx_MMPBSA has been tested with current AmberTools versions (20 and 21) not AmberTools18. Although there are not many differences between the two versions in terms of calculations, parmed does have considerable changes which can generate internal errors. Consider using AmberTools20 or 21

HTH!
Mario S.

Dr. Shine D

unread,
Oct 26, 2021, 1:28:11 AM10/26/21
to gmx_MMPBSA
Hi,
Thank you Mario for the help.
But when I try using stable version using amber.python -m pip install gmx_MMPBSA still gmx_MMPBSA -h gives error below
--------------------------------------------------
(AmberTools20) root@biolab111:~/Downloads/gmx_MMPBSA-1.4.3# gmx_MMPBSA -h
[ERROR  ] Could not import Amber Python modules. Please make sure you have sourced /home/biolab115/Downloads/amber20/miniconda/envs/AmberTools20/amber.sh (if you are using sh/ksh/bash/zsh) or /home/biolab115/Downloads/amber20/miniconda/envs/AmberTools20/amber.csh (if you are using csh/tcsh)
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/GMXMMPBSA/app.py", line 43, in <module>
    from GMXMMPBSA import main
  File "/usr/local/lib/python3.6/dist-packages/GMXMMPBSA/main.py", line 30, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/gmx_MMPBSA", line 5, in <module>
    from GMXMMPBSA.app import gmxmmpbsa
  File "/usr/local/lib/python3.6/dist-packages/GMXMMPBSA/app.py", line 56, in <module>
    (amberhome, amberhome))
ImportError: Could not import Amber Python modules. Please make sure you have sourced /home/biolab115/Downloads/amber20/miniconda/envs/AmberTools20/amber.sh (if you are using sh/ksh/bash/zsh) or /home/biolab115/Downloads/amber20/miniconda/envs/AmberTools20/amber.csh (if you are using csh/tcsh)
-------------------------------------------------------------------------------
This is the command I used (below)
--------------------------------------------------------------------------------
(AmberTools20) root@biolab111:~/Downloads/gmx_MMPBSA-1.4.3# amber.python -m pip install gmx_MMPBSA
WARNING: The directory '/home/biolab115/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Requirement already satisfied: gmx_MMPBSA in /home/biolab115/Downloads/amber20/lib/python3.9/site-packages (1.4.3)
Requirement already satisfied: pandas>=1.2.2 in /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages (from gmx_MMPBSA) (1.3.3)
Requirement already satisfied: seaborn>=0.11.1 in /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages (from gmx_MMPBSA) (0.11.2)
Requirement already satisfied: mpi4py>=3.0.3 in /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages (from gmx_MMPBSA) (3.1.1)
Requirement already satisfied: scipy>=1.6.1 in /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages (from gmx_MMPBSA) (1.7.1)
Requirement already satisfied: numpy>=1.17.3 in /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages (from pandas>=1.2.2->gmx_MMPBSA) (1.21.2)
Requirement already satisfied: python-dateutil>=2.7.3 in /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages (from pandas>=1.2.2->gmx_MMPBSA) (2.8.2)
Requirement already satisfied: pytz>=2017.3 in /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages (from pandas>=1.2.2->gmx_MMPBSA) (2021.3)
Requirement already satisfied: six>=1.5 in /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages (from python-dateutil>=2.7.3->pandas>=1.2.2->gmx_MMPBSA) (1.16.0)
Requirement already satisfied: matplotlib>=2.2 in /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages (from seaborn>=0.11.1->gmx_MMPBSA) (3.4.3)
Requirement already satisfied: cycler>=0.10 in /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages (from matplotlib>=2.2->seaborn>=0.11.1->gmx_MMPBSA) (0.10.0)
Requirement already satisfied: pillow>=6.2.0 in /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages (from matplotlib>=2.2->seaborn>=0.11.1->gmx_MMPBSA) (8.4.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages (from matplotlib>=2.2->seaborn>=0.11.1->gmx_MMPBSA) (1.3.1)
Requirement already satisfied: pyparsing>=2.2.1 in /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages (from matplotlib>=2.2->seaborn>=0.11.1->gmx_MMPBSA) (2.4.7)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
--------------------------------------------------------------------------------
The source path is given below
--------------------------------------------------------------
source /home/biolab115/Downloads/amber20/miniconda/lib/python3.9/site-packages/GMXMMPBSA/GMXMMPBSA.sh

marioe911116

unread,
Oct 26, 2021, 3:50:06 AM10/26/21
to gmx_MMPBSA
Have you sourced amber 'amber.sh' file?

ImportError: Could not import Amber Python modules. Please make sure you have sourced /home/biolab115/Downloads/amber20/miniconda/envs/AmberTools20/amber.sh (if you are using sh/ksh/bash/zsh) or /home/biolab115/Downloads/amber20/miniconda/envs/AmberTools20/amber.csh (if you are using csh/tcsh)

just add this line (if you are using sh/ksh/bash/zsh) to the .bashrc file in the home folder:

source /home/biolab115/Downloads/amber20/miniconda/envs/AmberTools20/amber.sh

or this one if you are using csh/tcsh:

source /home/biolab115/Downloads/amber20/miniconda/envs/AmberTools20/amber.csh

cheers!

Mario Sergio Valdes

unread,
Oct 26, 2021, 11:05:43 AM10/26/21
to gmx_MMPBSA
The problem is that you are installing python packages as root. This is a bad practice, since it supposes the total modification restriction of these directories, in addition to the security problems. Check out this thread (https://stackoverflow.com/questions/21055859/what-are-the-risks-of-running-sudo-pip)
Regardless that gmx_MMPBSA does not have any vulnerability (https://kandi.openweaver.com/python/Valdes-Tresanco-MS/gmx_MMPBSA#Summary) we do not recommend its installation as root. Mainly, because these problems will be presented when you try to update it.
In case it requires global installation of gmx_MMPBSA, try to install it using 
sudo -H amber.python -m pip install gmx_MMPBSA
Reply all
Reply to author
Forward
0 new messages