MLEEstimator#
- class cinnabar.estimators.MLEEstimator(source: str = 'MLE')[source]#
Maximum-likelihood estimator (MLE) for absolute free energies.
Uses the MLE solver from
cinnabar.statsto compute the most probable set of absolute free energies consistent with the relative measurements stored in the map.- Parameters:
source (str, default “MLE”) – Label attached to the returned measurements and used as the storage key on the FEMap. Defaults to MLE.
Notes
Requires the computational sub-graph to be weakly connected.
Methods
Compute maximum likelihood estimate of free energies and covariance in their estimates.
Attributes
source- static mle(graph: DiGraph, edge_data_label: str = 'f_ij', node_data_label: str | None = None) tuple[ndarray, ndarray][source]#
Compute maximum likelihood estimate of free energies and covariance in their estimates. The number ‘edge_data_label’ is the node attribute on which the MLE will be calculated, where d’edge_data_label’ will be used as the standard error of the edge_data_label
References :
Xu, Huafeng. “Optimal measurement network of pairwise differences.” Journal of Chemical Information and Modeling 59.11 (2019): 4720-4728. URL: https://pubs.acs.org/doi/abs/10.1021/acs.jcim.9b00528.
Kenney, I.M. & Beckstein, O., 2023. Thermodynamically consistent determination of free energies and rates in kinetic cycle models. Biophysical Reports, 3(3), p.100120. URL: https://doi.org/10.1016/j.bpr.2023.100120
NOTE: Self-edges (edges that connect a node to itself) will be ignored.
- Parameters:
graph (nx.Graph) – The graph for which an estimate is to be computed Each edge must have attributes ‘f_ij’ and ‘df_ij’ for the free energy and uncertainty estimate
edge_data_label (string, default = ‘f_ij’) – edge data label of the calculated data for MLE
node_data_label (string, default = None) – optional - provide if there is node data (i.e. absolute values) ‘f_i’ or ‘exp_DG’ to include will expect a corresponding uncertainty ‘f_di’ or ‘exp_dDG’
- Returns:
f_i (np.array with shape (n_ligands,)) – f_i[i] is the absolute free energy of ligand i in kcal/mol
C (np.array with shape (n_ligands, n_ligands)) – C[i,j] is the covariance of the free energy estimates of i and j