Calculating error bars for FES

853 views
Skip to first unread message

galmas

unread,
Aug 19, 2018, 8:39:43 AM8/19/18
to PLUMED users
Hi All,
I have performed a metdynamics simulation where I biased the angle between a protein's two domains.
I'm reweighing the data using the attached plumed_reweigh.dat file attached here.
How can I calculate error bars for the FES? Is it possible to do it using PLUMED or do I need to use some external script?

Any help would be much appreciated!

Cheers,
Gal.
plumed_reweight.dat

Gareth Tribello

unread,
Aug 19, 2018, 8:44:10 AM8/19/18
to plumed...@googlegroups.com
Hello

Have a read of the tutorials in the manual.  These two tutorials will probably prove helpful.




Gareth

--
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/bd9428b7-063b-44f5-a7b7-4a68e64f0167%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<plumed_reweight.dat>

galmas

unread,
Aug 19, 2018, 8:46:12 AM8/19/18
to PLUMED users
Thank you Gareth.
I'll take a look at it.

Cheers

galmas

unread,
Aug 21, 2018, 4:46:25 AM8/21/18
to PLUMED users
Hi Gareth,
Following the block analysis tutorials, I calculated block averages for my the histogram derived from my data after reweighing it (the data) using REWEIGHT_METAD. I then used the merge-histograms.py script from the tutorial to get the average histogram and the error bars. I'm wondering how to proceed from here in order to convert the histogram and error bars to a FES. I guess I need to use CONVERT_TO_FES with the average histogram, but what about the error bars?

Any help would be much appreciated
Cheers,
Gal.

Gareth Tribello

unread,
Aug 21, 2018, 5:00:36 AM8/21/18
to plumed...@googlegroups.com
Hello

You can do convert to fes on your final averaged histogram easily.  All CONVERT_TO_FES is doing is taking each element of the histogram, h_i, and transforming it using the following expression

PastedGraphic-1.pdf
PastedGraphic-2.pdf

galmas

unread,
Aug 23, 2018, 8:55:39 AM8/23/18
to PLUMED users
Thank you Gareth!
So if I got it right, in order to obtaine the FES error, all I need to do is take delta-Hi (given by the third column in the merge-histograms.py output) and divide it by Hi (given by the second column in the merge-histograms.py output).

On the same matter, if I repeated my metadynamics symulation twice, is it legit to compute my average histogram on the data collected from both simulations?

I was also wondering, given that one needs to perform block analysis in order to obtain the error for a metadynamics simulation, what is the purpose of computing a continuos histogram (that is, using HISTOGRAM without CLEAR and STRIDE)? Does a FES obtain from such a procedure is meaningful? or maybe one will use it when he has multiple simulations and each of them will be considered as one block?

Cheers,
Gal.

Gareth Tribello

unread,
Aug 23, 2018, 10:01:08 AM8/23/18
to plumed...@googlegroups.com
Hello


Thank you Gareth!
So if I got it right, in order to obtaine the FES error, all I need to do is take delta-Hi (given by the third column in the merge-histograms.py output) and divide it by Hi (given by the second column in the merge-histograms.py output).

This is correct.

On the same matter, if I repeated my metadynamics symulation twice, is it legit to compute my average histogram on the data collected from both simulations?

You can combine the two trajectories from the two simulations and do the block analysis on the concatenated trajectory.  Alternatively, lets say that you ran N simulations rather than 2.  You could calculate a separate histogram from each simulation and then merge all these histograms using merge-histograms.  If the initial configurations in the N simulations are different this is like dividing a single long trajectory into N blocks.  In both cases the blocks of trajectory that you are computing the histograms for should be statistically decorated. 

This won’t work with just two trajectories though because you cannot really compute a meaningful sample variance for each of your bins.

I was also wondering, given that one needs to perform block analysis in order to obtain the error for a metadynamics simulation, what is the purpose of computing a continuos histogram (that is, using HISTOGRAM without CLEAR and STRIDE)? Does a FES obtain from such a procedure is meaningful? or maybe one will use it when he has multiple simulations and each of them will be considered as one block?

The FES is meaningful if you analyse the whole trajectory at once.  In fact when you do this you will get the same result for the final FES as you would get by doing the block analysis.  See:


The issue, however, is that if you just analyse the data you do not get any error bars. As the fes is a function of an average the error bars are important.  After all if you don’t quote these how is someone trying to reproduce your work going to be able to distinguish whether the differences in the answer they get and your answer due to statistical error or systematic error.

Gareth

Cheers,
Gal.


On Tuesday, August 21, 2018 at 12:00:36 PM UTC+3, Gareth Tribello wrote:
Hello

You can do convert to fes on your final averaged histogram easily.  All CONVERT_TO_FES is doing is taking each element of the histogram, h_i, and transforming it using the following expression


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

galmas

unread,
Aug 23, 2018, 10:23:18 AM8/23/18
to PLUMED users
Thanks again Gareth, I really appreciate it!

Last question I hope :)
I tried the two methods for reweighting from the tutorials - reweighting by considering the time-dependence of the metadynamics bias potential, and reweighting using the metadynamics bias potential and assuming constant bias.
The two methods give similar FESs but there is a difference in the hight of the free-enrgy barrier separating the two states of my system.
Is one of these methods considered to be superior to the other?

Cheers,
Gal.

Gareth Tribello

unread,
Aug 23, 2018, 10:32:51 AM8/23/18
to plumed...@googlegroups.com
What do you mean when you say you use the time-dependent bias from the metadynamics?   Do you mean that you use the quantity called metad.bias or metad.rbias?  This is important.  If you are using metad.bias then what you are doing is wrong.  You need to compute and use metad.rbias if you are not using the final value of the metadynamics bias to reweight.  In theory this method is better as you are using more of the data.  In practise, however, my experience has been that it doesn’t make much of a difference.  

I would say look at the error bars.  If you have done the block averaging correctly and if you have smaller error bars with one particular method then that may be sight that that is the better method for your particular calculation.  

Gareth

galmas

unread,
Aug 23, 2018, 10:41:45 AM8/23/18
to PLUMED users
I used the REWEIGHT_METAD function that takes metad.rbias.
I'll compare the error bars as you suggested.

Thanks!
Reply all
Reply to author
Forward
0 new messages