Speeding up metadynamics

728 views
Skip to first unread message

distribut...@googlemail.com

unread,
Mar 1, 2018, 5:51:29 PM3/1/18
to PLUMED users
Hi all,

I am performing well tempered meta dynamics to calculate the free energy of CG protein association/dimerisation.

All is going very well, however, it's been running for a very long time (approx 30 us). I can see signs of sampling along my desired CV, but I don't think the energy landscape is flat yet and I believe my energy potentials are becoming far too small. 

I don't quite understand the RESTART keyword. I would ideally like to run a gromacs continuation run (mdrun .... cpi ....) whilst reading from and continuing to add to my existing HILLS files but "refreshing" the potentials I'm putting down. How do I do this?

Thanks
Anthony

Giovanni Bussi

unread,
Mar 2, 2018, 1:09:47 PM3/2/18
to plumed...@googlegroups.com
Hi,

When you restart PLUMED does the right thing: the result is the same that you would have obtained with a single long run.

In order to increase the Gaussian height upon restart you have two options:

1. Actually increase HEIGHT. The bias will be read from input, but new hills will be high again. I do not recommend this, since in this manner you implicitly assign a much lower weight to the past trajectory. Personally, I would rather discard the first part and run a new trajectory with higher HEIGHT. In addition, it is likely that the problem will appear again after a while.

2. Increase the bias factor. This bias will be read from input and scaled according to the new bias factor. Hills will be high again since the factor exp(-V/DeltaT) will be higher. I would recommend this way.

Notice that increasing the bias factor is equivalent to admitting that the problem in the first part of the simulation was that the bias factor was too low, i.e. that barriers were larger than expected and that, for this reason, the exploration in the first run was limited. However, it is also possible that the reason why the system remained stuck was different. Namely, if the CV that you chose is not appropriate, the system will remain stuck just because a static potential that allows you to explore the whole CV domain does not exist. You can think that the diffusion coefficient is so low that even if the free-energy landscape is flat your system cannot diffuse. Or you can think that there are orthogonal barriers that your system cannot cross easily. Usually, it is a mixture of the two.

Again, you have two options:
- Switch to non-well-tempered metadynamics (or, equivalently: bias factor so large that hills will not decrease their height during the simulation). In this case the bias will not converge, but there are heuristic indications that its average might converge to the correct free-energy profile. You should pay attention to hysteresis effects. In case they are significant, it is possible that the time-average of the free-energy estimator will be biased.
- Change CV, or use more CVs.

Finally, if you want to switch to non-well-tempered metad, notice that there are a few technicalities that changed between PLUMED 2.3 and 2.4 (see changelog of 2.4). If you want to mix different versions (e.g. continue with 2.4  a simulation done with 2.3) you might have to fix the HILLS file by hand.

Hope this helps,

Giovanni



--
You received this message because you are subscribed to the Google Groups "PLUMED users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users+unsubscribe@googlegroups.com.
To post to this group, send email to plumed...@googlegroups.com.
Visit this group at https://groups.google.com/group/plumed-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/34326466-addb-4f59-b2d6-d09be615c814%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

distribut...@googlemail.com

unread,
Mar 2, 2018, 1:32:21 PM3/2/18
to PLUMED users
Hi Giovanni,

I am a little confused in the context of Gromacs vs Plumed keywords. 

Just to be clear, I won't 'restart' a gromacs simulation unless I start from 0 ps. Instead, I will 'continue' a simulation (the usual -cpi), probably due to the permitted run-time on a cluster from maxingout. Therefore, what exactly does the PLUMED keyword RESTART actually do? And when should you use it? If I can understand that, then I think I will have a better understanding of your answer.

Many thanks
Anthony 

Massimiliano Bonomi

unread,
Mar 2, 2018, 1:36:36 PM3/2/18
to plumed...@googlegroups.com
Actually “restart” is often used as a synonym for continuation of a molecular dynamics simulation.
See for example here:

http://www.gromacs.org/Documentation/How-tos/Doing_Restarts
> --
> You received this message because you are subscribed to the Google Groups "PLUMED users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users...@googlegroups.com.
> To post to this group, send email to plumed...@googlegroups.com.
> Visit this group at https://groups.google.com/group/plumed-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/de59c91b-d8d9-4397-855b-4b6edd132432%40googlegroups.com.

distribut...@googlemail.com

unread,
Mar 2, 2018, 1:47:42 PM3/2/18
to PLUMED users
Hi Max, yes I understand that which is why understanding the precise meaning of RESTART in PLUMED is not only important but currently, quite confusing. Is it too synonymous with "continuation" like Gromacs (and therefore nothing is being changed but PLUMED needs to know something stopped e.g., cluster time maxed out), or is it more "restart over" i.e., something is being restarted via the resetting of parameters or does it me "restart with"?  

