From 4d1f9c155694abdcf438ce290c96a7e96d424045 Mon Sep 17 00:00:00 2001 From: ajfriedman22 Date: Fri, 18 Oct 2024 10:51:13 -0600 Subject: [PATCH] Update test to cover changes in combine weights --- ensemble_md/tests/test_replica_exchange_EE.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ensemble_md/tests/test_replica_exchange_EE.py b/ensemble_md/tests/test_replica_exchange_EE.py index 1eaf261..9ef4682 100644 --- a/ensemble_md/tests/test_replica_exchange_EE.py +++ b/ensemble_md/tests/test_replica_exchange_EE.py @@ -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