Skip to content

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rite_weight: Randomized Iterative Trajectory Reweighting

Software Developers: Lisa Otten, Sagar Kania
Theory Collaborators: Robert J. Webber, Gideon Simpson, David Aristoff, and Daniel M. Zuckerman

References

Background

rite_weight (RW) is a lightweight Python package for computing steady-state weights from short molecular dynamics (MD) trajectory segments. RW is not recommended for reweighting one or a small number of MD trajectories: see blog post noted above.

RW uses a simple yet powerful approach: at each iteration, the method randomly clusters a reduced feature space (e.g., PCA, tICA, VAMP) and constructs a Markov state model (MSM). It then reweights the trajectory based on the stationary distribution derived from the MSM transition matrix. The process is repeated with new random clusters until convergence. This randomized clustering approach allows RW to efficiently estimate long-timescale kinetics and thermodynamics from short simulations — without requiring long trajectories or predefined discrete states. The software can be applied to both equilibrium reweighting as well as nonequilibrium reweighting and calculation of transition rates.


Installation:

Install from github and update the existing conda env manually as:

git clone https://github.com/ZuckermanLab/rite_weight.git

cd </path/to/rite_weight>

conda activate

pip install .


Example:

For a self-contained walkthrough with a known right answer, see example/double_well/double_well_tutorial.ipynb. The underlying data (100 short trajectories in a synthetic 1D double-well potential) is already generated and committed under example/double_well/data/. It runs both an equilibrium reweighting and a source -> sink rate calculation and checks each result against an exact theoretical answer. example/double_well/generate_data.py is only needed if you want to see how the data was made or regenerate it with different parameters; the physical parameters and theory formulas live in example/double_well/theory.py.


Recent Updates:

Version 0.1: initial release, added a smoothing feature that allows for a more consistent analysis of sparse trajectory data.

Version 0.2: added nonequilibrium steady state calculations and features for kinetic estimation, such as residence time and mean first-passage time (MFPT), plotting features, bootstrap error estimation features, numerous QoL additions.


Work in Progress:

Stay tuned for updates.


What changes in rate mode

equilibrium (rite_weight_iter) rate (rite_weight_rate_iter)
Voronoi discretization all segments intermediate region only
source / sink not distinguished two coarse-grained macrostates appended as the last two matrix indices
boundary condition none recycling: every segment leaving the sink is redirected to the source
stationary distribution equilibrium steady state non-equilibrium steady state
recorded output weights weights + flux into the sink, and MFPT

lag_time is the interval spanned by one transition pair. It is only used to convert flux into a rate or MFPT, never to slice or order any input.

About

A lightweight Python package for computing steady-state weights from short trajectory segments.

Resources

Stars

5 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages