openpathsampling.engines.SnapshotDescriptor

class openpathsampling.engines.SnapshotDescriptor(contents)[source]

Container for information about snapshots generated by an engine.

Snapshot descriptors are used to define the dimensions of the features used in a snapshot, in order to set correct sizes in storage. For example, the arrays of atomic positions and velocities will each be of shape (n_atoms, n_spatial). The snapshot descriptor stores the values of n_atoms and n_spatial. It also knows the class of snapshot to be created by the engine. This is usually created upon initialization of the engine, using information from the engine’s initialization parameters.

In practice, it is probably easiest to create snapshot descriptors using their construct() method.

Parameters:

contents (list of 2-tuples) – Key-value pairs for information to be stored. One must be the key ‘class’, mapped to a snapshot class.

__init__(contents)[source]

Methods

__init__(contents)

args()

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

base()

Return the most parent class actually derived from StorableObject

construct(snapshot_class, snapshot_dimensions)

Convenience method to create a snapshot descriptor.

copy

Return a shallow copy of a set.

count_weaks()

Return number of objects subclassed from StorableObject still in memory

descendants()

Return a list of all subclassed objects

difference

Return the difference of two or more sets as a new set.

from_dict(dct)

Reconstruct an object from a dictionary representaiton

get_uuid()

idx(store)

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

intersection

Return the intersection of two sets as a new set.

isdisjoint

Return True if two sets have a null intersection.

issubset(other, /)

Test whether every element in the set is in other.

issuperset(other, /)

Test whether every element in other is in the set.

objects()

Returns a dictionary of all storable objects

reverse_uuid()

ruuid(uid)

set_observer(active)

(De-)Activate observing creation of storable objects

symmetric_difference

Return the symmetric difference of two sets as a new set.

to_dict()

Convert object into a dictionary representation

union

Return the union of sets as a new set.

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

dimensions

observe_objects

snapshot_class