Valdes-Tresanco-MS / gmx_MMPBSA

gmx_MMPBSA is a new tool based on AMBER's MMPBSA.py aiming to perform end-state free energy calculations with GROMACS files.
https://valdes-tresanco-ms.github.io/gmx_MMPBSA/
GNU General Public License v3.0
215 stars 64 forks source link

gmx_MMPBSA_ana error: Could not import PyQt5 #176

Closed gayatripanda5 closed 2 years ago

gayatripanda5 commented 2 years ago

Documentation Link

No response

Problem

Hi, I am facing an error while running gmx_MMPBSA_ana. I have installed the latest version of gmx_MMPBSA. The module PyQt5 is installed despite that, during running gmx_MMPBSA_ana, it throws this error.

(gmxMMPBSA) iiitd@iiitd:/4tb-storage2/gayatrip/gmx_MMPBSA_fnrnadna$ gmx_MMPBSA_ana -f . ERROR:root:MMPBSA_Error Could not import PyQt5. gmx_MMPBSA_ana will be disabled until you install it. Check the gmx_MMPBSA.log file to report the problem. Traceback (most recent call last): File "/home/iiitd/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/app.py", line 119, in gmxmmpbsa_ana from PyQt5.QtWidgets import QApplication ImportError: /home/iiitd/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/PyQt5/../../../libQt5Widgets.so.5: undefined symbol: _ZNK11QTouchEvent10TouchPoint10screenRectEv, version Qt_5

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/iiitd/miniconda3/envs/gmxMMPBSA/bin/gmx_MMPBSA_ana", line 8, in sys.exit(gmxmmpbsa_ana()) File "/home/iiitd/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/app.py", line 121, in gmxmmpbsa_ana GMXMMPBSA_ERROR('Could not import PyQt5. gmx_MMPBSA_ana will be disabled until you install it') File "/home/iiitd/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/exceptions.py", line 169, in init raise exc(msg + '\nCheck the gmx_MMPBSA.log file to report the problem.') GMXMMPBSA.exceptions.MMPBSA_Error: Could not import PyQt5. gmx_MMPBSA_ana will be disabled until you install it Check the gmx_MMPBSA.log file to report the problem. (gmxMMPBSA) iiitd@iiitd:/4tb-storage2/gayatrip/gmx_MMPBSA_fnrnadna$ python Python 3.9.10 | packaged by conda-forge | (main, Feb 1 2022, 21:24:11) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import PyQt5

Suggested improvement

No response

marioernestovaldes commented 2 years ago

Did you try this solution?

https://github.com/Valdes-Tresanco-MS/gmx_MMPBSA/issues/162#issuecomment-1049088420

gayatripanda5 commented 2 years ago

Yes, I followed this issue. I am still getting this error. image

Valdes-Tresanco-MS commented 2 years ago

Show me the list of installed packages. conda list

gayatripanda5 commented 2 years ago

