ProDy icon indicating copy to clipboard operation
ProDy copied to clipboard

Unable to submit ProDy job from VMD even after designating path to prody.exe

Open christos-efthymiou opened this issue 2 years ago • 14 comments

I would like to use the Normal Mode Wizard in VMD to conduct PCA analysis use the ProDy Interface. I am using a Windows 10 computer and the 64 bit (1.9.4) version of VMD. I have installed ProDy from the Command Prompt using "pip install prody". When I check this by trying pip install again, I see confirmation that it has been installed:

C:\Users\Christos>pip install prody
Requirement already satisfied: prody in c:\users\christos\anaconda3\lib\site-packages (2.2.0)
Requirement already satisfied: numpy>=1.10 in c:\users\christos\anaconda3\lib\site-packages (from prody) (1.22.3)
Requirement already satisfied: pyparsing in c:\users\christos\anaconda3\lib\site-packages (from prody) (3.0.4)
Requirement already satisfied: biopython<=1.76 in c:\users\christos\anaconda3\lib\site-packages (from prody) (1.76)
Requirement already satisfied: scipy in c:\users\christos\anaconda3\lib\site-packages (from prody) (1.7.3)

However, when I open VMD, go to Extensions, Analysis, Normal Mode Wizard, and then Prody Interface, I am unable to successfully submit a job. I have loaded my dcd trajectory and have kept the default settings:

image

When I click Submit Job, I first get a notification that it could not find the path to prody and asks if I would like to specify the path. I then specify the path to the prody.exe file. When I do this, the following error message then appears:

Traceback (most recent call last):
  File "C:\Users\Christos\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Christos\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Christos\anaconda3\Scripts\prody.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'prody'
Traceback (most recent call last):
  File "C:\Users\Christos\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Christos\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Christos\anaconda3\Scripts\prody.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'prody'
    while executing
"exec $::NMWiz::pybin $::NMWiz::prody {*}$args"
    (procedure "::NMWiz::prodySubmitPCAjob" line 61)
    invoked from within
"::NMWiz::prodySubmitPCAjob"
    (procedure "::NMWiz::prodySubmitJob" line 26)
    invoked from within
"::NMWiz::prodySubmitJob"
    invoked from within
".nmwizprody.submitFrame.prodySubmit invoke"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke]"
    (procedure "tk::ButtonUp" line 24)
    invoked from within
"tk::ButtonUp .nmwizprody.submitFrame.prodySubmit"
    (command bound to event)

I am not sure what is going on or how I can fix this issue. I have tried uninstalling and reinstalling prody but that does not seem to fix the error. I appreciate any help with this!

christos-efthymiou avatar Jul 21 '22 14:07 christos-efthymiou

I think the problem is that you are using windows, so you have prody.exe instead of prody. Probably what you need to do is make some kind of copy or link to make vmd see a file called prody.

I haven't tried it, but it sounds like the things described at https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/ could work.

jamesmkrieger avatar Jul 21 '22 15:07 jamesmkrieger

I followed the tutorial you provided and created a symbolic link to prody.exe and it solved that problem. However, I now get an error with writepdb:

atomsel: writepdb failed.
atomsel: writepdb failed.
    while executing
"$sel writepdb $prefix.pdb"
    (procedure "::NMWiz::prodySubmitPCAjob" line 40)
    invoked from within
"::NMWiz::prodySubmitPCAjob"
    (procedure "::NMWiz::prodySubmitJob" line 26)
    invoked from within
"::NMWiz::prodySubmitJob"
    invoked from within
".nmwizprody.submitFrame.prodySubmit invoke"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke]"
    (procedure "tk::ButtonUp" line 24)
    invoked from within
"tk::ButtonUp .nmwizprody.submitFrame.prodySubmit"
    (command bound to event)

Any ideas?

christos-efthymiou avatar Jul 21 '22 18:07 christos-efthymiou

Glad to hear.

No ideas straight away. Sorry. I’ll have to look more carefully at the code

jamesmkrieger avatar Jul 21 '22 18:07 jamesmkrieger

Okay, please let me know if you identify any solutions as I would really like to be able to use this plugin.

christos-efthymiou avatar Jul 24 '22 14:07 christos-efthymiou

I can't see any problem with that code section and it runs fine on my machine with the windows subsystem for linux.

Can you upload a screenshot please, so I can more of what's happening

