Skip to content

Commit

Permalink
Fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfriedman22 committed Oct 18, 2024
1 parent 4d1f9c1 commit 8075aa0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ensemble_md/tests/test_replica_exchange_EE.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,11 +870,19 @@ 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

# Test 3: MT-REXEE
REXEE.n_tot = 27
REXEE.n_sub = 9
REXEE.s = 9
REXEE.n_sim = 3
REXEE.state_ranges = [[0, 1, 2, 3, 4, 5, 6, 7, 8],
[9, 10, 11, 12, 13, 14, 15, 16, 17],
[18, 19, 20, 21, 22, 23, 24, 25, 26]]
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
assert np.allclose(list(g_vec_3), [0.0, 0.03813, 0.08744, 0.58124, 1.424376, 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]) # noqa: E501

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

0 comments on commit 8075aa0

Please sign in to comment.