Colvars / colvars

Collective variables library for molecular simulation and analysis programs
http://colvars.github.io/
GNU Lesser General Public License v3.0
196 stars 56 forks source link

usage of abf_integrate #702

Open meghaparashar2 opened 4 days ago

meghaparashar2 commented 4 days ago

Dear all, I am using eABF free energy method to calculate dimerization energy. For this I have divided the 1d CV space in different windows and did the simulations. Now I am having .czar.grad files as well .hist.grad files. I used InputPrefix to get the PMF. Now to check the convergence I want to use abf_integrate but documentation is not very clear on how to use it. I had few questions about it, like:

  1. Can I supply .hist.grad files as I want to see the time evolution of RMSD of PMF I got from eABF and from abf_integrate, if not, then how can that be done?
  2. How one can get the evolution of PMF as a function of simulation time using, can it be done using .hist. files?

Thanks, Megha

jhenin commented 4 days ago

Dear Megha, This is a fair question, the workflow for this is a little complicated. abf_integrate will only integrate a single gradient grid, it won't integrate all the time steps stored in a history file. The good news is that history files are just concatenated grid files, so you can split the hist.grad file and process each of the fragments with abf_integrate then concatenate the resulting free energy files. Once you have a history file, the simplest way to look at convergence is with this script:

import colvars_grid as cvg
import matplotlib.pyplot as plt

pmf_traj = cvg.colvars_grid('mysim.hist.pmf')
plt.plot(pmf_traj.convergence())

This uses the Python module found here: https://github.com/Colvars/colvars/blob/master/colvartools/colvars_grid.py

meghaparashar2 commented 3 days ago

Dear J Henin, Thanks for your quick reply. While going through the paper I noticed there are 4 convergence criterion used by the authors (Fig.5 & Fig.6). But the colvars_grid module is acting like a black box, I have no idea what is going on. I had few questions about this like:

  1. How the RMSD of PMF is being calculated, what is the by default user provided numerical value (if it is working like abf_integrate)?
  2. How can I calculate Sampling entropy, Sampling heterogeneity?
  3. I am assuming RMSD of grad can be obtained in a similar fashion as thethe RMSD of PMF was obtained, am i right?
  4. How the error bars were calculated in the paper?

Can you please refer me to a more explained documentation of these?

Thanks much! Megha

meghaparashar2 commented 2 days ago

Dear J Henin, I think I have understood most of the part of convergence calculations. Though I have to ask one thing, what does 'nats' mean, that's you have used in the plot of sampling entropy and sampling heterogeneity?

Thank you! Megha