insilichem / ommprotocol

A command line application to launch molecular dynamics simulations with OpenMM
http://ommprotocol.readthedocs.io
GNU Lesser General Public License v3.0
39 stars 8 forks source link

Random Velocities #13

Closed Lrolmar closed 5 years ago

Lrolmar commented 5 years ago

Hello!

I would like to run replicas with your script, but starting from a restart point and randomizing the initial velocities. Is this already considered in your script or should I change something?

Thank you.

jaimergp commented 5 years ago

I am not sure this would work with the current code (otherwise, the changes should be easy), but you can try with velocities: None (null in Yaml speech), which would force reassignation from the Boltzmann distribution:

# input
topology: sys.prmtop
velocities: null
checkpoint: simulation.state.xml
Lrolmar commented 5 years ago

I tried this input:

topology: str2_solv.prmtop
velocities: null
checkpoint: amyloid2_8_production.rs.20000000.restart

And this is the content of omm.err file:

  File "/QFsoft/applic/python/conda/envs/openmm-7.1/bin/ommprotocol", line 11, in <module>
    load_entry_point('ommprotocol==0.1.10', 'console_scripts', 'ommprotocol')()
  File "/QFsoft/applic/python/conda/envs/openmm-7.1/lib/python3.6/site-packages/ommprotocol-0.1.10-py3.6.egg/ommprotocol/__init__.py", line 61, in run_protocol
  File "/QFsoft/applic/python/conda/envs/openmm-7.1/lib/python3.6/site-packages/ommprotocol-0.1.10-py3.6.egg/ommprotocol/io.py", line 899, in prepare_input
  File "/QFsoft/applic/python/conda/envs/openmm-7.1/lib/python3.6/site-packages/ommprotocol-0.1.10-py3.6.egg/ommprotocol/io.py", line 926, in prepare_handler
  File "/QFsoft/applic/python/conda/envs/openmm-7.1/lib/python3.6/site-packages/ommprotocol-0.1.10-py3.6.egg/ommprotocol/utils.py", line 111, in sanitize_path_for_file
  File "/QFsoft/applic/python/conda/envs/openmm-7.1/lib/python3.6/posixpath.py", line 235, in expanduser
    path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
jaimergp commented 5 years ago

Ok, this is a bug, then. I will try to fix it soon. Is this urgent?

Lrolmar commented 5 years ago

Kind of, I need to do this before the end of June.

jaimergp commented 5 years ago

Ok, try with latest master locally in your computer. It should be fixed.

Instructions:

conda create -n ommprotocol-dev -c omnia -c insilichem ommprotocol
conda activate ommprotocol-dev
conda uninstall ommprotocol --force
pip install -U https://github.com/insilichem/ommprotocol/archive/master.zip
Lrolmar commented 5 years ago

It works! As I see it is a development version, may I ask to put it in the cluster or better wait?

jaimergp commented 5 years ago

I can cut a new release so Sergi can update the cluster version. Subscribe to this repo (releases only is enough) to get a notification once that's done!

jaimergp commented 5 years ago

conda packages are ready. Installers creation failed, but I don't think people are using those. I will post those later.