Skip to content

Commit

Permalink
Update entropy attribute name from delta_s to delta_sT
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclark5 committed Nov 13, 2024
1 parent f312b6d commit c09fbb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/alchemlyb/estimators/mbar_.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ class MBAR(BaseEstimator, _EstimatorMixOut):
The estimated statistical uncertainty (one standard deviation) in
dimensionless enthalpy differences.
delta_s_ : DataFrame, optional
delta_sT_ : DataFrame, optional
The estimated dimensionless entropy difference between each state.
d_delta_s_ : DataFrame
d_delta_sT_ : DataFrame
The estimated statistical uncertainty (one standard deviation) in
dimensionless entropy differences.
Expand Down Expand Up @@ -218,10 +218,10 @@ def fit(self, u_nk, compute_entropy_enthalpy=False):
self._d_delta_h_ = pd.DataFrame(
out["dDelta_u"], columns=self._states_, index=self._states_
)
self._delta_s_ = pd.DataFrame(
self._delta_sT_ = pd.DataFrame(
out["Delta_s"], columns=self._states_, index=self._states_
)
self._d_delta_s_ = pd.DataFrame(
self._d_delta_sT_ = pd.DataFrame(
out["dDelta_s"], columns=self._states_, index=self._states_
)

Expand All @@ -230,8 +230,8 @@ def fit(self, u_nk, compute_entropy_enthalpy=False):
if compute_entropy_enthalpy:
self._delta_h_.attrs = u_nk.attrs
self._d_delta_h_.attrs = u_nk.attrs
self._delta_s_.attrs = u_nk.attrs
self._d_delta_s_.attrs = u_nk.attrs
self._delta_sT_.attrs = u_nk.attrs
self._d_delta_sT_.attrs = u_nk.attrs

return self

Expand Down
4 changes: 2 additions & 2 deletions src/alchemlyb/tests/test_fep_estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def test_enthalpy_entropy_mbar(gmx_benzene_Coulomb_u_nk):
assert mbar.delta_h_.iloc[0, :].to_numpy() == pytest.approx(
np.array([0.0, 1.241970, 1.695000, 1.706555, 1.388906]), abs=1e-6
)
assert mbar.delta_s_.iloc[0, :].to_numpy() == pytest.approx(
assert mbar.delta_sT_.iloc[0, :].to_numpy() == pytest.approx(
np.array([0.0, -0.377099, -0.862990, -1.279746, -1.652250]), abs=1e-6
)
assert mbar.d_delta_f_.iloc[0, :].to_numpy() == pytest.approx(
Expand All @@ -218,7 +218,7 @@ def test_enthalpy_entropy_mbar(gmx_benzene_Coulomb_u_nk):
assert mbar.d_delta_h_.iloc[0, :].to_numpy() == pytest.approx(
np.array([0.0, 0.011598, 0.016538, 0.018077, 0.018940]), abs=1e-6
)
assert mbar.d_delta_s_.iloc[0, :].to_numpy() == pytest.approx(
assert mbar.d_delta_sT_.iloc[0, :].to_numpy() == pytest.approx(
np.array([0.0, 0.012242, 0.019519, 0.023606, 0.026107]), abs=1e-6
)

Expand Down

0 comments on commit c09fbb1

Please sign in to comment.