Welcome to the repository dedicated to the implementation of the Weighted Histogram Analysis Method (WHAM) tailored explicitly for the analysis of outputs from replica discrete molecular dynamics simulations (rxDMD)1. In rxDMD simulations, a series of neighboring replicas spanning a temperature spectrum is utilized to effectively sample the conformational free energy landscape.
To overcome local free energy barriers and facilitate diverse conformational state sampling, temperature exchanges between adjacent replicas occur repeatedly, following the Metropolis criterion. The Andersen thermostat regulates the temperatures for each replica, ensuring efficient exploration of phase space2.
Subsequently, WHAM emerges as a powerful statistical method capable of reconstructing the underlying free energy landscape from such biased sampling data obtained in molecular dynamics simulations3,4. Moreover, WHAM provides the ensemble average value of specific parameters as a function of temperature, offering valuable insights into the thermodynamics of the system under study.
This repository serves as a comprehensive toolkit for researchers and practitioners involved in replica molecular dynamics simulations, empowering them with the means to analyze and interpret their simulation data effectively.
Python 3.6 or later versions are recommended. The version of dependencies may vary depending on the Python version.
Make sure you have these dependencies installed before running the scripts.
- Clone this repository to your local machine:
git clone https://github.com/songzhihenry/WHAM-py
-
Edit the file named rex.cond based on the temperature distribution of your replica simulation setup. Note that the temperature values in the rex.cond file are in Kelvin.
-
Edit the flist file, which stands for "file list". This file should include the file extensions of the trajectory data you intend to analyze, such as *.rg, .rmsd, etc.
-
Edit the fmatrix file, which stands for "file matrix". This file is useful if you have a large matrix of trajectory data, where the dimensions of the matrix correspond to the number of frames and parameters. This method of data analysis is beneficial for residue-wise or atom-wise interaction contacts that involve extensive parameters.
-
Edit the wham-ave-task file to specify and customize WHAM parameters. Ensure to review the file and adjust it according to your simulation case. The file contains comments to guide users in the correct input format.
-
Ensure that the trajectory data is located in the same directory as the script.
python wham-1.2.py wham-ave-task
- Ensure that the order of your trajectory data starts from 0.
- The total number of trajectories or replicas should match the number of replicas assigned in the wham-ave-task file.
1: Sugita, Y.; Okamoto, Y. Replica-Exchange Molecular Dynamics Method for Protein Folding. Chem. Phys. Lett. 1999, 314 (1–2), 141–151.
2: Andersen, H. C. Molecular Dynamics Simulations at Constant Pressure and/or Temperature. J. Chem. Phys. 1980, 72 (4), 2384–2393.
3: Kumar, S., Rosenberg, J. M., Bouzida, D., Swendsen, R. H. & Kollman, P. A. THE weighted histogram analysis method for free‐energy calculations on biomolecules. I. The method. J Comput Chem 13, 1011–1021 (1992).
4: John D. Chodera, William C. Swope, Jed W. Pitera, Chaok Seok, and Ken A. Dill, Use of the weighted histogram analysis method for the analysis of simulated and parallel tempering simulations, Chem. Theory Comput. 2007, 3, 1, 26–41.