analysis

class ufedmm.analysis.Analyzer(ufed, dataframe, bins, min_count=1, adjust_centers=False)[source]

Bases: FreeEnergyAnalyzer

UFED Analyzer.

Warning

This class is obsolete and will be discontinued. Use FreeEnergyAnalyzer instead.

Parameters:
  • ufed (UnifiedFreeEnergyDynamics) – The UFED object.

  • dataframe (pandas.DataFrame) – A data frame containing sampled sets of collective variables and driver parameters.

  • bins (int or list(int)) – The number of bins in each direction.

Keyword Arguments:
  • min_count (int, default=1) – The miminum number of hits for a given bin to be considered in the analysis.

  • adjust_centers (bool, default=False) – Whether to consider the center of a bin as the mean value of the its sampled internal points istead of its geometric center.

free_energy_functions(sigma=None, factor=8)[source]

Returns Python functions for evaluating the potential of mean force and their originating mean forces as a function of the collective variables.

Keyword Arguments:
  • sigma (float or unit.Quantity, default=None) – The standard deviation of kernels. If this is None, then values will be determined from the distances between nodes.

  • factor (float, default=8) – If sigma is not explicitly provided, then it will be computed as sigma = factor*range/bins for each direction.

Returns:

  • potential (function) – A Python function whose arguments are collective variable values and whose result is the potential of mean force at that values.

  • mean_force (function) – A Python function whose arguments are collective variable values and whose result is the mean force at that values regarding a given direction. Such direction must be defined through a keyword argument dir, whose default value is 0 (meaning the direction of the first collective variable).

class ufedmm.analysis.FreeEnergyAnalyzer(ufed, dataframe)[source]

Bases: object

Calculate free energy landscapes from UFED simulation results.

Parameters:
  • ufed (UnifiedFreeEnergyDynamics) – The UFED object.

  • dataframe (pandas.DataFrame) – A data frame containing sampled sets of collective variables and driver parameters.

centers_and_mean_forces(bins, min_count=1, adjust_centers=False)[source]

Performs binned statistics with the UFED simulation data.

Parameters:

bins (list(int) or int) – The number of bins in each direction. If a single integer is passed, then the same number of bins will be considered for all directions.

Keyword Arguments:
  • min_count (int, default=1) – The miminum number of hits for any bin to be considered in the analysis.

  • adjust_centers (bool, default=False) – Whether to consider the center of a bin as the mean value of the its sampled internal points instead of its geometric center.

Returns:

  • centers (list(numpy.array)) – A list of Numpy arrays, each one containing the values of an extended-space variable at the centers of all bins that satisfy the minimum-count criterion.

  • mean_forces (list(numpy.array)) – A list of Numpy arrays, each one containing the mean forces in the direction of an extended-space variable.

mean_force_free_energy(centers, mean_forces, sigma, platform_name='Reference', properties={})[source]

Returns Python functions for evaluating the potential of mean force and their originating mean forces as a function of the collective variables.

Parameters:
  • centers (list(numpy.array)) – The bin centers.

  • mean_forces (list(numpy.array)) – The mean forces.

  • sigmas (float or unit.Quantity or list) – The standard deviation of kernels.

Keyword Arguments:
  • platform_name (string, default='Reference') – The name of the OpenMM Platform to be used for potential and mean-force evaluations.

  • properties (dict, default={}) – A set of values for platform-specific properties. Keys are the property names.

Returns:

  • potential (function) – A Python function whose arguments are collective variable values and whose result is the potential of mean force at that values.

  • mean_force (function) – A Python function whose arguments are collective variable values and whose result is the mean force at those values.

metadynamics_bias_free_energy()[source]

Returns a Python function which, in turn, receives the values of extended- space variables and returns the energy estimated from a Metadynamics bias potential reconstructed from the simulation data.

Returns:

The free energy function.

Return type:

function