jamesmkrieger avatar Aug 07 '22 14:08 jamesmkrieger

I am not sure what the issue is but now I am experiencing the original error even though I designate path to ProDy by giving the symlink just as before:

Traceback (most recent call last):
  File "C:\Users\Christos\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Christos\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Christos\anaconda3\Scripts\prody.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'prody'
Traceback (most recent call last):
  File "C:\Users\Christos\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Christos\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Christos\anaconda3\Scripts\prody.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'prody'
    while executing
"exec $::NMWiz::pybin $::NMWiz::prody {*}$args"
    (procedure "::NMWiz::prodySubmitPCAjob" line 61)
    invoked from within
"::NMWiz::prodySubmitPCAjob"
    (procedure "::NMWiz::prodySubmitJob" line 26)
    invoked from within
"::NMWiz::prodySubmitJob"
    invoked from within
".nmwizprody.submitFrame.prodySubmit invoke"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke]"
    (procedure "tk::ButtonUp" line 24)
    invoked from within
"tk::ButtonUp .nmwizprody.submitFrame.prodySubmit"
    (command bound to event)

Here are screenshots of the steps I am taking:

image image image image image

How are you designating the path to the prody executable in the Windows subsystem for Linux? I am not sure why I cannot recreate the second issue now.

christos-efthymiou avatar Aug 09 '22 13:08 christos-efthymiou

I think I did it through activating a conda environment. We had a related issue with drugui in our workshops where a conda environment helped too.

It looks like you have managed to get it running now

jamesmkrieger avatar Aug 09 '22 13:08 jamesmkrieger

Maybe the second error was just a fluke occurrence where your computer had some problems accessing files

jamesmkrieger avatar Aug 09 '22 14:08 jamesmkrieger

Sorry if I was unclear, but the program still is not working. When I now give the path to the symlink I created, I still get the error about how no module named 'prody' could be found. Originally when I created the symlink it caused that second error to appear, but now I am getting the first error again even with using the symlink.

christos-efthymiou avatar Aug 09 '22 16:08 christos-efthymiou

but once you provide the path to it then you get something running as seen in your screenshot of the terminal

Have you tried using a conda environment and activating it before opening vmd?

jamesmkrieger avatar Aug 09 '22 20:08 jamesmkrieger

Yes it starts running but then immediately gives that error.

Could you explain how to create/install a conda environment for prody? I am trying to go to the website http://prody.csb.pitt.edu/ to find instructions, but the site is not working right now

christos-efthymiou avatar Aug 10 '22 09:08 christos-efthymiou

  1. Download Anaconda (or Miniconda) and install it

  2. open a terminal (cmd, powershell, etc.) and run the following:

conda create -n prody_env python=3.9 matplotlib
conda activate prody_env
pip install prody
  1. Run vmd from the terminal.

If it’s a new terminal, run conda activate prody_env first

It may help to an alias for vmd to your terminal profile (see https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7 for powershell)

jamesmkrieger avatar Aug 11 '22 07:08 jamesmkrieger

Thank you for the instructions.

I still trying to get the program to work, and see the following error:

SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\Users\Christos\anaconda3\Scripts\prody.exe on line 1, but no encoding declared; see https://python.org/dev/peps/pep-0263/ for details
SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\Users\Christos\anaconda3\Scripts\prody.exe on line 1, but no encoding declared; see https://python.org/dev/peps/pep-0263/ for details
    while executing
"exec $::NMWiz::pybin $::NMWiz::prody {*}$args"
    (procedure "::NMWiz::prodySubmitPCAjob" line 61)
    invoked from within
"::NMWiz::prodySubmitPCAjob"
    (procedure "::NMWiz::prodySubmitJob" line 26)
    invoked from within
"::NMWiz::prodySubmitJob"
    invoked from within
".nmwizprody.submitFrame.prodySubmit invoke"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke]"
    (procedure "tk::ButtonUp" line 24)
    invoked from within
"tk::ButtonUp .nmwizprody.submitFrame.prodySubmit"
    (command bound to event)

I am not really sure what to make of this error or what else I can try to get the program working. Thanks for all the help!

christos-efthymiou avatar Aug 16 '22 18:08 christos-efthymiou

This is odd and I've no idea what to do about it. @SHZ66, any ideas?

Sorry for not replying sooner

jamesmkrieger avatar Jan 31 '23 14:01 jamesmkrieger