Skip to content

Commit

Permalink
Revert "allow separate bootstrap_solver_tolerance arg" (#480)
Browse files Browse the repository at this point in the history
This reverts commit 28cf4b3.
  • Loading branch information
mikemhenry authored Nov 14, 2022
1 parent 28cf4b3 commit f233b40
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pymbar/mbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class MBAR:
"""
# =========================================================================

def __init__(self, u_kn, N_k, maximum_iterations=10000, relative_tolerance=1.0e-7, solver_tolerance=DEFAULT_SOLVER_TOLERANCE, bootstrap_solver_tolerance,
verbose=False, initial_f_k=None, solver_protocol=None, initialize='zeros', x_kindices=None, nbootstraps=None, rseed=None, **kwargs):
def __init__(self, u_kn, N_k, maximum_iterations=10000, relative_tolerance=1.0e-7, solver_tolerance=DEFAULT_SOLVER_TOLERANCE, verbose=False, initial_f_k=None,
solver_protocol=None, initialize='zeros', x_kindices=None, nbootstraps=None, rseed=None, **kwargs):

"""Initialize multistate Bennett acceptance ratio (MBAR) on a set of simulation data.
Expand Down Expand Up @@ -113,8 +113,6 @@ def __init__(self, u_kn, N_k, maximum_iterations=10000, relative_tolerance=1.0e-
Set to determine the relative tolerance convergence criteria (default 1.0e-7)
solver_tolerance : float, optional
Set the tolerance for which to use for solving the mbar equation (see solve_mbar_once()) (default 1.0e-12)
bootstrap_solver_tolerance : float, optional
Set the tolerance for which to use for solving the mbar equation (see solve_mbar_once()) (default 1.0e-12) when bootstrapping
verbosity : bool, optional
Set to True if verbose debug output is desired (default False)
initial_f_k : np.ndarray, float, shape=(K), optional
Expand Down Expand Up @@ -333,7 +331,7 @@ def __init__(self, u_kn, N_k, maximum_iterations=10000, relative_tolerance=1.0e-
new_kindices = k_indices[np.random.randint(int(N_k[k]), size=int(N_k[k]))]
rinit[k_indices] = new_kindices

self.f_k_boots[b,:] = mbar_solvers.solve_mbar_for_all_states(self.u_kn[:,rinit], self.N_k, f_k_init, solver_protocol, bootstrap_solver_tolerance)
self.f_k_boots[b,:] = mbar_solvers.solve_mbar_for_all_states(self.u_kn[:,rinit], self.N_k, f_k_init, solver_protocol, solver_tolerance)
if verbose:
if b%10==0:
print("Calculated {:d}/{:d} bootstrap samples".format(b,self.nbootstraps))
Expand Down

0 comments on commit f233b40

Please sign in to comment.