The concept of the path ensemble, the (appropriately weighted) set of trajectories satisfying particular conditions, is at the heart of path sampling techniques.

Path ensembles are created as openpathsampling.Ensemble objects. Making one is usually as simple as

>>> import openpathsampling as paths
>>> ens = paths.Ensemble()

where you choose the right kind of ensemble and give it the right initialization parameters. What’s more, ensembles can be combined using the logical infix operators & (and) and | (or).

Abstract class


Path ensemble object.

Basic Ensembles


The empty path ensemble of no trajectories.


The full path ensemble of all possible trajectories.

Volume Ensembles

VolumeEnsemble(volume[, trusted])

Path ensembles based on the Volume object

AllInXEnsemble(volume[, trusted])

Ensemble of trajectories with all frames in the given volume

AllOutXEnsemble(volume[, trusted])

Ensemble of trajectories with all frames outside the given volume

PartInXEnsemble(volume[, trusted])

Ensemble of trajectory with at least one frame in the volume

PartOutXEnsemble(volume[, trusted])

Ensemble of trajectories with at least one frame outside the volume

Set-based Ensemble combinations

EnsembleCombination(ensemble1, ensemble2, ...)

Logical combination of two ensembles

IntersectionEnsemble(ensemble1, ensemble2)

UnionEnsemble(ensemble1, ensemble2)

Length specific Ensembles


The ensemble of trajectories of a given length


Convenience ensemble to and a LengthEnsemble(1) with a given ensemble.


An ensemble which is optional for SequentialEnsembles.

Trajectory Altering Ensembles


Ensemble based on reversing the trajectory.

SuffixTrajectoryEnsemble(ensemble, ...)

Ensemble which prepends its trajectory to a given trajectory.

PrefixTrajectoryEnsemble(ensemble, ...)

Ensemble which appends its trajectory to a given trajectory.


Wraps an ensemble to alter it or the way it sees a trajectory

Sequential Ensembles

SequentialEnsemble(ensembles[, min_overlap, ...])

Ensemble which satisfies several subensembles in sequence.

Specialized Ensembles

TISEnsemble(initial_states, final_states, ...)

An ensemble for TIS (or AMS).

MinusInterfaceEnsemble(state_vol, innermost_vols)

This creates an ensemble for the minus interface.

Ensemble Functions


Join several ensembles using a set theory union.