conda list Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_gnu conda-forge alsa-lib 1.2.3 h516909a_0 conda-forge ambertools 21.12 py39hc630cb1_0 conda-forge amberutils 21.0 pypi_0 pypi arpack 3.7.0 hdefa2d7_2 conda-forge boost-cpp 1.74.0 h6cacc03_7 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge c-ares 1.18.1 h7f98852_0 conda-forge ca-certificates 2021.10.8 ha878542_0 conda-forge cached-property 1.5.2 hd8ed1ab_1 conda-forge cached_property 1.5.2 pyha770c72_1 conda-forge certifi 2021.10.8 py39hf3d152e_1 conda-forge curl 7.81.0 h2574ce0_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge cython 0.29.28 py39he80948d_0 conda-forge dbus 1.13.6 h5008d03_3 conda-forge expat 2.4.6 h27087fc_0 conda-forge fftw 3.3.10 nompi_h77c792f_102 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.13.96 ha180cfb_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge freetype 2.10.4 h0708190_1 conda-forge gettext 0.19.8.1 h73d1719_1008 conda-forge giflib 5.2.1 h36c2ea0_2 conda-forge gmx-mmpbsa 1.5.0.1+3.g2b0999f pypi_0 pypi gst-plugins-base 1.18.5 hf529b03_3 conda-forge gstreamer 1.18.5 h9f60fe5_3 conda-forge h5py 3.6.0 nompi_py39h7e08c79_100 conda-forge hdf4 4.2.15 h10796ff_3 conda-forge hdf5 1.12.1 nompi_h2750804_103 conda-forge icu 69.1 h9c3ff4c_0 conda-forge jbig 2.1 h7f98852_2003 conda-forge jpeg 9e h7f98852_0 conda-forge kiwisolver 1.3.2 py39h1a9c180_1 conda-forge krb5 1.19.2 hcc1bbae_3 conda-forge lcms2 2.12 hddcbb42_0 conda-forge ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge lerc 3.0 h9c3ff4c_0 conda-forge libblas 3.9.0 13_linux64_openblas conda-forge libcblas 3.9.0 13_linux64_openblas conda-forge libclang 13.0.1 default_hc23dcda_0 conda-forge libcurl 7.81.0 h2574ce0_0 conda-forge libdeflate 1.10 h7f98852_0 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 h516909a_1 conda-forge libevent 2.1.10 h9b69904_4 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc-ng 11.2.0 h1d223b6_12 conda-forge libgfortran-ng 11.2.0 h69a702a_12 conda-forge libgfortran5 11.2.0 h5c6108e_12 conda-forge libglib 2.70.2 h174f98d_4 conda-forge libgomp 11.2.0 h1d223b6_12 conda-forge libiconv 1.16 h516909a_0 conda-forge liblapack 3.9.0 13_linux64_openblas conda-forge libllvm13 13.0.1 hf817b99_1 conda-forge libnetcdf 4.8.1 nompi_hb3fd0d9_101 conda-forge libnghttp2 1.46.0 h812cca2_0 conda-forge libnsl 2.0.0 h7f98852_0 conda-forge libogg 1.3.4 h7f98852_1 conda-forge libopenblas 0.3.18 pthreads_h8fe5266_0 conda-forge libopus 1.3.1 h7f98852_1 conda-forge libpng 1.6.37 h21135ba_2 conda-forge libpq 14.2 hd57d9b9_0 conda-forge libssh2 1.10.0 ha56f1ee_2 conda-forge libstdcxx-ng 11.2.0 he4da1e4_12 conda-forge libtiff 4.3.0 h542a066_3 conda-forge libuuid 2.32.1 h7f98852_1000 conda-forge libvorbis 1.3.7 h9c3ff4c_0 conda-forge libwebp 1.2.2 h3452ae3_0 conda-forge libwebp-base 1.2.2 h7f98852_1 conda-forge libxcb 1.13 h7f98852_1004 conda-forge libxkbcommon 1.0.3 he3ba5ed_0 conda-forge libxml2 2.9.12 h885dcf4_1 conda-forge libzip 1.8.0 h4de3113_1 conda-forge libzlib 1.2.11 h36c2ea0_1013 conda-forge lz4-c 1.9.3 h9c3ff4c_1 conda-forge matplotlib 3.4.3 py39hf3d152e_2 conda-forge matplotlib-base 3.4.3 py39h2fa2bec_2 conda-forge mpi 1.0 openmpi conda-forge mpi4py 3.1.3 py39hc649577_0 conda-forge mysql-common 8.0.28 ha770c72_0 conda-forge mysql-libs 8.0.28 hfa10184_0 conda-forge ncurses 6.3 h9c3ff4c_0 conda-forge netcdf-fortran 4.5.4 nompi_h2b6e579_100 conda-forge nspr 4.32 h9c3ff4c_1 conda-forge nss 3.74 hb5efdd6_0 conda-forge numpy 1.22.2 py39h91f2184_0 conda-forge openjpeg 2.4.0 hb52868f_1 conda-forge openmpi 4.1.2 hbfc84c5_0 conda-forge openssl 1.1.1l h7f98852_0 conda-forge packaging 21.3 pyhd8ed1ab_0 conda-forge packmol 20.010 h86c2bf4_0 conda-forge packmol-memgen 1.2.1rc0 pypi_0 pypi pandas 1.4.1 py39hde0f152_0 conda-forge parmed 3.4.3+5.g16fb236 pypi_0 pypi patsy 0.5.2 pyhd8ed1ab_0 conda-forge pcre 8.45 h9c3ff4c_0 conda-forge perl 5.32.1 2_h7f98852_perl5 conda-forge pillow 9.0.1 py39hae2aec6_2 conda-forge pip 22.0.3 pyhd8ed1ab_0 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge pyparsing 3.0.7 pyhd8ed1ab_0 conda-forge pyqt 5.12.3 py39hf3d152e_8 conda-forge pyqt-impl 5.12.3 py39hde8b62d_8 conda-forge pyqt5-sip 4.19.18 py39he80948d_8 conda-forge pyqtchart 5.12 py39h0fcd23e_8 conda-forge pyqtwebengine 5.12.1 py39h0fcd23e_8 conda-forge python 3.9.10 h85951f9_2_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python_abi 3.9 2_cp39 conda-forge pytraj 2.0.6 pypi_0 pypi pytz 2021.3 pyhd8ed1ab_0 conda-forge qt 5.12.9 ha98a1a1_5 conda-forge readline 8.1 h46c0cb4_0 conda-forge sander 16.0 pypi_0 pypi scipy 1.8.0 py39hee8e79c_1 conda-forge seaborn 0.11.2 hd8ed1ab_0 conda-forge seaborn-base 0.11.2 pyhd8ed1ab_0 conda-forge setuptools 60.9.3 py39hf3d152e_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sqlite 3.37.0 h9cd32fc_0 conda-forge statsmodels 0.13.2 py39hce5d2b2_0 conda-forge tk 8.6.12 h27826a3_0 conda-forge tornado 6.1 py39h3811e60_2 conda-forge tzdata 2021e he74cb21_0 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge xorg-kbproto 1.0.7 h7f98852_1002 conda-forge xorg-libice 1.0.10 h7f98852_0 conda-forge xorg-libsm 1.2.3 hd9c2040_1000 conda-forge xorg-libx11 1.7.2 h7f98852_0 conda-forge xorg-libxau 1.0.9 h7f98852_0 conda-forge xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge xorg-libxext 1.3.4 h7f98852_1 conda-forge xorg-libxt 1.2.1 h7f98852_2 conda-forge xorg-xextproto 7.3.0 h7f98852_1002 conda-forge xorg-xproto 7.0.31 h7f98852_1007 conda-forge xz 5.2.5 h516909a_1 conda-forge zlib 1.2.11 h36c2ea0_1013 conda-forge zstd 1.5.2 ha95c52a_0 conda-forge

