Skip to content

Commit

Permalink
black-formatted files
Browse files Browse the repository at this point in the history
  • Loading branch information
orbeckst authored and jaclark5 committed Nov 15, 2024
1 parent 3826a66 commit abdbe44
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 50 deletions.
4 changes: 0 additions & 4 deletions src/alchemlyb/convergence/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<<<<<<< HEAD
from .convergence import (
forward_backward_convergence,
fwdrev_cumavg_Rc,
A_c,
block_average,
)
=======
from .convergence import forward_backward_convergence, fwdrev_cumavg_Rc, A_c, block_average
>>>>>>> 9eb22a1 (Moving average (#381))
30 changes: 0 additions & 30 deletions src/alchemlyb/convergence/convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ def forward_backward_convergence(
Lower case input is also accepted until release 2.0.0.
num : int
The number of blocks used to divide *each* DataFrame and progressively add
<<<<<<< HEAD
to assess convergence. Note that if the DataFrames are different lengths,
=======
to assess convergence. Note that if the DataFrames are different lengths,
>>>>>>> 9eb22a1 (Moving average (#381))
the number of samples contributed with each block will be different.
error_tol : float
The maximum error tolerated for analytic error. If the analytic error is
Expand All @@ -52,11 +48,7 @@ def forward_backward_convergence(
.. versionadded:: 2.3.0
.. versionchanged:: 2.4.0
Clarified docstring, removed incorrect estimation of std for cumulative
<<<<<<< HEAD
result in bar and added check that only a single lambda state is
=======
result in bar and added check that only a single lambda state is
>>>>>>> 9eb22a1 (Moving average (#381))
represented in the indices of each df in df_list.
kwargs : dict
Expand Down Expand Up @@ -108,16 +100,11 @@ def forward_backward_convergence(
# select estimator class by name
my_estimator = estimators_dispatch[estimator](**kwargs)
logger.info(f"Use {estimator} estimator for convergence analysis.")
<<<<<<< HEAD

=======

>>>>>>> 9eb22a1 (Moving average (#381))
# Check that each df in the list has only one value of lambda
for i, df in enumerate(df_list):
lambda_values = list(set([x[1:] for x in df.index.to_numpy()]))
if len(lambda_values) > 1:
<<<<<<< HEAD
ind = [
j
for j in range(len(lambda_values[0]))
Expand All @@ -129,13 +116,6 @@ def forward_backward_convergence(
)
)

=======
ind = [j for j in range(len(lambda_values[0])) if len(list(set([x[j] for x in lambda_values]))) > 1][0]
raise ValueError(
"Provided DataFrame, df_list[{}] has more than one lambda value in df.index[{}]".format(i, ind)
)

>>>>>>> 9eb22a1 (Moving average (#381))
logger.info("Begin forward analysis")
forward_list = []
forward_error_list = []
Expand Down Expand Up @@ -486,7 +466,6 @@ def block_average(df_list, estimator="MBAR", num=10, **kwargs):
for i, df in enumerate(df_list):
lambda_values = list(set([x[1:] for x in df.index.to_numpy()]))
if len(lambda_values) > 1:
<<<<<<< HEAD
ind = [
j
for j in range(len(lambda_values[0]))
Expand All @@ -496,23 +475,14 @@ def block_average(df_list, estimator="MBAR", num=10, **kwargs):
"Provided DataFrame, df_list[{}] has more than one lambda value in df.index[{}]".format(
i, ind
)
=======
ind = [j for j in range(len(lambda_values[0])) if len(list(set([x[j] for x in lambda_values]))) > 1][0]
raise ValueError(
"Provided DataFrame, df_list[{}] has more than one lambda value in df.index[{}]".format(i, ind)
>>>>>>> 9eb22a1 (Moving average (#381))
)

if estimator in ["BAR"] and len(df_list) > 2:
raise ValueError(
"Restrict to two DataFrames, one with a fep-lambda value and one its forward adjacent state for a "
"meaningful result."
)
<<<<<<< HEAD

=======

>>>>>>> 9eb22a1 (Moving average (#381))
logger.info("Begin Moving Average Analysis")
average_list = []
average_error_list = []
Expand Down
7 changes: 0 additions & 7 deletions src/alchemlyb/estimators/mbar_.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,12 @@ class MBAR(BaseEstimator, _EstimatorMixOut):
.. versionchanged:: 2.1.0
`n_bootstraps` option added.
.. versionchanged:: 2.4.0
<<<<<<< HEAD
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.
.. versionchanged:: 2.5.0
Added computation of enthalpy and entropy
=======
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.
>>>>>>> 9eb22a1 (Moving average (#381))
"""

def __init__(
Expand Down
8 changes: 0 additions & 8 deletions src/alchemlyb/visualisation/convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ def plot_convergence(dataframe, units=None, final_error=None, ax=None):
.. versionchanged:: 0.6.0
data now takes in dataframe
.. versionadded:: 0.4.0
<<<<<<< HEAD
=======
>>>>>>> 9eb22a1 (Moving average (#381))
"""
if units is not None:
dataframe = get_unit_converter(units)(dataframe)
Expand Down Expand Up @@ -196,11 +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
<<<<<<< HEAD
=======
>>>>>>> 9eb22a1 (Moving average (#381))
"""
if units is not None:
dataframe = get_unit_converter(units)(dataframe)
Expand Down
1 change: 0 additions & 1 deletion src/alchemlyb/visualisation/dF_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,3 @@ def plot_dF_state(

leg.get_frame().set_alpha(0.5)
return fig

0 comments on commit abdbe44

Please sign in to comment.