openpathsampling.Sample
- class openpathsampling.Sample(replica=None, trajectory=None, ensemble=None, bias=1.0, parent=None, mover=None)[source]
A Sample represents a given “draw” from its ensemble, and is the return object from a PathMover. It and contains all information about the move, initial trajectories, new trajectories (both as references).
Since each Sample is a single representative of a single ensemble, each Sample consists of one replica ID, one trajectory, and one ensemble. This means that movers which generate more than one “draw” (often from different ensembles, e.g. replica exchange) will generate more than one Sample object.
- replica
The replica ID to which this Sample applies. The replica ID can also be negative.
- Type:
int
- trajectory
The trajectory (path) for this sample
- Type:
openpathsampling.Trajectory
- ensemble
The Ensemble this sample is drawn from
- Type:
openpathsampling.Ensemble
Methods
__init__
([replica, trajectory, ensemble, ...])args
()Return a list of args of the __init__ function of a class
as_proxies
()base
()Return the most parent class actually derived from StorableObject
copy_reset
()Copy of Sample with initialization move details.
count_weaks
()Return number of objects subclassed from StorableObject still in memory
descendants
()Return a list of all subclassed objects
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.
initial_sample
(replica, trajectory, ensemble)Initial sample from scratch.
objects
()Returns a dictionary of all storable objects
reverse_uuid
()ruuid
(uid)set_observer
(active)(De-)Activate observing creation of storable objects
to_dict
()Convert object into a dictionary representation
Attributes
ACTIVE_LONG
CREATION_COUNT
INSTANCE_UUID
acceptance
base_cls
Return the base class
base_cls_name
Return the name of the base class
cls
Return the class name as a string
heritage
mover
Descriptor class to handle proxy objects in attributes
observe_objects
parent
Descriptor class to handle proxy objects in attributes
valid
Returns true if a sample is in its ensemble