MLEEstimator#

class cinnabar.estimators.MLEEstimator(source: str = 'MLE')[source]#

Maximum-likelihood estimator (MLE) for absolute free energies.

Uses the MLE solver from cinnabar.stats to 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

mle

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 :

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