Valdes-Tresanco-MS commented 2 years ago

Try to update PyQt5. You have version 5.12.3 when you should have version 5.15.6 python -m pip install pyqt5

gayatripanda5 commented 2 years ago

It says " Requirement already satisfied". image

Valdes-Tresanco-MS commented 2 years ago

Try python -m pip install pyqt5 -U

wrmartin commented 2 years ago

Screenshot at 2022-03-21 15-28-32 I am having the same issue. 5.15.6 installed, gmx_MMPBSA is 1.5.1.

Valdes-Tresanco-MS commented 2 years ago

Hi @wrmartin I can't reproduce the problem. According to my test, it works correctly. image

Can you give me a little more context? What OS are you using? The PYTHONPATH variable is defined? (echo $PYTHONPATH) Please show me the output of this command line: python and then

import PyQt5
from PyQt5.QtCore import QT_VERSION_STR
from PyQt5.Qt import PYQT_VERSION_STR
from sip import SIP_VERSION_STR

print("PyQt module:", PyQt5.__file__)
print("Qt version:", QT_VERSION_STR)
print("SIP version:", SIP_VERSION_STR)
print("PyQt version:", PYQT_VERSION_STR)

If you have a modern OS higher than Ubuntu version 18.04, you can try installing PyQt6

python -m pip uninstall pyqt5
python -m pip install pyqt6
gayatripanda5 commented 2 years ago

