You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to OPS but I love its modular design! Kudos to the architects! I would like to use OPS to move between two states by moving in the space of dihedrals i.e. each MC step changes the dihedral angles of the conformation. I am wondering if I need to create a new PathMover subclass for this. I will really appreciate some guidance on this! TIA
Thanks for the interest in OPS! If I understand correctly, you want to do path sampling where your "trajectories" will come from MC (based on moves in dihedral space) instead of MD. This should be perfectly feasible, but the thing you'll want to change will be the DynamicsEngine.
If you can use OpenMM to calculate energies, I think the easiest path would be:
Use OpenMMTools and create a custom MCMC Move for your dihedral move (see the MCDisplacementMove and MCRotationMove for analogous examples -- I haven't done this before, but it looks like you just need to write a _propose_positions method, plus helpers like __getstate__ which allow the MC move to be stored to disk)
Wrap that MC move in an OpenMM integrator (you may want to check with the OpenMMTools team for details on that -- I can imagine some problems here).
Once you have that integrator, it can be used directly in the existing OPS OpenMM engine -- just replace the VVVR integrator in our examples with your MC move integrator.
If you can't use OpenMM (or prefer to use an existing tool for the MC), or if it isn't possible to wrap the MC move in an OpenMM integrator, then what you'd want would be to create a subclass of DynamicsEngine. Docs are a bit incomplete (as always), but the section on writing custom engines has a decent start.
I've thought about this a little more, and I'm pretty sure using the OpenMMTools MCMC would require a new DynamicsEngine. Good news is, writing a new engine is pretty easy. So I did the core of it already. See #1041.
That awesome! I am still working on proposing a step in dihedral space. I also have plan to propose steps in normal mode space. The new DynamicsEngine should be useful for this as well. Thanks!
@samarjeet : The current draft in #1041 (as of commit e94fb60) should work. I haven't quite gotten the example to work yet, although your dihedral-based MCMC move is probably exactly what is needed. See #1041 (comment).
To try it out, you'll want to use a developer install of OPS, using the branch openmmtools_mc_engine from the dwhswenson fork of OPS. The quick installation instructions at that link may be the easiest way.
My advice would be modify the example to use your dihedral MC move and check that everything works for you in that situation (it should be easy, since that's just a 2D model in phi-psi).
Please let me know how it goes -- I probably won't come back to this for a while unless you run into problems.
Activity
dwhswenson commentedon Jul 28, 2021
Thanks for the interest in OPS! If I understand correctly, you want to do path sampling where your "trajectories" will come from MC (based on moves in dihedral space) instead of MD. This should be perfectly feasible, but the thing you'll want to change will be the
DynamicsEngine.If you can use OpenMM to calculate energies, I think the easiest path would be:
MCDisplacementMoveandMCRotationMovefor analogous examples -- I haven't done this before, but it looks like you just need to write a_propose_positionsmethod, plus helpers like__getstate__which allow the MC move to be stored to disk)If you can't use OpenMM (or prefer to use an existing tool for the MC), or if it isn't possible to wrap the MC move in an OpenMM integrator, then what you'd want would be to create a subclass of
DynamicsEngine. Docs are a bit incomplete (as always), but the section on writing custom engines has a decent start.dwhswenson commentedon Jul 28, 2021
I've thought about this a little more, and I'm pretty sure using the OpenMMTools MCMC would require a new
DynamicsEngine. Good news is, writing a new engine is pretty easy. So I did the core of it already. See #1041.samarjeet commentedon Jul 30, 2021
That awesome! I am still working on proposing a step in dihedral space. I also have plan to propose steps in normal mode space. The new
DynamicsEngineshould be useful for this as well. Thanks!dwhswenson commentedon Aug 11, 2021
@samarjeet : The current draft in #1041 (as of commit e94fb60) should work. I haven't quite gotten the example to work yet, although your dihedral-based MCMC move is probably exactly what is needed. See #1041 (comment).
To try it out, you'll want to use a developer install of OPS, using the branch
openmmtools_mc_enginefrom thedwhswensonfork of OPS. The quick installation instructions at that link may be the easiest way.My advice would be modify the example to use your dihedral MC move and check that everything works for you in that situation (it should be easy, since that's just a 2D model in phi-psi).
Please let me know how it goes -- I probably won't come back to this for a while unless you run into problems.