openpathsampling.pathmover.EnsembleHopMover

class openpathsampling.pathmover.EnsembleHopMover(ensemble, target_ensemble, change_replica=None, bias=None)[source]
__init__(ensemble, target_ensemble, change_replica=None, bias=None)[source]

A Mover that allows the change between ensembles.

Parameters:
  • ensemble (openpathsampling.Ensemble) – the initial ensemble to be jumped from

  • target_ensemble (openpathsampling.Ensemble) – the final ensemble to be jumped to

  • change_replica (int of None) – if None the replica id of the chosen sample will not be changed. Otherwise the replica id will be set to change_replica. This is useful when hoping to ensembles to create a new replica.

  • bias (float, dict or None (default)) – gives the bias of accepting (not proposing) a hop. A float will be the acceptance for all possible attempts. If a dict is given, then it contains a list of ensembles and a matrix. None means no bias

Notes

The bias dict has the following form :

{
    'ensembles' : [ens_1, ens_2, ens_n],
    'values' : np.array((n,n))
}

The numpy array contains all the acceptance probabilties. If possible a HopMover should (as all movers) be used for only a specific hop and not multiple ones.

Methods

__init__(ensemble, target_ensemble[, ...])

A Mover that allows the change between ensembles.

args()

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

base()

Return the most parent class actually derived from StorableObject

count_weaks()

Return number of objects subclassed from StorableObject still in memory

depth_post_order(fnc[, level])

Traverse the tree in post-order applying a function with depth

depth_pre_order(fnc[, level, only_canonical])

Traverse the tree of node in pre-order applying a function

descendants()

Return a list of all subclassed objects

fix_name()

Set the objects name to be immutable.

from_dict(dct)

Reconstruct an object from a dictionary representaiton

get_samples_from_sample_set(sample_set)

Select samples to use as input to the move core.

get_uuid()

idx(store)

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

key(change)

keylist()

Return a list of key : subtree tuples

legal_sample_set(sample_set[, ensembles, ...])

This returns all the samples from sample_set which are in both self.replicas and the parameter ensembles.

map_post_order(fnc, **kwargs)

Traverse the tree in post-order applying a function

map_pre_order(fnc, **kwargs)

Traverse the tree in pre-order applying a function

map_tree(fnc)

Apply a function to each node and return a nested tree of results

metropolis(trials)

Implements the Metropolis acceptance for a list of trial samples

move(sample_set)

Run the generation starting with the initial sample_set specified.

move_core(samples)

Core of the Monte Carlo move.

move_replica_state(replica_states)

named(name)

Name an unnamed object.

objects()

Returns a dictionary of all storable objects

reverse_uuid()

ruuid(uid)

select_sample(sample_set[, ensembles, replicas])

Returns one of the legal samples given self.replica and the ensemble set in ensembles.

set_observer(active)

(De-)Activate observing creation of storable objects

sub_replica_state(replica_states)

Return set of replica states that a submover might be called with

to_dict()

Convert object into a dictionary representation

tree()

Return the object as a tree structure of nested lists of nodes

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.

ensemble_signature

ensemble_signature_set

identifier

A unique identifier to build the unique key for a position in a tree

in_out

List the input -> output relation for ensembles

input_ensembles

Return a list of possible used ensembles for this mover

is_canonical

is_ensemble_change_mover

is_named

True if this object has a custom name.

name

Return the current name of the object.

observe_objects

output_ensembles

Return a list of possible returned ensembles for this mover

submovers

Returns a list of submovers