echo $PYTHONPATH image After "import PyQt5 from PyQt5.QtCore import QT_VERSION_STR from PyQt5.Qt import PYQT_VERSION_STR" this image

gayatripanda5 commented 2 years ago

Ubuntu Version image

gayatripanda5 commented 2 years ago

After uninstalling and reinstalling pyqt5, it is working now. The pyqt5 import issue was resolved.

image

Once I click on "Accept". I am getting this error.

Traceback (most recent call last): File "/home/iiitd/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/analyzer/dialogs.py", line 359, in get_data self.parent.read_data(queue, self.options) File "/home/iiitd/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/analyzer/gui.py", line 981, in read_data gmx_mmpbsa_api.load_file(path) File "/home/iiitd/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/API.py", line 78, in load_file self._get_fromApp(fname) File "/home/iiitd/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/API.py", line 368, in _get_fromApp app.parse_output_files() File "/home/iiitd/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/main.py", line 973, in parse_output_files if self.INPUT['c2_entropy']: KeyError: 'c2_entropy' Aborted (core dumped)

marioernestovaldes commented 2 years ago

Are you trying to read files run with previous versions of gmx_MMPBSA while using gmx_MMPBSA_ana > v1.5.0?

Files run with gmx_MMPBSA < 1.5.0 are incompatible with newest versions of gmx_MMPBSA_ana...

gayatripanda5 commented 2 years ago

Understood!. For a trial run, I ran it into a directory with files generated using an older version of gmxMMPBSA. It is running fine with files generated with new version.

marioernestovaldes commented 2 years ago

cool!

wrmartin commented 2 years ago

My error appears to be related to a second install of Qt5, so not a problem with gmx_MMPBSA_ana.

Valdes-Tresanco-MS commented 2 years ago

My error appears to be related to a second install of Qt5, so not a problem with gmx_MMPBSA_ana.

@wrmartin Did you solve it or are you still having problems?

@gayatripanda5 Please be careful when defining the PYTHONPATH variable. This variable overrides the path where the python interpreter looks for modules/packages. The current definition you have points to a python interpreter, not to the python library folder, which can generate errors.

gayatripanda5 commented 2 years ago

I was running this command, nohup mpirun -np 8 gmx_MMPBSA MPI -O -i mmgbsa_5frames.in -cs sys.pdb -ci prot_rna_dna.ndx -cg 1 15 -ct fnrna-dna_0-500ns_norest-350-400_nopbc_compact_fit_dt1ns.xtc -cp topol.top & it was running fine earlier, not the process stops after closing the terminal.

On Wed, Mar 23, 2022 at 5:31 AM Mario Sergio Valdés Tresanco < @.***> wrote:

My error appears to be related to a second install of Qt5, so not a problem with gmx_MMPBSA_ana.

@wrmartin https://github.com/wrmartin Did you solve it or are you still having problems?

@gayatripanda5 https://github.com/gayatripanda5 Please be careful when defining the PYTHONPATH variable. This variable overrides the path where the python interpreter looks for modules/packages. The current definition you have points to a python interpreter, not to the python library folder, which can generate errors.

— Reply to this email directly, view it on GitHub https://github.com/Valdes-Tresanco-MS/gmx_MMPBSA/issues/176#issuecomment-1075766649, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSH3UZEZVJU7JOBJUTLIADVBJNNTANCNFSM5P5FICFA . You are receiving this because you were mentioned.Message ID: @.***>

-- Gayatri Panda PhD19206 (Computational Biology)

marioernestovaldes commented 2 years ago

