From 37f96ef4e04ba18b751cf6cb5fdfa858abc4a5c9 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 20 Dec 2024 18:19:55 -0800 Subject: [PATCH 1/2] update: allow symmetrical slabs --- src/py/mat3ra/made/tools/build/interface/builders.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/py/mat3ra/made/tools/build/interface/builders.py b/src/py/mat3ra/made/tools/build/interface/builders.py index ddb9461a..becf4d01 100644 --- a/src/py/mat3ra/made/tools/build/interface/builders.py +++ b/src/py/mat3ra/made/tools/build/interface/builders.py @@ -170,6 +170,8 @@ def _generate(self, configuration: InterfaceConfiguration) -> List[PymatgenInter substrate_miller=configuration.substrate_configuration.miller_indices, film_miller=configuration.film_configuration.miller_indices, zslgen=generator, + # We need to preserve symmetric slabs for different terminations at the surface + filter_out_sym_slabs=False, ) generated_termination_pairs = [ From 4a7954c90ae173b5794b061741f9da13384047d4 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:04:17 -0800 Subject: [PATCH 2/2] update: fix test of gb with new termiantions possiblilities --- tests/py/unit/test_tools_build_grain_boundary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/py/unit/test_tools_build_grain_boundary.py b/tests/py/unit/test_tools_build_grain_boundary.py index 86ad9476..8204f766 100644 --- a/tests/py/unit/test_tools_build_grain_boundary.py +++ b/tests/py/unit/test_tools_build_grain_boundary.py @@ -58,7 +58,7 @@ def test_slab_grain_boundary_builder(): [0.0, 0.0, 8.734], ] # Adjusted expected value to pass tests on GHA due to slab generation differences between GHA and local - expected_coordinate_15 = [0.777190818, 0.0, 0.110688115] + expected_coordinate_15 = [0.831572455, 0.0, 0.110688115] assert len(gb.basis.elements.values) == 32 assertion_utils.assert_deep_almost_equal(expected_coordinate_15, gb.basis.coordinates.values[15])