openpathsampling.PathSampling

class openpathsampling.PathSampling(storage, move_scheme=None, sample_set=None, initialize=True)[source]

General path sampling code.

Takes a single move_scheme and generates samples from that, keeping one per replica after each move.

__init__(storage, move_scheme=None, sample_set=None, initialize=True)[source]
Parameters:
  • storage (openpathsampling.storage.Storage) – the storage where all results should be stored in

  • move_scheme (openpathsampling.MoveScheme) – the move scheme used for the pathsampling cycle

  • sample_set (openpathsampling.SampleSet) – the initial SampleSet for the Simulator

  • initialize (bool) – if False the new PathSimulator will continue at the step and not create a new SampleSet object to cut the connection to previous steps

Methods

__init__(storage[, move_scheme, sample_set, ...])

param storage:

the storage where all results should be stored in

args()

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

attach_default_hooks()

attach_hook(hook[, hook_for])

Attach a hook class or method to this simulation.

base()

Return the most parent class actually derived from StorableObject

count_weaks()

Return number of objects subclassed from StorableObject still in memory

descendants()

Return a list of all subclassed objects

empty_hooks()

Return a hook dictionary with no hooks.

fix_name()

Set the objects name to be immutable.

from_dict(dct)

Reconstruct an object from a dictionary representaiton

from_step(storage, step[, initialize])

param storage:

the storage to be used to hold the simulation results

get_uuid()

idx(store)

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

named(name)

Name an unnamed object.

objects()

Returns a dictionary of all storable objects

restart_at_step(step[, storage])

Continue with a loaded pathsampling at a given step

reverse_uuid()

run(n_steps)

Run the simulator for a number of steps

run_hooks(hook_name, **kwargs)

Run the hooks for the given hook_name

run_one_step(step_info[, hook_state])

run_until(n_steps)

run_until_decorrelated([time_reversal])

Run until all trajectories are decorrelated.

run_until_n_accepted(n_accepted)

ruuid(uid)

save_current_step()

Save the current step to the storage.

save_initial_step()

Save the initial state as an MCStep to the storage

set_observer(active)

(De-)Activate observing creation of storable objects

sync_storage()

Will sync all collective variables and the storage to disk

to_dict()

Convert object into a dictionary representation

Attributes

ACTIVE_LONG

CREATION_COUNT

INSTANCE_UUID

base_cls

Return the base class

base_cls_name

Return the name of the base class

calc_name

cls

Return the class name as a string

current_step

default_name

Return the default name.

hook_names

is_named

True if this object has a custom name.

live_visualizer

name

Return the current name of the object.

observe_objects