Reweight multiple walker (mpi version)

675 views
Skip to first unread message

Ayan Majumder

unread,
Apr 29, 2022, 11:38:03 AM4/29/22
to PLUMED users
Hi,

I ran metadynamics using multiple walkers (WALKER_MPI) with 10 replicas. So, I have one HILLS file at ../ and 10 COLVAR.# files at ./  

The COLVAR.# files look like this, where d1 and d2 were used for metadynamics.

#! FIELDS time d1 d2 t metad.bias
#! SET min_t -pi
#! SET max_t pi
 0.000000 0.057606 0.946626 -0.516007 0.000000
 20.000000 0.013841 0.948577 -0.532588 0.000000
 39.999999 0.040088 0.919484 -0.574346 0.926157
 59.999999 -0.051937 0.865365 -0.521213 0.664927

I would like to compute the reweighted PMF along t CV, which I saved during the metadynamics run.

The process I am using,
1) Contatinate all COLVAR.# files
2) Then use this script:
------------------------------
# Read COLVAR file(Concatinated COLVAR.#)
d1: READ FILE=COLVAR IGNORE_TIME IGNORE_FORCES VALUES=d1
d2: READ FILE=COLVAR IGNORE_TIME IGNORE_FORCES VALUES=d2
t: READ FILE=COLVAR IGNORE_TIME VALUES=t

metad: READ FILE=COLVAR IGNORE_TIME VALUES=metad.bias

as: REWEIGHT_METAD TEMP=310 ARG=metad.bias
hh: HISTOGRAM ...
   ARG=t
   GRID_MIN=-3.14
   GRID_MAX=3.14
   GRID_BIN=500
   BANDWIDTH=0.05
   LOGWEIGHTS=as
...

ffhh: CONVERT_TO_FES GRID=hh TEMP=310

DUMPGRID GRID=ffhh FILE=histo 
---------------------------------------------

Can anyone please tell me if I am using the right method?

Thank you,
Ayan

Michele Invernizzi

unread,
May 1, 2022, 10:25:53 AM5/1/22
to plumed...@googlegroups.com
Dear  Ayan,

The reweighting method you describe would be OK for OPES_METAD or OPES_METAD_EXPLORE, but metadynamics requires a more careful treatment.
Various methods have been proposed to reweight metadynamics. The most popular (but not the latest/most advanced ones!) are:
  1. last-bias reweighting, described in this review and this tutorial
  2. bias-offset reweighting [or c(t) reweighting], described in this review and this tutorial.
In the limit of a converged simulation and ignoring the initial out-of-equilibrium part of the trajectory, all these different methods give you the same result, but in my experience they can vary significantly if convergence was not reached (see e.g. Fig 4b here).

Hope this helps.

Best,
Michele

--
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/87d6c8b8-f66c-4170-8558-a79bf9aed0cbn%40googlegroups.com.

Ayan Majumder

unread,
May 17, 2022, 4:03:50 PM5/17/22
to PLUMED users
Dear Michele,

Thanks so much for this explanation.

I was trying out method 1 that you mentioned, using the last bias method.

I have a clarifying question. As I am doing multiple walker using mpi version, I have many trajectories. So, if I want to use the last bias method, I need to concatenate all the trajectories. Does the order of the frame in the concatenated trajectory file matters? 

As of my understanding, it should not matter. But I would like to double-check as I am not very sure.

Thank you,
Ayan

Emma Rossi

unread,
Dec 15, 2023, 12:39:54 PM12/15/23
to PLUMED users
Dear Michele,

I ended up in this conversation since I have the same problem as Ayan. 
I'm running a standard MetaD using 4 walkers and I would like to extract the FES reweighting both the bias of the Metad and the potential due to the walls I applied on some CVs. 
I have a few questions concerning your reply and I would be grateful if you could clarify the following points.

Concerning your suggestion at point 1, basically I should extract the COLVAR_REWEIGHT.dat file for each walker, which contains time t, CVs values sampled along the trajectory at time t,  the total bias potential and the total bias related to the wall deposited at the istantaneous value of the CVs.

Then, I have to concatenate the COLVAR_REWEIGHT.dat of the 4 walkers and use the REWEIGHT_BIAS command to reweight the bias at once (thus, including the bias of all the walkers).
Finally, I have to apply the usual procedure to get the histogram and the final correct FES.

Is this "workflow" the correct way to manage the 4 walkers' output files in order to extract the reweighted FES?

I would be extremely grateful if you could give me any feedback.

Best regards,
Emma Rossi

Emma Rossi

unread,
Dec 17, 2023, 12:27:44 PM12/17/23
to PLUMED users
Sorry, I found this conversation https://groups.google.com/g/plumed-users/c/wv3M98fLs4g/m/KoBe-xeiAQAJ which explains how to proceed.

Thank you.

Best regards,
Emma Rossi

Reply all
Reply to author
Forward
0 new messages