Parallel tempering with OPES?

409 views
Skip to first unread message

Ajay Muralidharan

unread,
Jun 29, 2021, 5:14:27 PM6/29/21
to PLUMED users
Hello all,
I was wondering if OPES + parallel tempering is feasible. Conceptually, it should be similar to PTMetaD. I tested using gromacs@2019.6 patched with plumed@2.7. 

So i tried:
mpirun -n 6 gmx_mpi mdrun -deffnm topol -plumed plumed.dat -multidir topol0 topol1 topol2 topol3 topol4 topol5 -replex 100 -ntomp 2

With a plumed.dat that contains:
blah 
blah 

opes: OPES_METAD ...
  ARG=di
  FILE=Kernels.data
  TEMP=313   ( different for each replica)
  PACE=100
  BARRIER=7.5
  SIGMA=0.04
  SIGMA_MIN=0.02
  STATE_WFILE=State.data
  STATE_WSTRIDE=10000
  STORE_STATES
...

Questions:
It works. But will the replica exchange be implemented correctly? (given that it was originally meant for PTMetaD)

Many thanks!
Ajay

Pablo Piaggi

unread,
Jun 30, 2021, 9:34:15 AM6/30/21
to PLUMED users
Hello Ajay,

Yes, the exchange between replicas should be implemented properly for any action that introduces a bias potential, not just METAD.

You might be interested in trying a different (perhaps more elegant?) solution to your problem. You can build a two-dimensional bias potential with the energy and the CV you are using now. This can be done with OPES_EXPANDED such that a predefined temperature interval is sampled. If you do this, all replicas will sample the same distribution (you don't need exchanges so remove -replex) and you can then calculate observables at any temperature in the chosen interval through reweighting. See the second example here for details.

Good luck with your simulations.

Best,

Pablo

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/fd5ebfb0-e83b-41ed-b991-a6004ad11144n%40googlegroups.com.

Michele Invernizzi

unread,
Jun 30, 2021, 10:05:06 AM6/30/21
to plumed...@googlegroups.com
Hi Ajay,

I agree with Pablo, "PT-OPES" is in theory perfectly feasible but to my knowledge it has never been tested because the OPES_EXPANDED approach is more straightforward, and probably more robust.

I just want to add that you can find a working example with alanine dipeptide in this repository or equivalently on PLUMED-NEST at this link https://www.plumed-nest.org/eggs/21/006 under "multithermal_multiumbrella".
You will need the PLUMED development version to run OPES_EXPANDED.

Best,
Michele

Ajay Muralidharan

unread,
Jun 30, 2021, 5:56:44 PM6/30/21
to PLUMED users
Thanks for the suggestions!

Domenico Marson

unread,
Aug 10, 2022, 5:01:54 AM8/10/22
to PLUMED users
Dear Michele,
I'm resurrecting this old thread as I'm trying to combine (if it's possible) OPES_METAD/OPES_METAD_EXPLORE with OPES_EXPANDED, as was suggested here.
Trying to follow the suggestions, I encounter the problem that OPES_EXPANDED is complaining that it needs only ECV* variables as input (all the examples I found are with ECV_UMBRELLAS_*)

I tried applying EXPANDED and METAD_EXPLORE separately as reported below, but I'm uncertain as how to reweigh this kind of simulation, and particularly I'm not sure this is right in the first place...
ene: ENERGY
ecv: ECV_MULTITHERMAL ...
ARG=ene
TEMP_MIN=300
TEMP_MAX=600
TEMP=300
...
expand: OPES_EXPANDED ...
ARG=ecv.*
PACE=400
FILE=../DELTAFS
STATE_WFILE=../DELTAFSforRST
WALKERS_MPI
...
opes: OPES_METAD_EXPLORE ...
ARG=CV1,CV2,CV3
PACE=200
BARRIER=12
FILE=../KERNELS
STATE_WFILE=../KERNELSforRST
WALKERS_MPI
...

My only other option is to use the classical parallel tempering with gromacs, but it would be great to be able to run all within the OPES formalism!

Thank you for your time,
have a nice day,
Domenico


Michele Invernizzi

unread,
Aug 10, 2022, 9:04:17 AM8/10/22
to plumed...@googlegroups.com
Dear Domenico,

The most straightforward way of combining multithermal with a CV bias is via OPES_EXPANDED, using the multiumbrella ECV to generate the CV bias. When dealing with more than one CV, one can use a preliminary run (at a high temperature) of OPES_METAD or OPES_METAD_EXPLORE to automatically decide where to place the umbrellas. An example of this procedure can be found in section S5 of the supporting information of this paper https://pubs.acs.org/doi/10.1021/acs.jctc.2c00152 the input files are here https://github.com/invemichele/OPES-explore/tree/main/ala4/combined_multiT-psi
If the resulting sampling is good, then I think this is the best approach, it will give you a quasi-static bias and very reliable results via reweighing.

However, often the reason to combine multithermal and CV enhancement is that the system is challenging and both alone would not drive transitions. If this is the case, probably it's better to use a more exploratory approach, and combine OPES_METAD_EXPLORE with parallel tempering, as you would do with metadynamics. This will result in a more dynamical biasing, which should be better at escaping metastable states than the quasi-static bias of OPES_EXPANDED.

The setup you propose might also work, but it's less clear to me to what distribution the simulation will converge, and how the two biases will interact. 
If most of the energy is linked to water and not to the slow mode, then another possibility is to first converge the multithermal bias, and then add the OPES_METAD_EXPLORE. This can be done with two separate simulations, or by adding the option UPDATE_FROM=xxx to OPES_METAD_EXPLORE so that it will start biasing only after xxx steps, when the OPES_EXPANDED bias will be already quasi-static.

Hope this helps! You can send me an email if you'd like to discuss details specific of your system.

Best,
Michele 

Domenico Marson

unread,
Aug 10, 2022, 9:18:08 AM8/10/22
to PLUMED users
Dear Michele,
thank you for you quick and detailed explanation!

As you  pointed out the system I'm trying to describe is challenging (the three CVs are CMDISTs from different reference structures of a ~300aa protein).
I hoped I could get away with using just 4 GPUs with the combination of EXPLORE+EXPANDED,
but I think I'll go back to use parallel tempering on a cluster as soon as I'll get access to some nodes.

Meanwhile maybe I'll just try to play with what I have, just to have a better understanding of the very interesting methods that you developed!

Thanks again,
have a nice day,
Domenico
 


Reply all
Reply to author
Forward
0 new messages