Skip to content

Commit

Permalink
Updated version comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclark5 committed Sep 10, 2024
1 parent 6ecbe02 commit 750cb0d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions src/alchemlyb/convergence/convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions src/alchemlyb/estimators/bar_.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand Down
10 changes: 5 additions & 5 deletions src/alchemlyb/estimators/mbar_.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/alchemlyb/visualisation/convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -193,6 +192,7 @@ def plot_block_average(dataframe, units=None, final_error=None, ax=None):
`Alchemical Analysis <https://github.com/MobleyLab/alchemical-analysis>`_.
.. versionadded:: 2.4.0
"""
if units is not None:
dataframe = get_unit_converter(units)(dataframe)
Expand Down

0 comments on commit 750cb0d

Please sign in to comment.