What's the best way to run meta-dynamics using OpenMM?

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Xinqiang Ding
Posts: 33
Joined: Tue May 05, 2015 2:27 pm

What's the best way to run meta-dynamics using OpenMM?

Post by Xinqiang Ding » Mon Aug 28, 2017 1:43 pm

After reading through the threads related to metadynamics in both this forum and github, I'm confused with what's the best way to run metadynamics using the newest OpenMM.

In the metadynamics I'm trying to run, the collective variables include the energies. I also want to define my own way of adding adaptive forces on the collective variables.

Here are the options:
1. Using OpenMM-PLUMED. Is OpenMM-Plumed flexible enough for my purpose?
2. Using CustomCVForce: I can use CustomCVForce to define a force as a collective variable. The question is how to add the bias potential on the collective variable periodically. Let's say I want to add a gaussian repulsive force every picosecond. Do I have to use the CustomIntegrator to do that? Is there a better way to add the biasing potential periodically?

Thanks,
Xinqiang

User avatar
Peter Eastman
Posts: 2593
Joined: Thu Aug 09, 2007 1:25 pm

Re: What's the best way to run meta-dynamics using OpenMM?

Post by Peter Eastman » Mon Aug 28, 2017 1:51 pm

1. Using OpenMM-PLUMED. Is OpenMM-Plumed flexible enough for my purpose?
As long as it supports the particular collective variables you want. The main downside of Plumed is performance. It can significantly slow down your simulation.
Let's say I want to add a gaussian repulsive force every picosecond.
Do you mean the force explicitly varies based on time? It can't directly access the time, but you can define a global parameter that you use to turn it on and off. You could either do that yourself by calling setParameter() on the Context, or you could have a CustomIntegrator update it automatically every time step.

Peter

User avatar
Xinqiang Ding
Posts: 33
Joined: Tue May 05, 2015 2:27 pm

Re: What's the best way to run meta-dynamics using OpenMM?

Post by Xinqiang Ding » Mon Aug 28, 2017 2:15 pm

Do you mean the force explicitly varies based on time?
No. The biasing force does not depend on time explicitly.

For the force F on the collective variable V, I need to repetitively add a Gaussian shape potential to the force F. This means after running a short time of simulation, the force F should be updated as F = F + exp(-0.5*(V-V0)**2). The force F will be updated for many times and multiple Gaussian potentials will be added to F. Therefore, the expression of F is changing. I'm not sure how calling setParameter() on the context would work.

Thanks,
Xinqiang

User avatar
Peter Eastman
Posts: 2593
Joined: Thu Aug 09, 2007 1:25 pm

Re: What's the best way to run meta-dynamics using OpenMM?

Post by Peter Eastman » Mon Aug 28, 2017 4:21 pm

Using Plumed will probably be the easiest approach. It has all the logic for doing that built in. It's possible to implement that on top of CustomCVForce, but it will take more work, and the performance won't necessarily be better since you'll probably have to reinitialize the context every time you add another Gaussian. So I'd try Plumed first.

POST REPLY