SrinivasMushnoori / repex

An implementation of the RepEx package as an application written in the EnTK API
MIT License
2 stars 2 forks source link

gromacs executable #30

Closed s10021205 closed 5 years ago

s10021205 commented 5 years ago

Hi there, I have recently downloaded the Repex which is successfully downloaded. Although the installation works well, the problem comes from user guide. Where I try to run: repex simconfig.json resconfig.json The error message shows: md_executable. I sent the email to my colleague, Srinivas, for help. He suggested me to change the path to the gromacs executable folder. I have tried that but the same error message shows. (p.s. the imagines show how I changed the path.) 2019-02-28 08-54-57 2019-02-28 09-56-21

SrinivasMushnoori commented 5 years ago

1) What exactly is the error? Is it a key error? Value error? Can you post the error traceback? 2) home/Jerry/.../gromacs/build/bin is the directory. You want to add to that a 'gmx' at the end, like ......build/bin/gmx

s10021205 commented 5 years ago

raceback (most recent call last): File "/usr/local/bin/repex", line 4, in import('pkg_resources').run_script('repex==3.0.2', 'repex') File "/home/jerry/.local/lib/python2.7/site-packages/pkg_resources/init.py", line 666, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home/jerry/.local/lib/python2.7/site-packages/pkg_resources/init.py", line 1453, in run_script exec(script_code, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/repex-3.0.2-py2.7.egg/EGG-INFO/scripts/repex", line 41, in

KeyError: 'md_executable'

I have added gmx at the end.

SrinivasMushnoori commented 5 years ago

Try this:

cd into your repex folder.

git checkout devel
pip install . --upgrade

Then try running the example.

SrinivasMushnoori commented 5 years ago

Actually ignore the above. Try this repex simconfig.json resconfig_local.json

SrinivasMushnoori commented 5 years ago

Jerry, I've pushed a patch to devel. It should work now.

git checkout devel
pip install . --upgrade

And then try.

s10021205 commented 5 years ago

I have tried the two commands you posted git checkout and pip install in repex folder. Then I go to experiemtns folder where the two files inside which are simconfig_local.json resconfig_local.json Quick question, in reconfig_local.json, I need to change the md_executable path? Or don't need to change anything?

s10021205 commented 5 years ago

2019-02-28 11-50-00

SrinivasMushnoori commented 5 years ago

Yes, you should change it to

home/Jerry/.../gromacs/build/bin/gmx
s10021205 commented 5 years ago

what about py_executable?

SrinivasMushnoori commented 5 years ago

That should be your python executable Do the following:

which python

that will return the location of your python executable. Copy/paste that into the python executable field.

s10021205 commented 5 years ago

Ok, anything I need to change before I execute the code?

2019-02-28 12-02-15

SrinivasMushnoori commented 5 years ago

Wait, why is it usr/bin/python ? Are you not using a virtual environment?

If not, you should be. Do the following:

cd
mkdir VirtualEnvs
cd VirtualEnvs
virtualenv repex
source repex/bin/activate

cd to your repex folder

git checkout devel
pip install . --upgrade

Then do a which python and paste THAT python executable in your resconfig_local.json

SrinivasMushnoori commented 5 years ago

Thanks for bringing this up: I should make it more explicitly clear in my user guide that the user is expected to always start from a virtual environment.

s10021205 commented 5 years ago

2019-02-28 12-20-49

SrinivasMushnoori commented 5 years ago

Please see previous comment.

s10021205 commented 5 years ago

Hi Srinivas! This is what I have in resconfig_local.json, please have a look. Any comment? "resource" : "local.localhost", "md_executable" : "/home/jerry/下載/gromoacs-2018.4/build/bin/gmx", "py_executable" : "/home/jerry/VirtualEnvs/repex/bin/python", "pre_exec" : "export amber_md=amber_14", "walltime" : 60, "cpus" : 4

SrinivasMushnoori commented 5 years ago

Should be fine.

s10021205 commented 5 years ago

