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

Error in using restraints? #8

Closed HWaymentSteele closed 7 years ago

HWaymentSteele commented 7 years ago

Hi, I am getting a NotImplementedError when I try to use position restraints with ommprotocol. I am using inpcrd/prmtop input files. Below is the relevant stage in my yaml input:

-   name: eq1_NPT
    temperature: 10
    restrained_atoms: protein
    restraint_strength: 12
    minimization: False
    steps: 12500
    trajectory: DCD
    trajectory_every: 500

And below is the error output. I'm happy to provide more details if needed. Many thanks!

Traceback (most recent call last): File "/home/hannahw1/miniconda3/envs/msmb/bin/ommprotocol", line 11, in load_entry_point('ommprotocol==0.1.4+8.g195b837.dirty', 'console_scripts', 'ommprotocol')() File "/home/hannahw1/miniconda3/envs/msmb/lib/python3.5/site-packages/ommprotocol-0.1.4+8.g195b837.dirty-py3.5.egg/ommprotocol/init.py", line 20, in run_protocol File "/home/hannahw1/miniconda3/envs/msmb/lib/python3.5/site-packages/ommprotocol-0.1.4+8.g195b837.dirty-py3.5.egg/ommprotocol/md.py", line 91, in protocol File "/home/hannahw1/miniconda3/envs/msmb/lib/python3.5/site-packages/ommprotocol-0.1.4+8.g195b837.dirty-py3.5.egg/ommprotocol/md.py", line 282, in run File "/home/hannahw1/miniconda3/envs/msmb/lib/python3.5/site-packages/ommprotocol-0.1.4+8.g195b837.dirty-py3.5.egg/ommprotocol/md.py", line 461, in apply_restraints File "/home/hannahw1/miniconda3/envs/msmb/lib/python3.5/site-packages/ommprotocol-0.1.4+8.g195b837.dirty-py3.5.egg/ommprotocol/md.py", line 567, in apply_force File "/home/hannahw1/miniconda3/envs/msmb/lib/python3.5/site-packages/simtk/openmm/openmm.py", line 9617, in addParticle return _openmm.CustomExternalForce_addParticle(self, *args) NotImplementedError: Wrong number or type of arguments for overloaded function 'CustomExternalForce_addParticle'. Possible C/C++ prototypes are: OpenMM::CustomExternalForce::addParticle(int,std::vector< double,std::allocator< double > > const &) OpenMM::CustomExternalForce::addParticle(int)

jaimergp commented 7 years ago

Hello! Glad to see someone is actually using ommprotocol outside my lab. Thanks a lot for the effort!

I am typing from mobile, so please excuse any mistakes or inconsistencies.

I am rewriting some code right now so some parts might not work at master. Checkout to a previous tag and see if that works. I am confident that constraints do work though, so you can also use that for the time being (just replace restrained_atoms with constrained_atoms).

I am attending to a conference this week so my access to the computer will be limited. I will fix this as soon as possible.

Cheers, Jaime.

jaimergp commented 7 years ago

Hi again!

Commit ea01e48 should address this issue. Please confirm if it works or not!

HWaymentSteele commented 7 years ago

Thank you, it works!

jaimergp commented 7 years ago

Wonderful. I'll close this then. Feel free to submit any other problems you may find. Thanks for the report!