Skip to content

Moving in dihedral space #1040

Description

@samarjeet

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

Activity

  1. dwhswenson commented on Jul 28, 2021

    @dwhswenson
    Member

    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:

    1. 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)
    2. 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).
    3. 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.

  2. dwhswenson commented on Jul 28, 2021

    @dwhswenson
    Member

    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.

  3. samarjeet commented on Jul 30, 2021

    @samarjeet
    Author

    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!

  4. dwhswenson commented on Aug 11, 2021

    @dwhswenson
    Member

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions