Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Open
christos-efthymiou opened this issue Jul 21, 2022 · 14 comments

Comments

@christos-efthymiou
Copy link

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!

@jamesmkrieger
Copy link
Contributor

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.

@christos-efthymiou
Copy link
Author

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?

@jamesmkrieger
Copy link
Contributor

Glad to hear.

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

@christos-efthymiou
Copy link
Author

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

@jamesmkrieger
Copy link
Contributor

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

@christos-efthymiou
Copy link
Author

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.

@jamesmkrieger
Copy link
Contributor

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
Copy link
Contributor

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

@christos-efthymiou
Copy link
Author

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.

@jamesmkrieger
Copy link
Contributor

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?

@christos-efthymiou
Copy link
Author

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

@jamesmkrieger
Copy link
Contributor

jamesmkrieger commented Aug 11, 2022

  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)

@christos-efthymiou
Copy link
Author

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!

@jamesmkrieger
Copy link
Contributor

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

Sorry for not replying sooner

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

No branches or pull requests

3 participants