westpa.westext.weed package

Submodules

westpa.westext.weed.BinCluster module

class westpa.westext.weed.BinCluster.ClusterList(ratios, nbins)

Bases: object

join(pairs)

Join clusters given a tuple (i,j) of bin pairs

join_simple(pairs)

Join clusters using direct ratios given a tuple (i,j) of bin pairs

westpa.westext.weed.ProbAdjustEquil module

westpa.westext.weed.ProbAdjustEquil.probAdjustEquil(binProb, rates, uncert, threshold=0.0, fullCalcClust=False, fullCalcBins=False)

This function adjusts bin pops in binProb using rates and uncert matrices fullCalcBins –> True for weighted avg, False for simple calc fullCalcClust –> True for weighted avg, False for simple calc threshold –> minimum weight (relative to max) for another value to be averaged

only matters if fullCalcBins == True (or later perhaps if fullCalcClust == True)

westpa.westext.weed.UncertMath module

class westpa.westext.weed.UncertMath.UncertContainer(vals, vals_dmin, vals_dmax, mask=False)

Bases: object

Container to hold uncertainty measurements. Data is convert to np masked arrays to avoid possible numerical problems

transpose()
recip()
update_mask()
concatenate(value, axis=0)

Concatentate UncertContainer value to self. Assumes that if dimensions of self and value do not match, to add a np.newaxis along axis of value

weighted_average(axis=0, expaxis=None)

Calculate weighted average of data along axis after optionally inserting a new dimension into the shape array at position expaxis

westpa.westext.weed.weed_driver module

westpa.westext.weed.weed_driver.check_bool(value, action='warn')

Check that the given value is boolean in type. If not, either raise a warning (if action=='warn') or an exception (action=='raise').

class westpa.westext.weed.weed_driver.RateAverager(bin_mapper, system=None, data_manager=None, work_manager=None)

Bases: object

Calculate bin-to-bin kinetic properties (fluxes, rates, populations) at 1-tau resolution

extract_data(iter_indices)

Extract data from the data_manger and place in dict mirroring the same underlying layout.

task_generator(iter_start, iter_stop, block_size)
calculate(iter_start=None, iter_stop=None, n_blocks=1, queue_size=1)

Read the HDF5 file and collect flux matrices and population vectors for each bin for each iteration in the range [iter_start, iter_stop). Break the calculation into n_blocks blocks. If the calculation is broken up into more than one block, queue_size specifies the maxmimum number of tasks in the work queue.

westpa.westext.weed.weed_driver.probAdjustEquil(binProb, rates, uncert, threshold=0.0, fullCalcClust=False, fullCalcBins=False)

This function adjusts bin pops in binProb using rates and uncert matrices fullCalcBins –> True for weighted avg, False for simple calc fullCalcClust –> True for weighted avg, False for simple calc threshold –> minimum weight (relative to max) for another value to be averaged

only matters if fullCalcBins == True (or later perhaps if fullCalcClust == True)

westpa.westext.weed.weed_driver.bins_from_yaml_dict(bin_dict)
class westpa.westext.weed.weed_driver.WEEDDriver(sim_manager, plugin_config)

Bases: object

get_rates(n_iter, mapper)

Get rates and associated uncertainties as of n_iter, according to the window size the user has selected (self.windowsize)

prepare_new_iteration()

Module contents

westext.weed – Support for weighted ensemble equilibrium dynamics

Initial code by Dan Zuckerman (May 2011), integration by Matt Zwier, and testing by Carsen Stringer. Re-factoring and optimization of probability adjustment routines by Joshua L. Adelman (January 2012).

westpa.westext.weed.probAdjustEquil(binProb, rates, uncert, threshold=0.0, fullCalcClust=False, fullCalcBins=False)

This function adjusts bin pops in binProb using rates and uncert matrices fullCalcBins –> True for weighted avg, False for simple calc fullCalcClust –> True for weighted avg, False for simple calc threshold –> minimum weight (relative to max) for another value to be averaged

only matters if fullCalcBins == True (or later perhaps if fullCalcClust == True)

class westpa.westext.weed.WEEDDriver(sim_manager, plugin_config)

Bases: object

get_rates(n_iter, mapper)

Get rates and associated uncertainties as of n_iter, according to the window size the user has selected (self.windowsize)

prepare_new_iteration()