diff --git a/src/alchemlyb/convergence/convergence.py b/src/alchemlyb/convergence/convergence.py index 725231e2..d613f22e 100644 --- a/src/alchemlyb/convergence/convergence.py +++ b/src/alchemlyb/convergence/convergence.py @@ -46,6 +46,10 @@ def forward_backward_convergence( bigger than the error tolerance, the bootstrap error will be used. .. versionadded:: 2.3.0 + .. versionchanged:: 2.4.0 + Clarified docstring, removed incorrect estimation of std for cumulative + result in bar and added check that only a single lambda state is + represented in the indices of each df in df_list. kwargs : dict Keyword arguments to be passed to the estimator. diff --git a/src/alchemlyb/estimators/bar_.py b/src/alchemlyb/estimators/bar_.py index d5b2c527..52353064 100644 --- a/src/alchemlyb/estimators/bar_.py +++ b/src/alchemlyb/estimators/bar_.py @@ -54,6 +54,9 @@ class BAR(BaseEstimator, _EstimatorMixOut): .. versionchanged:: 1.0.0 `delta_f_`, `d_delta_f_`, `states_` are view of the original object. + .. versionchanged:: 2.4.0 + Added assessment of lambda states represented in the indices of u_nk + to provide meaningful errors to ensure proper use. """ diff --git a/src/alchemlyb/estimators/mbar_.py b/src/alchemlyb/estimators/mbar_.py index d0a2b31e..fa399cb1 100644 --- a/src/alchemlyb/estimators/mbar_.py +++ b/src/alchemlyb/estimators/mbar_.py @@ -79,6 +79,11 @@ class MBAR(BaseEstimator, _EstimatorMixOut): default value for `method` was changed from "hybr" to "robust" .. versionchanged:: 2.1.0 `n_bootstraps` option added. + .. versionchanged:: 2.4.0 + Handle initial estimate, initial_f_k, from bar in the instance + that not all lambda states represented as column headers are + represented in the indices of u_nk. + """ def __init__( @@ -135,11 +140,6 @@ def fit(self, u_nk): ) bar.fit(u_nk) initial_f_k = bar.delta_f_.iloc[0, :] - states = [ - x - for i, x in enumerate(self._states_[:-1]) - if N_k[i] > 0 and N_k[i + 1] > 0 - ] if len(bar.delta_f_.iloc[0, :]) != len(self._states_): states = [ x diff --git a/src/alchemlyb/visualisation/convergence.py b/src/alchemlyb/visualisation/convergence.py index 7d04a2e0..bf232b5d 100644 --- a/src/alchemlyb/visualisation/convergence.py +++ b/src/alchemlyb/visualisation/convergence.py @@ -56,11 +56,10 @@ def plot_convergence(dataframe, units=None, final_error=None, ax=None): Keyword arg final_error for plotting a horizontal error bar. The array input has been deprecated. The units default to `None` which uses the units in the input. - .. versionchanged:: 0.6.0 data now takes in dataframe - .. versionadded:: 0.4.0 + """ if units is not None: dataframe = get_unit_converter(units)(dataframe) @@ -193,6 +192,7 @@ def plot_block_average(dataframe, units=None, final_error=None, ax=None): `Alchemical Analysis `_. .. versionadded:: 2.4.0 + """ if units is not None: dataframe = get_unit_converter(units)(dataframe)