Skip to content

Commit

Permalink
Update test to cover changes in combine weights
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfriedman22 committed Oct 18, 2024
1 parent 95e2e3c commit 4d1f9c1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ensemble_md/tests/test_replica_exchange_EE.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,12 @@ def test_combine_weights(self, params_dict):
[0, -0.40723412, 0.95296164, 1.95296164]])
assert np.allclose(list(g_vec_2), [0, 2.1, 3.861407249466951, 3.4541731330165306, 4.814368891580968, 5.814368891580968]) # noqa: E501

weights = [[0.0, 0.03813, 0.08744, 0.58124, 1.42376, 1.86745, 3.24031, 3.09609, 3.5702],
[0.0, 0.26761, 0.12656, 1.28994, 2.58161, 3.40522, 5.14597, 5.1271, 4.71232],
[0.0, -0.24036, -0.21415, 0.90212, 1.88597, 3.5445, 4.62079, 4.48149, 4.84671]]
w_3, g_vec_3 = REXEE.combine_weights(weights)
assert np.allclose(g_vec_3, [0.0, 0.038, 0.087, 0.581, 1.424, 1.867, 3.24, 3.096, 3.57, 0.0, 0.268, 0.127, 1.29, 2.582, 3.405, 5.146, 5.127, 4.712, 0.0, -0.24, -0.214, 0.902, 1.886, 3.544, 4.621, 4.481, 4.847]) # noqa: E501

def test_histogram_correction(self, params_dict):
REXEE = get_REXEE_instance(params_dict)
REXEE.n_tot = 6
Expand Down

0 comments on commit 4d1f9c1

Please sign in to comment.