Actions

class mcpele.monte_carlo.RecordEnergyHistogram

Bases: mcpele.monte_carlo._action_cpp._Cdef_RecordEnergyHistogram

Bins energies into a resizable histogram

This class is the Python interface for the c++ RecordEnergyHistogram implementation.

Warning

RecordEnergyHistogram should only start recording entries when the system is equilibrated, set the number of steps to skip with the eqsteps parameter.

Parameters:

min : double

guess for the minimum energy expected

max : double

guess for the maximum energy expected

bin : double

choice for the bin size

eqsteps: int

number of iterations to skip before starting to record entries

get_bounds_val()

get energy boundaries of the histogram

Returns:

Emax : double

maximum energy of the histogram

Emin : double

minimum energy of the histogram

get_histogram()

returns the histogram array

Returns:

numpy.array

energy histogram

get_mean_variance()

get mean and variance of the histogram

Returns:

mean : double

first moment of the distribution

variance : double

second central moment of the distribution

print_terminal()

draws histogram on the terminal

class mcpele.monte_carlo.RecordEnergyTimeseries

Bases: mcpele.monte_carlo._action_cpp._Cdef_RecordEnergyTimeseries

Record a time series of the energy

This class is the Python interface for the c++ bv::RecordEnergyTimeseries Action class implementation.

Parameters:

niter: int, Deprecated

expected number of steps (to preallocate)

record_every : int

interval every which the energy is recorded

clear()

clear time series container

deletes the entries in the c++ container

get_time_series()

get a energy time series array

Returns:

numpy.array

array containing the energy time series

class mcpele.monte_carlo.RecordPairDistHistogram

Bases: mcpele.monte_carlo._action_cpp._Cdef_RecordPairDistHistogram

Record a pair distribution function histogram

This class is the Python interface for the c++ mcpele::RecordPairDistHistogram implementation. The pair correlation function (or radial distribution function) describes how the density of a system of particles varies as a function of distance from a reference particle. In simplest terms it is a measure of the probability of finding a particle at a distance of \(r\) away from a given reference particle.

Every time the action is called, it accumulates the present configuration into the same \(g(r)\) histogram. The action function calls add_configuration which accumulates the current configuration into the \(g(r)\) histogram. The \(g(r)\) histogram can be read out at any point after that.

Parameters:

boxvec : numpy.array

array of box side lengths

nr_bins : int

number of bins for the \(g(r)\) histogram

eqsteps : int

number of equilibration steps to be excluded from \(g(r)\) computation

record_every : int

after eqsteps steps have been done, record every record_everyth steps

get_eqsteps()

get number of equilibration steps

Returns:

int

number of equilibration steps

get_hist_gr()

get array of \(g(r)\) values for \(g(r)\) measurement

Returns:

numpy.array

array of array of \(g(r)\) values for \(g(r)\)

get_hist_r()

get array of \(r\) values for \(g(r)\) measurement

Returns:

numpy.array

array of \(r\) values for \(g(r)\) histogram

class mcpele.monte_carlo.RecordLowestEValueTimeseries

Bases: mcpele.monte_carlo._action_cpp._Cdef_RecordLowestEValueTimeseries

Record lowest eigenvalue of the inherent structure

This class is the Python interface for the c++ RecordLowestEValueTimeseries Action class implementation. The structure is quenched to a minimum energy configuration (its inherent structure) and the lowest eigenvalue is computed by the Rayleight-Ritz method for lowest eigenvalue (which computationally cheaper than the diagonalisation of the Hessian). The zero modes are orthogonalised through the Gram-Schmidt orthogonalisation procedure.

Parameters:

niter: int, Deprecated

expected number of steps (to preallocate)

record_every : int

interval every which the energy is recorded

landscape_potential : BasePotential

potential associated with particles (so the underlying potential energy surface)

boxdimension: int

dimensionality of the space (dimensionality of box)

ranvec : numpy.array

random vector of length equal to the number of degrees of freedom [len(coords)], required by the Gram-Schmidt orthogonalisation procedure

lbfgsniter : int

maximum number of steps for the LBFG-S minimisation of the Rayleigh quotient

clear()

clear time series container

deletes the entries in the c++ container

get_time_series()

get the lowest eigenvalue time series array

Returns:

numpy.array:

array time series of the lowest eigenvalue

class mcpele.monte_carlo.RecordDisplacementPerParticleTimeseries

Bases: mcpele.monte_carlo._action_cpp._Cdef_RecordDisplacementPerParticleTimeseries

Record time series of the average root mean square displacement per particle at each step

This class is the Python interface for the c++ RecordDisplacementPerParticleTimeseries Action class implementation.

Parameters:

niter: int, Deprecated

expected number of steps (to preallocate)

record_every : int

interval every which the energy is recorded

initial_coords : numpy.array

initial system coordinates, used to compute rms distance

boxdimension: int

dimensionality of the space (dimensionality of box)

clear()

clear time series container

deletes the entries in the c++ container

get_time_series()

return a the root mean square displacement time series array

Returns:

np.array

root mean square displacement array