durrantlab / wisp

WISP is a trajectory analysis tool that calculates and visualizes allosteric pathways.
https://durrantlab.github.io/wisp/
Academic Free License v3.0
3 stars 0 forks source link

Problem with using WISP #5

Open daviddelima opened 2 months ago

daviddelima commented 2 months ago

When I ran the command: wisp Int-R3-500ns-s10-ensemble.pdb --source_residues C_PLP_645 --sink_residues C_PLP_1449

it says: Traceback (most recent call last): File "/home/daviddelima/anaconda3/envs/wisp/bin/wisp", line 5, in from wisp.run import main File "/home/daviddelima/anaconda3/envs/wisp/lib/python3.12/site-packages/wisp/run.py", line 8, in from .cli import run_cli File "/home/daviddelima/anaconda3/envs/wisp/lib/python3.12/site-packages/wisp/cli.py", line 5, in from .contexts import ContextManager File "/home/daviddelima/anaconda3/envs/wisp/lib/python3.12/site-packages/wisp/contexts.py", line 7, in from ruamel.yaml import YAML ModuleNotFoundError: No module named 'ruamel'

So, I installed ruamel using pip install "ruamel.yaml<0.18.0"

And then, I rerun the command.

I get this: wisp Int-R3-500ns-s10-ensemble.pdb --source_residues C_PLP_645 --sink_residues C_PLP_1449 Traceback (most recent call last): File "/home/daviddelima/anaconda3/envs/wisp/bin/wisp", line 8, in sys.exit(main()) ^^^^^^ File "/home/daviddelima/anaconda3/envs/wisp/lib/python3.12/site-packages/wisp/run.py", line 79, in main run_wisp(context_manager) File "/home/daviddelima/anaconda3/envs/wisp/lib/python3.12/site-packages/wisp/run.py", line 48, in run_wisp sources = correlation_matrix_object.convert_list_of_residue_keys_to_residue_indices( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/daviddelima/anaconda3/envs/wisp/lib/python3.12/site-packages/wisp/utils.py", line 326, in convert_list_of_residue_keys_to_residue_indices index_of_key = np.nonzero( ^^^^^^^^^^^ IndexError: index 0 is out of bounds for axis 0 with size 0

I tried running this in jupyter-notebook: from wisp.run import run_wisp from wisp.contexts import ContextManager

Update context

context_manager = ContextManager() context_manager.pdb_path = "tests/files/trajectory_20_frames.pdb" context_manager.source_residues = ["C_LEU_10"] context_manager.sink_residues = ["C_ASP_11"]

Run wisp

paths = run_wisp(context_manager)

But it says that the loguru was missing when it was successfully installed

aalexmmaldonado commented 2 months ago

Hey @daviddelima, I am able to reproduce the error on my system. I am looking into this now.

aalexmmaldonado commented 2 months ago

Hey @daviddelima, can you clarify what sink and source residues you are trying to use? These are specified in the format CHAIN_RESNAME_RESNUM. The attempts you have provided (e.g., C_LEU_10 and C_PLP_645) are not present in your example structures.

daviddelima commented 2 months ago

Hi, it is these: --source_residues C_PLP_645 --sink_residues C_PLP_1449 or --source_residues C4A_PLP_645 --sink_residues C4A_PLP_1449

aalexmmaldonado commented 2 months ago

Your PDB file has no Chain IDs, so WISP automatically adds them based on TER lines. Residues 645 is on your first chain (i.e., A), and 1449 is on chain E. Your parameters should be:

 --source_residues A_PLP_645 --sink_residues E_PLP_1449

The error you were receiving is what would happen when WISP could not find that residue in the structure. I have improved this error raise to explicitly mention that there is something wrong with residue selections.

It would run after I fixed your source and sink residues. However, your structure is relatively large, with more than 1500 residues. WISP estimates the number of paths and will terminate the calculation if it exceeds some cutoff—which your structure fails. I turned off this check, and WISP could not finish a single structure in 20-ish minutes.

We are considering implementing a separate algorithm for these large structures, but this would likely not be ready in any reasonable time frame for your project.

Please let me know if you have any other questions. Otherwise, I will close this issue.

daviddelima commented 2 months ago

Hi, thank you so much!

Another thing. In the plugin installation, the .vmdrc file is not present in the latest versions of vmd. Is there another way to install it with VMD?