westpa.westext.adaptvoronoi package

Submodules

westpa.westext.adaptvoronoi.adaptVor_driver module

westpa.westext.adaptvoronoi.adaptVor_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').

exception westpa.westext.adaptvoronoi.adaptVor_driver.ConfigItemMissing(key, message=None)

Bases: KeyError

class westpa.westext.adaptvoronoi.adaptVor_driver.VoronoiBinMapper(dfunc, centers, dfargs=None, dfkwargs=None)

Bases: BinMapper

A one-dimensional mapper which assigns a multidimensional pcoord to the closest center based on a distance metric. Both the list of centers and the distance function must be supplied.

assign(coords, mask=None, output=None)
class westpa.westext.adaptvoronoi.adaptVor_driver.AdaptiveVoronoiDriver(sim_manager, plugin_config)

Bases: object

This plugin implements an adaptive scheme using voronoi bins from Zhang 2010, J Chem Phys, 132. The options exposed to the configuration file are:

  • av_enabled (bool, default False): Enables adaptive binning

  • max_centers (int, default 10): The maximum number of voronoi centers to be placed

  • walk_count (integer, default 5): Number of walkers per voronoi center

  • center_freq (ingeter, default 1): Frequency of center placement

  • priority (integer, default 1): Priority in the plugin order

  • dfunc_method (function, non-optional, no default): Non-optional user defined

    function that will be used to calculate distances between voronoi centers and data points

  • mapper_func (function, optional): Optional user defined function for building bin

    mappers for more complicated binning schemes e.g. embedding the voronoi binning in a portion of the state space. If not defined the plugin will build a VoronoiBinMapper with the information it has.

dfunc()

Distance function to be used by the plugin. This function will be used to calculate the distance between each point.

get_dfunc_method(plugin_config)
get_mapper_func(plugin_config)
get_initial_centers()

This function pulls from the centers from either the previous bin mapper or uses the definition from the system to calculate the number of centers

update_bin_mapper()

Update the bin_mapper using the current set of voronoi centers

update_centers(iter_group)

Update the set of Voronoi centers according to Zhang 2010, J Chem Phys, 132. A short description of the algorithm can be found in the text:

1) First reference structure is chosen randomly from the first set of given structure 2) Given a set of n reference structures, for each configuration in the iteration the distances to each reference structure is calculated and the minimum distance is found 3) The configuration with the minimum distance is selected as the next reference

prepare_new_iteration()

Module contents

class westpa.westext.adaptvoronoi.AdaptiveVoronoiDriver(sim_manager, plugin_config)

Bases: object

This plugin implements an adaptive scheme using voronoi bins from Zhang 2010, J Chem Phys, 132. The options exposed to the configuration file are:

  • av_enabled (bool, default False): Enables adaptive binning

  • max_centers (int, default 10): The maximum number of voronoi centers to be placed

  • walk_count (integer, default 5): Number of walkers per voronoi center

  • center_freq (ingeter, default 1): Frequency of center placement

  • priority (integer, default 1): Priority in the plugin order

  • dfunc_method (function, non-optional, no default): Non-optional user defined

    function that will be used to calculate distances between voronoi centers and data points

  • mapper_func (function, optional): Optional user defined function for building bin

    mappers for more complicated binning schemes e.g. embedding the voronoi binning in a portion of the state space. If not defined the plugin will build a VoronoiBinMapper with the information it has.

dfunc()

Distance function to be used by the plugin. This function will be used to calculate the distance between each point.

get_dfunc_method(plugin_config)
get_mapper_func(plugin_config)
get_initial_centers()

This function pulls from the centers from either the previous bin mapper or uses the definition from the system to calculate the number of centers

update_bin_mapper()

Update the bin_mapper using the current set of voronoi centers

update_centers(iter_group)

Update the set of Voronoi centers according to Zhang 2010, J Chem Phys, 132. A short description of the algorithm can be found in the text:

1) First reference structure is chosen randomly from the first set of given structure 2) Given a set of n reference structures, for each configuration in the iteration the distances to each reference structure is calculated and the minimum distance is found 3) The configuration with the minimum distance is selected as the next reference

prepare_new_iteration()