Software Developers: Lisa Otten, Sagar Kania
Theory Collaborators: Robert J. Webber, Gideon Simpson, David Aristoff, and Daniel M. Zuckerman
- Paper: "Randomized iterative trajectory reweighting for steady-state distributions without discretization error" by Kania et al., PNAS 2026. https://www.pnas.org/doi/abs/10.1073/pnas.2529246123
- Preprint on smoothing: "Regularized RiteWeight for Sparse Trajectory Data: A Smoothed Stationary Reweighting Framework" by Otten et al., https://chemrxiv.org/doi/full/10.26434/chemrxiv.15001337/v1
- "bRiteWeight: Randomized iterative reweighting for biased trajectory data" by Aristoff and Zuckerman, https://chemrxiv.org/doi/full/10.26434/chemrxiv.15001675/v1
- Blog post on limitations: "Counting is not enough: A weakness of MSMs inherited by RiteWeight" by Zuckerman, https://statisticalbiophysicsblog.org/?p=566
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.
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 .
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.
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.
Stay tuned for updates.
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.