Hi Srinivas! I believe I am in the Virtual Environment I tried repex simconfig.json resconfig_local.json And it shows the following error in the picture. (Sorry for the late update.) 2019-03-04 19-49-31

SrinivasMushnoori commented 5 years ago

What branch are you on? Please do git branch and tell me the output.

s10021205 commented 5 years ago

(repex) jerry@jerry-VirtualBox:~/repex/experiments$ git branch

SrinivasMushnoori commented 5 years ago

What are the contents of simconfig.json ?

s10021205 commented 5 years ago

"replicas" : 24, "replica_cores" : 1, "cycles" : 1, "exchange_method" : "exchangeMethods/TempEx.py", "md_executable" : "/home/jerry/下載/gromoacs-2018.4/build/bin/gmx", "timesteps" : 100, "basename" : "ace-ala"

SrinivasMushnoori commented 5 years ago

You're using the incorrect simconfig file. You are using the one from the master branch, but you are on devel.

{
    "replicas"       : 32,
    "replica_cores"  : 1,
    "cycles"         : 0,
        "exchange_method" : "exchangeMethods/TempEx.py", 
    "md_executable"  : "/home/jerry/下載/gromoacs-2018.4/build/bin/gmx",
    "timesteps"      : 100,
    "basename"       : "basename",
        "min_temp"       : 300,
        "max_temp"       : 550

}

https://github.com/SrinivasMushnoori/repex/blob/devel/examples/simconfig.json

Change your "basename" to the basename of your system.

s10021205 commented 5 years ago

Based on the website. 2.1.2 Basename

RepEx needs a basename to locate the files which will be used as input parameters for the MD component. These may include (depending on the MD engine) a coordinate file, a topology file, and a run-input file. That means I need to copy and paste the path where the topology file is? For example: /home/jerry/下載/v6k2_coil

SrinivasMushnoori commented 5 years ago

Please study this example: https://github.com/SrinivasMushnoori/repex/tree/usecase/peptide_gromacs/examples/gromacs_example

You MIGHT need to do the following:

git checkout usecase/gromacs
pip install . --upgrade
s10021205 commented 5 years ago

(repex) jerry@jerry-VirtualBox:~/repex$ git checkout usecase/gromacs error: pathspec 'usecase/gromacs' did not match any file(s) known to git.

SrinivasMushnoori commented 5 years ago

Apologies, it's usecase/peptide_gromacs

s10021205 commented 5 years ago

git checkout usecase/peptide_gromacs M examples/simconfig.json M experiments/resconfig_local.json M experiments/simconfig.json M tests/simconfig.json Branch 'usecase/peptide_gromacs' set up to track remote branch 'usecase/peptide_gromacs' from 'origin'. Switched to a new branch 'usecase/peptide_gromacs'

s10021205 commented 5 years ago

There is one more thing I want to add. On the user guide section of the website, it shows
repex simconfig.json resconfig.json Which is perfect but can you let the user know which is the specific folder (tests, experiments, examples) that to execute the code. In my case, in the examples folder, there is no reconfig.json in the tests folder, I get both in the experiments folder, there is no reconfig.json. Also, the same thing for the examples section. For me, I need to go to the tests folder instead of examples one. thanks!

SrinivasMushnoori commented 5 years ago

Thanks, Jerry. Yes there are multiple changes I need to make in the documentation and sync a few branches.

Did it work?

s10021205 commented 5 years ago

Morning! Yes it works and what's next? git checkout usecase/peptide_gromacs M examples/simconfig.json M experiments/resconfig_local.json M experiments/simconfig.json M tests/simconfig.json Branch 'usecase/peptide_gromacs' set up to track remote branch 'usecase/peptide_gromacs' from 'origin'. Switched to a new branch 'usecase/peptide_gromacs'

SrinivasMushnoori commented 5 years ago

Okay good. I'm going to close this ticket now, since this is resolved. Please study the peptide gromacs example and set up your own system in a similar manner.