openpathsampling.engines.Trajectory

class openpathsampling.engines.Trajectory(trajectory=None)[source]

Simulation trajectory. Essentially a python list of snapshots

__init__(trajectory=None)[source]

Create a simulation trajectory object

Parameters:

trajectory (Trajectory or list of openpathsampling.engines.BaseSnapshot) – if specified, make a deep copy of specified trajectory

Methods

__init__([trajectory])

Create a simulation trajectory object

append(object, /)

Append object to the end of the list.

args()

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

as_proxies()

Returns all contains all actual elements

base()

Return the most parent class actually derived from StorableObject

clear()

Remove all items from list.

contains_symmetric(item)

Test whether a snapshot or its reversed is in a trajectory

copy()

Return a shallow copy of the list.

count(value, /)

Return number of occurrences of value.

count_weaks()

Return number of objects subclassed from StorableObject still in memory

descendants()

Return a list of all subclassed objects

extend(iterable)

Extend list by appending elements from the iterable.

from_dict(dct)

Reconstruct an object from a dictionary representaiton

get_as_proxy(item)

Get an actual contained element

get_uuid()

idx(store)

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

index(value[, start, stop])

Return first index of value.

index_symmetric(value)

Return index of a snapshot or its reversed inside a trajectory

insert(index, object, /)

Insert object before index.

is_correlated(other[, time_reversal])

Checks if two trajectories share a common snapshot

iter_proxies()

Returns an iterator over all actual elements

map(fnc[, allow_fast])

This runs a function and tries to be fast.

objects()

Returns a dictionary of all storable objects

pop([index])

Remove and return item at index (default last).

remove(value, /)

Remove first occurrence of value.

reverse()

Reverse IN PLACE.

reverse_uuid()

ruuid(uid)

set_observer(active)

(De-)Activate observing creation of storable objects

shared_configurations(other[, time_reversal])

Returns a set of shared snapshots

shared_subtrajectory(other[, time_reversal])

Returns a subtrajectory which only contains frames present in other

sort(*[, key, reverse])

Sort the list in ascending order and return None.

subtrajectory_indices(subtrajectories)

Returns a list of lists of indices for frames from subtrajectories.

summarize_by_volumes(label_dict)

Summarize trajectory based on number of continuous frames in volumes.

summarize_by_volumes_str(label_dict[, delimiter])

Return string version of the volumes visited by this trajectory.

to_dict()

Convert object into a dictionary representation

to_mdtraj([topology])

Construct a mdtraj.Trajectory object from the Trajectory itself

unique_subtrajectory(other)

Returns a subtrajectory which contains frames not present in other

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

engine

n_snapshots

Return the number of frames in the trajectory.

observe_objects

reversed

Returns a reversed (shallow) copy of the trajectory itself.

snapshots

topology

Return a Topology object representing the topology of the current view of the trajectory