Monte Carlo Walker

class nested_sampling.MonteCarloWalker(potential, takestep=<function random_displace at 0x23ee848>, accept_test=None, events=None, mciter=100)[source]

Bases: object

Class for doing a Monte Carlo chain walk

Parameters :

potential :

attribute of system with member function get_energy (in essence a particular potential energy function)

x : array

are the coordinates

takestep : callable takestep object

take a random montecarlo step, imported from pele: takestep(x) makes a move from x

accept_test : list of callables

it’s an array of pointers to functions. The dereferenced functions operate a set of tests on the energy/configuration.

events : list fo callables

it’s an array of pointers to functions. This is general and not compulsury e.g. can use if you want to do something with the new configuration for the guy.

See also

NestedSampling

Notes

defines parameters for a monte carlo chain from an initial configuration x with niter iterations. The step will be accepted subject only to a maximum energy criterion and geometric constraints on the configuration.

Attributes

nsteps (integer) tot. number of steps
naccepts (integer) tot. number of accepted configurations
xnew (array) new proposed configuration
accept (boolean) true or false if energy constraint is satisfied

Methods

__call__(x0, stepsize, Emax, energy[, seed])
run(x0, stepsize, Emax, energy[, seed])
run(x0, stepsize, Emax, energy, seed=None)[source]
nested_sampling.random_displace(x, stepsize)[source]

random uniform displacement