openpathsampling.ensemble.SequentialEnsemble

class openpathsampling.ensemble.SequentialEnsemble(ensembles, min_overlap=0, max_overlap=0, greedy=False)[source]

Ensemble which satisfies several subensembles in sequence.

ensembles

The ensembles, in time-order of when they should occur in the trajectory.

Type:

tuple of Ensemble

min_overlap

The minimum number of frames that overlap between two ensembles in the sequence. A positive number n indicates that at least n frames must be in both ensembles at the transition between them. A negative number -n indicates that at least n frames in neither ensemble at the transition between them. If given as a list, the list should be of length len(ensembles)-1, with one value for each transition. If given as an integer, that value will be used for all transitions.

Type:

int or tuple of int

max_overlap

The maximum number of frames that overlap between two ensembles in the sequence. A positive number n indicates that no more than n frames can be in both ensembles at the transition between them. A negative number -n indicates no more than n frames in neither ensemble at the transition between them. If given as a list, the list should be of length len(ensembles)-1, with one value for each transition. If given as an integer, that value will be used for all transitions.

Type:

int or list of int

Notes

TODO: Overlap features not implemented because ohmygod this was hard enough already.

__init__(ensembles, min_overlap=0, max_overlap=0, greedy=False)[source]

A path volume defines a set of paths.

Methods

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

A path volume defines a set of paths.

args()

Return a list of args of the __init__ function of a class

assign_frames(cache, ens_num[, ...])

base()

Return the most parent class actually derived from StorableObject

can_append(trajectory[, trusted])

Returns true, if the trajectory so far can still be in the ensemble if it is appended by a frame.

can_prepend(trajectory[, trusted])

Returns true, if the trajectory so far can still be in the ensemble if it is prepended by a frame.

check(trajectory)

Alias for __call__

check_reverse(trajectory[, trusted])

See __call__; same thing, but potentially in reverse frame order

count_weaks()

Return number of objects subclassed from StorableObject still in memory

descendants()

Return a list of all subclassed objects

extend_sample_from_trajectories(...[, ...])

Generate a sample in the ensemble by extending parts of trajectories

find_first_subtrajectory(trajectory)

Return the first sub-trajectory that matches the ensemble

find_last_subtrajectory(trajectory)

Return the last sub-trajectory that matches the ensemble

fix_name()

Set the objects name to be immutable.

from_dict(dct)

Reconstruct an object from a dictionary representaiton

get_sample_from_trajectories(trajectories[, ...])

Generate a sample in the ensemble by testing trajectories

get_uuid()

idx(store)

Return the index which is used for the object in the given store.

iter_extendable_slices(trajectory[, ...])

Return an iterator over maxiaml slices of extendable subtrajectories

iter_split(trajectory[, max_length, ...])

Return iterator over subtrajectories satisfying the given ensemble.

iter_valid_slices(trajectory[, max_length, ...])

Return an iterator over slices of subtrajectories matching the ensemble

named(name)

Name an unnamed object.

objects()

Returns a dictionary of all storable objects

reverse_uuid()

ruuid(uid)

set_observer(active)

(De-)Activate observing creation of storable objects

split(trajectory[, max_length, min_length, ...])

Return list of subtrajectories satisfying the given ensemble.

split_sample_from_trajectories(trajectories)

Generate a sample in the ensemble by searching for sub-parts

strict_can_append(trajectory[, trusted])

Returns true if the trajectory can be the beginning of a trajectory in the ensemble.

strict_can_prepend(trajectory[, trusted])

Returns true if the trajectory can be the end of a trajectory in the ensemble.

to_dict()

Convert object into a dictionary representation

trajectory_summary(trajectory)

Return dict with info on how this ensemble "sees" the trajectory.

trajectory_summary_str(trajectory)

Returns a string with the results of the trajectory_summary function.

transition_frames(trajectory[, trusted])

update_cache(cache, ens_num, ens_from, ...)

Updates the given cache.

Attributes

ACTIVE_LONG

CREATION_COUNT

INSTANCE_UUID

base_cls

Return the base class

base_cls_name

Return the name of the base class

cls

Return the class name as a string

default_name

Return the default name.

extendable_sub_ensembles

is_named

True if this object has a custom name.

name

Return the current name of the object.

observe_objects