TI
The TI estimator is a simple implementation of thermodynamic integration that uses the trapezoid rule for integrating the space between \(\left<\frac{dH}{d\lambda}\right>\) values for each \(\lambda\) sampled.
API Reference
- class alchemlyb.estimators.TI(verbose: bool = False)[source]
Thermodynamic integration (TI).
- Parameters:
verbose (bool, optional) – Set to True if verbose debug output is desired.
- delta_f_
The estimated dimensionless free energy difference between each state.
- Type:
DataFrame
- d_delta_f_
The estimated statistical uncertainty (one standard deviation) in dimensionless free energy differences.
- Type:
DataFrame
- dhdl
The estimated dhdl of each state.
- Type:
DataFrame
Changed in version 1.0.0: delta_f_, d_delta_f_, states_ are view of the original object.
- fit(dHdl: DataFrame) TI[source]
Compute free energy differences between each state by integrating dHdl across lambda values.
- Parameters:
dHdl (DataFrame) – dHdl[n,k] is the potential energy gradient with respect to lambda for each configuration n and lambda k.
- separate_dhdl() list[Series][source]
For transitions with multiple lambda, the attr:dhdl would return a
DataFramewhich gives the dHdl for all the lambda states, regardless of whether it is perturbed or not. This function creates a list ofpandas.Seriesfor each lambda, where eachpandas.Seriesdescribes the potential energy gradient for the lambdas state that is perturbed.- Returns:
dHdl_list – A list of
pandas.Seriessuch thatdHdl_list[k]is the potential energy gradient with respect to lambda for each configuration that lambda k is perturbed.- Return type:
- classmethod __init_subclass__(**kwargs)
Set the
set_{method}_requestmethods.This uses PEP-487 [1] to set the
set_{method}_requestmethods. It looks for the information available in the set default values which are set using__metadata_request__*class attributes, or inferred from method signatures.The
__metadata_request__*class attributes are used when a method does not explicitly accept a metadata through its arguments or if the developer would like to specify a request value for those metadata which are different from the defaultNone.References
- get_metadata_routing()
Get metadata routing of this object.
Please check User Guide on how the routing mechanism works.
- Returns:
routing – A
MetadataRequestencapsulating routing information.- Return type:
MetadataRequest
- get_params(deep=True)
Get parameters for this estimator.
- set_fit_request(*, dHdl: bool | None | str = '$UNCHANGED$') TI
Configure whether metadata should be requested to be passed to the
fitmethod.Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with
enable_metadata_routing=True(seesklearn.set_config()). Please check the User Guide on how the routing mechanism works.The options for each parameter are:
True: metadata is requested, and passed tofitif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it tofit.None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.str: metadata should be passed to the meta-estimator with this given alias instead of the original name.
The default (
sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.Added in version 1.3.
- set_params(**params)
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as
Pipeline). The latter have parameters of the form<component>__<parameter>so that it’s possible to update each component of a nested object.- Parameters:
**params (dict) – Estimator parameters.
- Returns:
self – Estimator instance.
- Return type:
estimator instance