SECITON 2

WEIGHTED HISTOGRAM ANALYSIS METHOD (WHAM)

The final stage of our calculation is to use probability generated by umbrella sampling to get the free energy surface. But in umbrella sampling we have MD in 33 umbrella windows which will give biased probability distribution. We need to get unbiased probability distribution by reweighting and then patching all the umbrella windows using Weighted Histogram Analysis Method (WHAM).

Following instructions are given to reweight and generate free energy surface:

  • Compile the histogram code.
  • Prepare the input files (COLVAR, run.sh).

If one is using PLUMED for running simulations output files can be directly used. (Remove commented lines from COLVAR file ). Here, we need to delete data corresponding to 1 ns which is the time for the equilibration in every umbrella window in COLVAR file.

COLVAR file should have following information :

<Time> <CV1(ϕ)> <CV2 (ψ)> <added restraint>

run.sh has following information:

-T0:     (value in K) temperature of physical system. (Default: 300 K)
-tmin:   step number in COLVAR file, from which reweighting should start (Default:1)
-tmax :  step number in COLVAR file, at which reweighting should stop (Default: total number of steps in COLVAR file)
-grid:   <gridmin1> <gridmax1> <gridsize1> of CV1,<gridmin2> <gridmax2> <gridsize2> of CV2,……
-pfrqMD: Number of steps after which COLVAR file is updates
    • Run command run.sh for processing files from different umbrella windows.
$ sh run.sh

Output file: Probability file (Pu.dat). Rename it as PROB_i, where "i" is the umbrella index. These PROB files contains probability of (Φ, Ψ).

  • Collect all the PROB_i files in a folder PROB. These PROB_i are the input for WHAM analysis.
  • Compile the WHAM code.
$ mpif90 wham.F90 -o wham.x 
  • Prepare WHAM input files (whaminput, input).

input file contain following information:

<No. of CVs> <No. of umbrella windows> <Temperature>
<gridmin1> <gridmax1> <gridsize1> of CV1,
<gridmin2> <gridmax2> <gridsize2> of CV2,
…….

Temperature of system should be provided in Kelvin. Here, grid information should be same as used during reweighting.

whaminput file contains following information:

<Convergence criteria>
<Probability file name of umbrella window 1>
<Position of umbrella window> <Force constant> <No of steps used for MTD reweighting> of umbrella window 1
<Probability file name of umbrella window 2>
<Position of umbrella window> <Force constant> <No of steps used for MTD reweighting> of umbrella window 2
…..
<Probability file name of umbrella window h>
<Position of umbrella window> <Force constant> <No of steps used for MTD reweighting> of umbrella window h

  • Run the executable (wham_PLUMED_4D.x).
$ mpirun –np 8 wham.x (Running on 8 processors)

or

$ ./wham.x 

Input file: PROB_i, whaminput, input

Output file: free_energy, which contains the free energies.

We can project the reconstructed the 3-dimensional free energy surface on (Φ, ψ) plane.