Repository navigation
Moving in dihedral space #1040
Description
Activity
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
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) - 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.- Use OpenMMTools and create a custom MCMC Move for your dihedral move (see the
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
DynamicsEngineshould 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_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.
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