|
20 | 20 | input_path = os.path.join(current_path, "data") |
21 | 21 |
|
22 | 22 |
|
23 | | -def test_parse_transmtx(): |
| 23 | +def test_calc_transmtx(): |
24 | 24 | # Case 1: Expanded ensemble where there is a transition matrix |
25 | | - A1, B1, C1 = analyze_matrix.parse_transmtx(os.path.join(input_path, 'log/EXE.log')) |
| 25 | + A1, B1, C1 = analyze_matrix.calc_transmtx(os.path.join(input_path, 'log/EXE.log')) |
26 | 26 | A1_expected = np.array([[0.5, 0.34782609, 0.15000001, 0, 0, 0], |
27 | 27 | [0.34782609, 0.18181819, 0.15789473, 0.17647059, 0.10526316, 0.125 ], # noqa: E128, E202, E203 |
28 | 28 | [0.15000001, 0.15789473, 0. , 0.14285715, 0.4375 , 0.07692308], # noqa: E202, E203 |
@@ -51,12 +51,12 @@ def test_parse_transmtx(): |
51 | 51 | # Case 2: Expanded ensemble where there is no transition matrix |
52 | 52 | log = os.path.join(input_path, 'log/EXE_0.log') |
53 | 53 | with pytest.raises(ParseError, match=f'No transition matrices found in {log}.'): |
54 | | - A2, B2, C2 = analyze_matrix.parse_transmtx(log) |
| 54 | + A2, B2, C2 = analyze_matrix.calc_transmtx(log) |
55 | 55 |
|
56 | 56 | # Case 3: Hamiltonian replica exchange |
57 | 57 | # Note that the transition matrices shown in the log file of different replicas should all be the same. |
58 | 58 | # Here we use log/HREX.log, which is a part of the log file from anthracene HREX. |
59 | | - A3, B3, C3 = analyze_matrix.parse_transmtx(os.path.join(input_path, 'log/HREX.log'), expanded_ensemble=False) |
| 59 | + A3, B3, C3 = analyze_matrix.calc_transmtx(os.path.join(input_path, 'log/HREX.log'), expanded_ensemble=False) |
60 | 60 | A3_expected = np.array([[0.7869, 0.2041, 0.0087, 0.0003, 0.0000, 0.0000, 0.0000, 0.0000], # noqa: E128, E202, E203, E501 |
61 | 61 | [0.2041, 0.7189, 0.0728, 0.0041, 0.0001, 0.0000, 0.0000, 0.0000], # noqa: E128, E202, E203 |
62 | 62 | [0.0087, 0.0728, 0.7862, 0.1251, 0.0071, 0.0001, 0.0000, 0.0000], # noqa: E202, E203 |
|
0 commit comments