New WHAM code

Authors: David W.H. Swenson

This module includes a re-write of the OpenPathSampling reweighted histogram analysis code. This fixes limitations and is more readable than the previous version.

Purpose of Module

Methods like transition interface sampling (TIS) sample multiple ensembles, and then combine the results from the individual restricted ensembles to obtain results for the unrestricted (natural) ensemble, such as the rates of a reaction or projections of the free energy surface. One approach to combining these ensembles is the weighted histogram analysis method (WHAM). This module provides an implementation of WHAM that is specialized for path sampling. Details about the WHAM method (as used for calculating free energies) can be found in Frenkel and Smit, section 7.3.

The module is a rewrite of previous code in OPS. The previous code had several limitations, most notably the assumption that all ensembles had the same number of sampling. Practical cases required that the number of samples in each ensemble be allowed to vary. In addition, the previous code was poorly documented and untested. This module fixes all of that, and includes detailed comments connecting the code to the equations in Frenkel and Smit.

Background Information

This module builds on OpenPathSampling, a Python package for path sampling simulations. To learn more about OpenPathSampling, you might be interested in reading:


Tests in OpenPathSampling use the nose package.

This module has been included in the OpenPathSampling core. Its tests can be run by setting up a developer install of OpenPathSampling and running the command nosetests from the root directory of the repository.


An example of how to use this code can be found at:

Further cases where this has been used are implicit in the analysis notebooks in OpenPathSampling.

Source Code

This module has been merged into OpenPathSampling. It is composed of the following pull requests: