From 5676be2da8a91c0cf4db78b3ec492dc90f867652 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:29:36 -0800 Subject: [PATCH 1/6] update: remove filtering symmetrical slabs --- src/py/mat3ra/made/tools/build/slab/builders.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/py/mat3ra/made/tools/build/slab/builders.py b/src/py/mat3ra/made/tools/build/slab/builders.py index 282ec27e..0cae1121 100644 --- a/src/py/mat3ra/made/tools/build/slab/builders.py +++ b/src/py/mat3ra/made/tools/build/slab/builders.py @@ -22,19 +22,21 @@ class SlabBuilder(ConvertGeneratedItemsPymatgenStructureMixin, BaseBuilder): _ConfigurationType: type(SlabConfiguration) = SlabConfiguration # type: ignore _GeneratedItemType: PymatgenSlab = PymatgenSlab # type: ignore _SelectorParametersType: type(SlabSelectorParameters) = SlabSelectorParameters # type: ignore - __configuration: SlabConfiguration + __configuration: SlabConfiguration = SlabConfiguration() def _generate(self, configuration: _ConfigurationType) -> List[_GeneratedItemType]: # type: ignore generator = PymatgenSlabGenerator( initial_structure=to_pymatgen(configuration.bulk), miller_index=configuration.miller_indices, min_slab_size=configuration.thickness, - min_vacuum_size=0, + min_vacuum_size=1, in_unit_planes=True, reorient_lattice=True, primitive=configuration.make_primitive, ) - raw_slabs = generator.get_slabs() + raw_slabs = generator.get_slabs( + filter_out_sym_slabs=False, + ) self.__configuration = configuration return [self.__conditionally_convert_slab_to_orthogonal_pymatgen(slab) for slab in raw_slabs] From fd0d541a65e7dc7a99167921566e7414b1d7fa86 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:49:59 -0800 Subject: [PATCH 2/6] chore: fix types issues --- src/py/mat3ra/made/tools/build/slab/builders.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/py/mat3ra/made/tools/build/slab/builders.py b/src/py/mat3ra/made/tools/build/slab/builders.py index 0cae1121..1f8fea0f 100644 --- a/src/py/mat3ra/made/tools/build/slab/builders.py +++ b/src/py/mat3ra/made/tools/build/slab/builders.py @@ -22,14 +22,14 @@ class SlabBuilder(ConvertGeneratedItemsPymatgenStructureMixin, BaseBuilder): _ConfigurationType: type(SlabConfiguration) = SlabConfiguration # type: ignore _GeneratedItemType: PymatgenSlab = PymatgenSlab # type: ignore _SelectorParametersType: type(SlabSelectorParameters) = SlabSelectorParameters # type: ignore - __configuration: SlabConfiguration = SlabConfiguration() + __configuration: SlabConfiguration def _generate(self, configuration: _ConfigurationType) -> List[_GeneratedItemType]: # type: ignore generator = PymatgenSlabGenerator( initial_structure=to_pymatgen(configuration.bulk), miller_index=configuration.miller_indices, min_slab_size=configuration.thickness, - min_vacuum_size=1, + min_vacuum_size=0, in_unit_planes=True, reorient_lattice=True, primitive=configuration.make_primitive, From acee1ab7311dad23ac165f14d50c1142be16a3f3 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:47:31 -0800 Subject: [PATCH 3/6] chore: add explanation --- src/py/mat3ra/made/tools/build/slab/builders.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/py/mat3ra/made/tools/build/slab/builders.py b/src/py/mat3ra/made/tools/build/slab/builders.py index 1f8fea0f..cb096dc5 100644 --- a/src/py/mat3ra/made/tools/build/slab/builders.py +++ b/src/py/mat3ra/made/tools/build/slab/builders.py @@ -35,6 +35,7 @@ def _generate(self, configuration: _ConfigurationType) -> List[_GeneratedItemTyp primitive=configuration.make_primitive, ) raw_slabs = generator.get_slabs( + # We need to preserve symmetric slabs for different terminations at the surface filter_out_sym_slabs=False, ) self.__configuration = configuration From 97ce845f29b64a2707db5902af1a3ad13ea7a826 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:48:33 -0800 Subject: [PATCH 4/6] try: remove 3.8. from tests --- .github/workflows/cicd.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 8b74d0da..c26bf1e3 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -37,7 +37,6 @@ jobs: strategy: matrix: python-version: - - 3.8.x - 3.9.x - 3.10.x - 3.11.x From 59f8985f3f25aa11db068cbc7696e76b8e142cda Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:53:48 -0800 Subject: [PATCH 5/6] udpate: start from 3.10.13 --- .github/workflows/cicd.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index c26bf1e3..f12e3d20 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: [3.8.6] + python-version: [3.10.13] steps: - name: Checkout this repository @@ -37,7 +37,6 @@ jobs: strategy: matrix: python-version: - - 3.9.x - 3.10.x - 3.11.x @@ -146,7 +145,7 @@ jobs: - name: Publish python release uses: ./actions/py/publish with: - python-version: 3.8.x + python-version: 3.10.13 github-token: ${{ secrets.BOT_GITHUB_TOKEN }} pypi-api-token: ${{ secrets.PYPI_API_TOKEN }} publish-tag: 'false' From 336f447ff37609741729aa585924948222ebcd41 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 18 Dec 2024 19:06:51 -0800 Subject: [PATCH 6/6] try: python 12 and 13 for tests --- .github/workflows/cicd.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index f12e3d20..c213c1e8 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -39,6 +39,8 @@ jobs: python-version: - 3.10.x - 3.11.x + - 3.12.x + - 3.13.x steps: - name: Checkout this repository