I currently have RESTART at the beginning of my PLUMED input file after having performed my first Gromacs continuation (mdrun -cpi ... as I ran out of server time). What this correct?

I do not mean to come across as pedantic, I only wish to use PLUMED correctly.

Thanks
Anthony

Massimiliano Bonomi

unread,
Mar 2, 2018, 1:52:05 PM3/2/18
to plumed...@googlegroups.com
In the context of metadynamics simulations, when you add the RESTART keyword:

1) the Gaussians deposited by previous metadynamics runs and written to file (FILE keyword) will be read and used
to create the bias potential that you had at the end of the previous simulation

2) New Gaussians will be appended to the same file used in previous simulations

3) if you were printing other information to file using PRINT keyword, these will be appended to the same file.


Hope this helps,

Max
> To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/685cc1af-8ec7-4055-afdc-9cf44be12ad3%40googlegroups.com.

Massimiliano Bonomi

unread,
Mar 2, 2018, 1:53:04 PM3/2/18
to plumed...@googlegroups.com

> I currently have RESTART at the beginning of my PLUMED input file after having performed my first Gromacs continuation (mdrun -cpi ... as I ran out of server time). What this correct?

Yes!
> To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/685cc1af-8ec7-4055-afdc-9cf44be12ad3%40googlegroups.com.

distribut...@googlemail.com

unread,
Mar 2, 2018, 2:07:40 PM3/2/18
to PLUMED users
Brilliant, thank you. 

Massimiliano Bonomi

unread,
Mar 2, 2018, 2:10:52 PM3/2/18
to plumed...@googlegroups.com
Please keep in mind that what I described happens if you just add the RESTART keyword before your second run. If you also change other parameters, like Giovanni said, different behaviors will be triggered (see his email).

Max

Sent from my Nexus. Please excuse typos and brevity.


To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users+unsubscribe@googlegroups.com.

To post to this group, send email to plumed...@googlegroups.com.
Visit this group at https://groups.google.com/group/plumed-users.

distribut...@googlemail.com

unread,
Mar 2, 2018, 2:17:29 PM3/2/18
to PLUMED users
Hi Max,

Thanks for that. Nothing's changed in the actual PLUMED input file; besides adding the RESTART keyword. 

With regards to Giovanni's email, I have been left pondering as to whether I persevere with my simulation or start again with a different set of parameters. I have been running a CG transmembrane helix dimer simulation. I know I've got the right set of CVs as I've performed a dummy run using test bias and height just to see how the two peptides manoeuvre. I am currently somewhere close to 35 us of simulation time (remember it's CG), but I heard from a member of Mark Sansom's group in Oxford that I'm probably looking at around 90 - 100 us!

Thanks
Anthony  

Massimiliano Bonomi

unread,
Mar 2, 2018, 2:21:55 PM3/2/18
to plumed...@googlegroups.com
Lucky you, I am never sure I have the right CVs ;-) 

Jokes apart, if you have a rough idea of the barriers you are expecting in the free energy as a function of your CVs, I would start making sure you have chosen the BIASFACTOR wisely.

Max



Sent from my Nexus. Please excuse typos and brevity.
To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users+unsubscribe@googlegroups.com.

To post to this group, send email to plumed...@googlegroups.com.
Visit this group at https://groups.google.com/group/plumed-users.

distribut...@googlemail.com

unread,
Mar 3, 2018, 3:53:01 AM3/3/18
to PLUMED users
Hi both,

Very quick question related to restarts and changing parameters halfway through a study.

Would an adjustment to the wall upper bounds of a distance CV mess anything up on restarting PLUMED?  I was thinking that the next time my cluster job runs out of wall-time, I'll resub with mdrun ... -cpi ..... and RESTART at the top of my PLUMED input file, and use a different upper wall value for a distance CV. So not, this is where I already have a HILLS file which will be read in and appended to. 

I am currently using an upper bound of 6 nm for the y-distance between the COM of two helices. This was estimated from lipid-mediated effects I've seen in all-atom umbrella sampling simulations of my own. I do know that these forces aren't as prevalent in CG models, and usually drop off at 3.5 nm of interhelical distance. However, I kept it at 6 nm not expecting the simulations to take quite so long to explore this amount of conformational search space. 

Thanks
Anthony

Giovanni Bussi

unread,
Mar 3, 2018, 5:56:43 AM3/3/18
to plumed...@googlegroups.com
I think that should work. Clearly, free energy after 3.5nm won't be reliable 


For more options, visit https://groups.google.com/d/optout.
--
Sent from Gmail mobile
Reply all
Reply to author
Forward
0 new messages