From 36d8d3aa4bc8c2220ee95f7a3bb1155ddfc0b3bc Mon Sep 17 00:00:00 2001 From: jeremiah Date: Tue, 10 Dec 2024 11:05:12 -0800 Subject: [PATCH] fix calc_local_correlations function signature --- python/src/clexulator.cpp | 6 +++--- python/tests/clexulator/test_correlations.py | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/python/src/clexulator.cpp b/python/src/clexulator.cpp index f821055..5f4d794 100644 --- a/python/src/clexulator.cpp +++ b/python/src/clexulator.cpp @@ -1309,10 +1309,10 @@ PYBIND11_MODULE(_clexulator, m) { m.def( "calc_local_correlations", - [](clexulator::LocalClexulatorWrapper const &wrapper, - clexulator::ConfigDoFValues const &config_dof_values, - std::shared_ptr const + [](std::shared_ptr const &supercell_neighbor_list, + clexulator::LocalClexulatorWrapper const &wrapper, + clexulator::ConfigDoFValues const &config_dof_values, Index unitcell_index, Index equivalent_index, std::optional> indices) { if (wrapper.local_clexulator->size() == 0) { diff --git a/python/tests/clexulator/test_correlations.py b/python/tests/clexulator/test_correlations.py index 7591ee4..de112b6 100644 --- a/python/tests/clexulator/test_correlations.py +++ b/python/tests/clexulator/test_correlations.py @@ -88,22 +88,22 @@ def test_calc_local_correlations(session_shared_datadir): # Test calculate all correlations for equivalent_index in range(local_clexulator.n_equivalents()): correlations = clex.calc_local_correlations( - local_clexulator, - dof_values, - supercell_neighbor_list, - unitcell_index, - equivalent_index, + local_clexulator=local_clexulator, + config_dof_values=dof_values, + supercell_neighbor_list=supercell_neighbor_list, + unitcell_index=unitcell_index, + equivalent_index=equivalent_index, ) assert isinstance(correlations, np.ndarray) assert len(correlations) == 6 # print(unitcell_index, equivalent_index, correlations.tolist()) restricted = clex.calc_local_correlations( - local_clexulator, - dof_values, - supercell_neighbor_list, - unitcell_index, - equivalent_index, + local_clexulator=local_clexulator, + config_dof_values=dof_values, + supercell_neighbor_list=supercell_neighbor_list, + unitcell_index=unitcell_index, + equivalent_index=equivalent_index, indices=[1, 2], ) assert isinstance(restricted, np.ndarray)