nohup is a POSIX command which means "no hang up". Its purpose is to execute a command such that it ignores the HUP (hangup) signal and therefore does not stop when the user logs out. Output that would normally go to the terminal goes to a file called nohup. out, if it has not already been redirected.

try without nohup in front of the command line:

mpirun -np 8 gmx_MMPBSA MPI -O -i mmgbsa_5frames.in -cs sys.pdb -ci prot_rna_dna.ndx -cg 1 15 -ct fnrna-dna_0-500ns_norest-350-400_nopbc_compact_fit_dt1ns.xtc -cp topol.top

gayatripanda5 commented 2 years ago

Will it continue running in the background after running this command? mpirun -np 8 gmx_MMPBSA MPI -O -i mmgbsa_5frames.in -cs sys.pdb -ci prot_rna_dna.ndx -cg 1 15 -ct fnrna-dna_0-500ns_norest-350- 400_nopbc_compact_fit_dt1ns.xtc -cp topol.top

On Thu, Mar 24, 2022 at 11:56 PM Mario E. Valdés-Tresanco < @.***> wrote:

nohup is a POSIX command which means "no hang up". Its purpose is to execute a command such that it ignores the HUP (hangup) signal and therefore does not stop when the user logs out. Output that would normally go to the terminal goes to a file called nohup. out, if it has not already been redirected.

try without nohup in front of the command line:

mpirun -np 8 gmx_MMPBSA MPI -O -i mmgbsa_5frames.in -cs sys.pdb -ci prot_rna_dna.ndx -cg 1 15 -ct fnrna-dna_0-500ns_norest-350-400_nopbc_compact_fit_dt1ns.xtc -cp topol.top

— Reply to this email directly, view it on GitHub https://github.com/Valdes-Tresanco-MS/gmx_MMPBSA/issues/176#issuecomment-1077920651, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSH3U7EVJPB65GIN4VCNSDVBSXW5ANCNFSM5P5FICFA . You are receiving this because you were mentioned.Message ID: @.***>

-- Gayatri Panda PhD19206 (Computational Biology)

marioernestovaldes commented 2 years ago

no... if you don't use nohup once you close the terminal the process will be killed

gayatripanda5 commented 2 years ago

Yes, even after using nohup and adding & at the end, the process gets killed after closing the terminal. This was not the case with older versions.

On Fri, Mar 25, 2022, 12:04 AM Mario E. Valdés-Tresanco < @.***> wrote:

no... if you don't use nohup once you close the terminal the process will be killed

— Reply to this email directly, view it on GitHub https://github.com/Valdes-Tresanco-MS/gmx_MMPBSA/issues/176#issuecomment-1077926583, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSH3U72I64IKTP5THW477TVBSYRTANCNFSM5P5FICFA . You are receiving this because you were mentioned.Message ID: @.***>

gayatripanda5 commented 2 years ago

I want to run it in background and want to keep it running after closing the terminal too. Could you suggest me how this can be achieved?

On Fri, Mar 25, 2022, 12:05 AM Gayatri Panda @.***> wrote:

Yes, even after using nohup and adding & at the end, the process gets killed after closing the terminal. This was not the case with older versions.

On Fri, Mar 25, 2022, 12:04 AM Mario E. Valdés-Tresanco < @.***> wrote:

no... if you don't use nohup once you close the terminal the process will be killed

— Reply to this email directly, view it on GitHub https://github.com/Valdes-Tresanco-MS/gmx_MMPBSA/issues/176#issuecomment-1077926583, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSH3U72I64IKTP5THW477TVBSYRTANCNFSM5P5FICFA . You are receiving this because you were mentioned.Message ID: @.***>

marioernestovaldes commented 2 years ago

fundamentally, nothing has changed in the way gmx_MMPBSA runs... As a matter of fact, I tried using nohup and it works fine...

marioernestovaldes commented 2 years ago

@gayatripanda5 I did open a new issue (https://github.com/Valdes-Tresanco-MS/gmx_MMPBSA/issues/204) regarding running gmx_MMPBSA in background... Let's move the discussion there as this issue was already solved...

thanks