FreeEnergyAnalyzer¶
- class ufedmm.FreeEnergyAnalyzer(ufed, dataframe)[source]¶
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.
Methods
- 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=None)[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. It takes one argument per variable, and these can be scalars or broadcastable arrays. The result has the broadcast shape of the arguments plus a last axis with one mean-force component per variable, even if there is only one variable.
- 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.
Warning
Every row of the data frame is taken as a deposited hill, centered at the reported values of the dynamical variables. The data must therefore be reported at the frequency of hill deposition, starting at its first deposition, as a
StateDataReporterdoes when its report interval equals the metadynamics frequency. For well-tempered metadynamics, also reporthillHeights=True.- Returns:
The free energy function.
- Return type:
function