From 9824dd3682b17ad5f4cdc8a7ba13d4c05475fc50 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 9 May 2024 11:21:22 -0700 Subject: [PATCH 01/19] chore: bump made --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 13050cc5..f4be201d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,8 +10,7 @@ dependencies = [ "matplotlib>=3.4.1", "pandas>=1.5.3", "pymatgen>=2024.4.13", -# "mat3ra-made>=2024.5.3.post0", - "mat3ra-made@git+ssh://git@github.com/Exabyte-io/made.git@bfed4b82ab726c3f51fad3bc03c005a0dbfd17fc", + "mat3ra-made>=2024.5.9.post0", "mat3ra-utils" ] From b4624ef8d6a0dea6f5b1b76e9ddd692f1425c6af Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 9 May 2024 21:07:46 -0700 Subject: [PATCH 02/19] chore: use interface settings as class and restructure cells --- ...create_interface_with_min_strain_zsl.ipynb | 87 +++++++------------ 1 file changed, 33 insertions(+), 54 deletions(-) diff --git a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb index 71fddb1e..e51bfdd0 100644 --- a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb +++ b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb @@ -34,9 +34,10 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## 1. Set Input Parameters\n", + "## 1. Set Interface Parameters\n", "\n", "### 1.1. Set Substrate and Layer Parameters \n", + "Imported `InterfaceSettings` is a class that specifies the parameters for the construction of the interface. The default values are assumed if properties are not set during the initialization.\n", "Additionally, specify if the termination selection is done using interactive prompt, or the via selecting the termination index in the code." ] }, @@ -46,17 +47,21 @@ "metadata": {}, "outputs": [], "source": [ - "SUBSTRATE_PARAMETERS = {\n", - " \"MILLER_INDICES\": (1, 1, 1), # the miller indices of the interfacial plane\n", - " \"THICKNESS\": 3, # in layers\n", - "}\n", - "\n", - "LAYER_PARAMETERS = {\n", - " \"MILLER_INDICES\": (0, 0, 1), # the miller indices of the interfacial plane\n", - " \"THICKNESS\": 1, # in layers\n", - "}\n", + "from mat3ra.made.tools.build.interface import InterfaceSettings, SlabParameters\n", "\n", - "USE_CONVENTIONAL_CELL = True # if True, the surface plane is constructed using miller indices of the conventional cell\n", + "interface_settings = InterfaceSettings(\n", + " distance_z=3.0, # distance between two planes, in Angstroms\n", + " max_area=400, # maximum area of the generated interfaces, in Angstroms^2\n", + " substrate_parameters=SlabParameters(\n", + " miller_indices=(1, 1, 1), # the Miller indices of the interfacial plane of the substrate\n", + " thickness=3, # in layers\n", + " ),\n", + " layer_parameters=SlabParameters(\n", + " miller_indices=(0, 0, 1), # the Miller indices of the interfacial plane of the layer\n", + " thickness=1, # in layers\n", + " ),\n", + " use_conventional_cell=True, # if True, the surface plane is constructed using miller indices of the conventional cell\n", + ")\n", "\n", "IS_TERMINATION_SELECTION_INTERACTIVE = False # if True, the user can select the termination interactively\n", "TERMINATION_INDEX = 0 # the default termination index that is used if no termination selected, ignored in interactive mode" @@ -64,55 +69,29 @@ }, { "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 1.2. Set Interface Parameters\n", - "\n", - "The distance between layer and substrate and maximum area to consider when matching.\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], "source": [ - "INTERFACE_PARAMETERS = {\n", - " \"DISTANCE_Z\": 3.0, # in Angstroms\n", - " \"MAX_AREA\": 400, # in Angstroms^2\n", - "}" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 1.3. Set Algorithm Parameters" - ] + "### 1.2. Set Algorithm Parameters (Optional)\n", + "The search algorithm for supercells matching can be tuned by setting its parameters directly, otherwise the default values are used." + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, "outputs": [], "source": [ - "ZSL_PARAMETERS = {\n", - " \"MAX_AREA\": INTERFACE_PARAMETERS[\"MAX_AREA\"], # The area to consider in Angstrom^2\n", - " \"MAX_AREA_TOL\": 0.09, # The area within this tolerance is considered equal\n", - " \"MAX_LENGTH_TOL\": 0.03, # supercell lattice vectors lengths within this tolerance are considered equal\n", - " \"MAX_ANGLE_TOL\": 0.01, # supercell lattice angles within this tolerance are considered equal\n", - " \"STRAIN_TOL\": 10e-6, # strains within this tolerance are considered equal\n", - "}\n", - "\n", - "# unify the parameters\n", - "interface_settings = {\n", - " \"SUBSTRATE_PARAMETERS\": SUBSTRATE_PARAMETERS,\n", - " \"LAYER_PARAMETERS\": LAYER_PARAMETERS,\n", - " \"USE_CONVENTIONAL_CELL\": USE_CONVENTIONAL_CELL,\n", - " \"ZSL_PARAMETERS\": ZSL_PARAMETERS,\n", - " \"INTERFACE_PARAMETERS\": INTERFACE_PARAMETERS,\n", - "}" - ] + "from mat3ra.made.tools.build.interface import ZSLParameters\n", + "interface_settings.ZSLParameters = ZSLParameters(\n", + " max_area_tol=0.09, # maximum tolerance on ratio of super-lattices to consider equal\n", + " max_length_tol=0.03, # maximum length tolerance for two vectors to be considered equal\n", + " max_angle_tol=0.01, # maximum angle tolerance for two sets of vectors to have equal angles\n", + ")" + ], + "metadata": { + "collapsed": false + }, + "execution_count": null }, { "cell_type": "markdown", From 3244b8ace2bb78c0860e213966d90a768cc89a45 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 9 May 2024 21:20:11 -0700 Subject: [PATCH 03/19] update: enrich names with strain --- .../create_interface_with_min_strain_zsl.ipynb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb index e51bfdd0..c229e0e5 100644 --- a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb +++ b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb @@ -338,7 +338,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### 6.3. Pass data to the outside runtime" + "### 6.3. Pass data to the outside runtime\n", + "Enrich the selected interfaces names with the strain values and pass them to the application runtime." ] }, { @@ -349,7 +350,11 @@ "source": [ "from utils.jupyterlite import set_data\n", "\n", - "set_data(\"materials\", selected_interfaces)" + "names = [f'{interface[\"name\"]}, Interface, Strain:{interface[\"metadata\"][\"interface_properties\"][\"mean_abs_strain\"]*100:.3f}%' for interface in selected_interfaces]\n", + "\n", + "named_selected_interfaces = [{\"name\": name, \"interface\": interface} for name, interface in zip(names, selected_interfaces)]\n", + "\n", + "set_data(\"materials\", named_selected_interfaces)" ] } ], From 47a9844ea44fd0f95ca7664632497231cfd78351 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 9 May 2024 21:20:22 -0700 Subject: [PATCH 04/19] chore: import made from github --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f4be201d..164d17d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,8 @@ dependencies = [ "matplotlib>=3.4.1", "pandas>=1.5.3", "pymatgen>=2024.4.13", - "mat3ra-made>=2024.5.9.post0", +# "mat3ra-made>=2024.5.9.post0", + "mat3ra-made@git+ssh://git@github.com/Exabyte-io/made.git@e19f1ea7dd71a9ebc15408dfc2dfdd27c6b6cae0", "mat3ra-utils" ] From 39fc280451260c5faf53af81622c0da5665905c6 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 9 May 2024 21:27:19 -0700 Subject: [PATCH 05/19] update: showcase two ways of setting the properties --- ...create_interface_with_min_strain_zsl.ipynb | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb index c229e0e5..634d596f 100644 --- a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb +++ b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb @@ -47,22 +47,21 @@ "metadata": {}, "outputs": [], "source": [ - "from mat3ra.made.tools.build.interface import InterfaceSettings, SlabParameters\n", + "from mat3ra.made.tools.build.interface import InterfaceSettings\n", "\n", + "# Parameters can be set during the class initialization:\n", "interface_settings = InterfaceSettings(\n", " distance_z=3.0, # distance between two planes, in Angstroms\n", - " max_area=400, # maximum area of the generated interfaces, in Angstroms^2\n", - " substrate_parameters=SlabParameters(\n", - " miller_indices=(1, 1, 1), # the Miller indices of the interfacial plane of the substrate\n", - " thickness=3, # in layers\n", - " ),\n", - " layer_parameters=SlabParameters(\n", - " miller_indices=(0, 0, 1), # the Miller indices of the interfacial plane of the layer\n", - " thickness=1, # in layers\n", - " ),\n", + " max_area=400, # maximum area of the generated interfaces, in Angstroms^2\n", " use_conventional_cell=True, # if True, the surface plane is constructed using miller indices of the conventional cell\n", ")\n", "\n", + "# Parameters can be set after the initialization:\n", + "interface_settings.SubstrateParameters.miller_indices = (1, 1, 1) # the Miller indices of the interfacial plane of the substrate\n", + "interface_settings.SubstrateParameters.thickness = 3 # substrate thickness in layers\n", + "interface_settings.LayerParameters.miller_indices = (0, 0, 1) # the Miller indices of the interfacial plane of the layer\n", + "interface_settings.LayerParameters.thickness = 1 # layer thickness in layers\n", + "\n", "IS_TERMINATION_SELECTION_INTERACTIVE = False # if True, the user can select the termination interactively\n", "TERMINATION_INDEX = 0 # the default termination index that is used if no termination selected, ignored in interactive mode" ] From 48ae117863e3d73c23ccf4ed046bdebf061ba08a Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 10 May 2024 12:31:39 -0700 Subject: [PATCH 06/19] chore: fix a mistake --- .../create_interface_with_min_strain_zsl.ipynb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb index 634d596f..c3321a70 100644 --- a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb +++ b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb @@ -52,7 +52,7 @@ "# Parameters can be set during the class initialization:\n", "interface_settings = InterfaceSettings(\n", " distance_z=3.0, # distance between two planes, in Angstroms\n", - " max_area=400, # maximum area of the generated interfaces, in Angstroms^2\n", + " max_area=50, # maximum area of the generated interfaces, in Angstroms^2\n", " use_conventional_cell=True, # if True, the surface plane is constructed using miller indices of the conventional cell\n", ")\n", "\n", @@ -349,11 +349,15 @@ "source": [ "from utils.jupyterlite import set_data\n", "\n", - "names = [f'{interface[\"name\"]}, Interface, Strain:{interface[\"metadata\"][\"interface_properties\"][\"mean_abs_strain\"]*100:.3f}%' for interface in selected_interfaces]\n", + "names = [\n", + " f'{interface[\"name\"]}, Interface, Strain:{interface[\"metadata\"][\"interface_properties\"][\"mean_abs_strain\"]*100:.3f}%'\n", + " for interface in selected_interfaces\n", + "]\n", "\n", - "named_selected_interfaces = [{\"name\": name, \"interface\": interface} for name, interface in zip(names, selected_interfaces)]\n", + "for name, interface in zip(names, selected_interfaces):\n", + " interface[\"name\"] = name\n", "\n", - "set_data(\"materials\", named_selected_interfaces)" + "set_data(\"materials\", selected_interfaces)" ] } ], From 65278c80cfa5a4781fc04c42f7b1aa08e582ccf3 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 10 May 2024 12:57:01 -0700 Subject: [PATCH 07/19] chore: fix a mistake 2 --- .../create_interface_with_min_strain_zsl.ipynb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb index c3321a70..964be6db 100644 --- a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb +++ b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb @@ -52,7 +52,7 @@ "# Parameters can be set during the class initialization:\n", "interface_settings = InterfaceSettings(\n", " distance_z=3.0, # distance between two planes, in Angstroms\n", - " max_area=50, # maximum area of the generated interfaces, in Angstroms^2\n", + " max_area=400, # maximum area of the generated interfaces, in Angstroms^2\n", " use_conventional_cell=True, # if True, the surface plane is constructed using miller indices of the conventional cell\n", ")\n", "\n", @@ -349,13 +349,9 @@ "source": [ "from utils.jupyterlite import set_data\n", "\n", - "names = [\n", - " f'{interface[\"name\"]}, Interface, Strain:{interface[\"metadata\"][\"interface_properties\"][\"mean_abs_strain\"]*100:.3f}%'\n", - " for interface in selected_interfaces\n", - "]\n", - "\n", - "for name, interface in zip(names, selected_interfaces):\n", - " interface[\"name\"] = name\n", + "for interface in selected_interfaces:\n", + " if \"Interface, Strain:\" not in interface[\"name\"]:\n", + " interface[\"name\"] = f'{interface[\"name\"]}, Interface, Strain:{interface[\"metadata\"][\"interface_properties\"][\"mean_abs_strain\"]*100:.3f}%'\n", "\n", "set_data(\"materials\", selected_interfaces)" ] From 46e06877f7b438ef9fdd6c819e1651f2b15873c6 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 10 May 2024 13:04:24 -0700 Subject: [PATCH 08/19] chore: adjust description --- .../create_interface_with_min_strain_zsl.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb index 964be6db..73e33034 100644 --- a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb +++ b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb @@ -11,7 +11,7 @@ "

Usage

\n", "\n", "1. Make sure to select Input Materials\n", - "2. Set Input Parameters (e.g. `MILLER_INDICES`, `THICKNESS`, `MAX_AREA`) below or use the default values\n", + "2. Set Interface Parameters (e.g. `distance_z`, `max_area`, `miller_indices`) below or use the default values\n", "3. Click \"Run\" > \"Run All Cells\" to run all cells\n", "4. Wait for the run to complete (depending on the area, it can take 1-2 min or more). Scroll down to view cell results.\n", "5. Review the strain plot and modify its parameters as needed\n", From c1f12f707aae200238c8a37ca0c8739fc85663f2 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Mon, 13 May 2024 11:46:48 -0700 Subject: [PATCH 09/19] update: update settings usage --- .../create_interface_with_min_strain_zsl.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb index 73e33034..90254a3c 100644 --- a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb +++ b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb @@ -52,7 +52,6 @@ "# Parameters can be set during the class initialization:\n", "interface_settings = InterfaceSettings(\n", " distance_z=3.0, # distance between two planes, in Angstroms\n", - " max_area=400, # maximum area of the generated interfaces, in Angstroms^2\n", " use_conventional_cell=True, # if True, the surface plane is constructed using miller indices of the conventional cell\n", ")\n", "\n", @@ -82,6 +81,7 @@ "source": [ "from mat3ra.made.tools.build.interface import ZSLParameters\n", "interface_settings.ZSLParameters = ZSLParameters(\n", + " max_area=400, # maximum area of the generated interfaces, in Angstroms^2\n", " max_area_tol=0.09, # maximum tolerance on ratio of super-lattices to consider equal\n", " max_length_tol=0.03, # maximum length tolerance for two vectors to be considered equal\n", " max_angle_tol=0.01, # maximum angle tolerance for two sets of vectors to have equal angles\n", From 3573c7cad5929de945009359332590e9bcf464d7 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Mon, 13 May 2024 21:56:02 -0700 Subject: [PATCH 10/19] update: adjust to new settings --- .../create_interface_with_min_strain_zsl.ipynb | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb index 90254a3c..b5d30318 100644 --- a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb +++ b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb @@ -50,16 +50,16 @@ "from mat3ra.made.tools.build.interface import InterfaceSettings\n", "\n", "# Parameters can be set during the class initialization:\n", - "interface_settings = InterfaceSettings(\n", + "interface_builder_settings = InterfaceSettings(\n", " distance_z=3.0, # distance between two planes, in Angstroms\n", " use_conventional_cell=True, # if True, the surface plane is constructed using miller indices of the conventional cell\n", ")\n", "\n", "# Parameters can be set after the initialization:\n", - "interface_settings.SubstrateParameters.miller_indices = (1, 1, 1) # the Miller indices of the interfacial plane of the substrate\n", - "interface_settings.SubstrateParameters.thickness = 3 # substrate thickness in layers\n", - "interface_settings.LayerParameters.miller_indices = (0, 0, 1) # the Miller indices of the interfacial plane of the layer\n", - "interface_settings.LayerParameters.thickness = 1 # layer thickness in layers\n", + "interface_builder_settings.SubstrateParameters.miller_indices = (1, 1, 1) # the Miller indices of the interfacial plane of the substrate\n", + "interface_builder_settings.SubstrateParameters.thickness = 3 # substrate thickness in layers\n", + "interface_builder_settings.LayerParameters.miller_indices = (0, 0, 1) # the Miller indices of the interfacial plane of the layer\n", + "interface_builder_settings.LayerParameters.thickness = 1 # layer thickness in layers\n", "\n", "IS_TERMINATION_SELECTION_INTERACTIVE = False # if True, the user can select the termination interactively\n", "TERMINATION_INDEX = 0 # the default termination index that is used if no termination selected, ignored in interactive mode" @@ -68,7 +68,7 @@ { "cell_type": "markdown", "source": [ - "### 1.2. Set Algorithm Parameters (Optional)\n", + "### 1.2. Set Strain Matching Algorithm Parameters (Optional)\n", "The search algorithm for supercells matching can be tuned by setting its parameters directly, otherwise the default values are used." ], "metadata": { @@ -80,7 +80,7 @@ "outputs": [], "source": [ "from mat3ra.made.tools.build.interface import ZSLParameters\n", - "interface_settings.ZSLParameters = ZSLParameters(\n", + "interface_builder_settings.ZSLParameters = ZSLParameters(\n", " max_area=400, # maximum area of the generated interfaces, in Angstroms^2\n", " max_area_tol=0.09, # maximum tolerance on ratio of super-lattices to consider equal\n", " max_length_tol=0.03, # maximum length tolerance for two vectors to be considered equal\n", @@ -163,7 +163,7 @@ "interface_builder = init_interface_builder(\n", " substrate=materials[0],\n", " layer=materials[1],\n", - " settings=interface_settings\n", + " settings=interface_builder_settings\n", ")" ], "metadata": { @@ -217,7 +217,6 @@ "from mat3ra.made.tools.build import create_interfaces\n", "\n", "interface_data_holder = create_interfaces(\n", - " settings=interface_settings,\n", " sort_by_strain_and_size=True,\n", " remove_duplicates=True,\n", " interface_builder=interface_builder,\n", From d6ecf39d834440cfcca1c5fe516d43b3d1e06f11 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Mon, 13 May 2024 21:56:28 -0700 Subject: [PATCH 11/19] chore: import made from github --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f4be201d..81184c95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,8 +10,10 @@ dependencies = [ "matplotlib>=3.4.1", "pandas>=1.5.3", "pymatgen>=2024.4.13", - "mat3ra-made>=2024.5.9.post0", +# "mat3ra-made>=2024.5.9.post0", + "mat3ra-made@git+ssh://git@github.com/Exabyte-io/made.git@758250a859a236d32b3d1eb4191b2e2944028931", "mat3ra-utils" + ] [project.optional-dependencies] From 4d989adfb31f857543c1db6ee7705531ee594116 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Mon, 13 May 2024 21:59:27 -0700 Subject: [PATCH 12/19] chore: import made from github --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 81184c95..3f32a328 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ dependencies = [ "pandas>=1.5.3", "pymatgen>=2024.4.13", # "mat3ra-made>=2024.5.9.post0", - "mat3ra-made@git+ssh://git@github.com/Exabyte-io/made.git@758250a859a236d32b3d1eb4191b2e2944028931", + "mat3ra-made@git+ssh://git@github.com/Exabyte-io/made.git@c6e70f037a6964600fa1dba4036df184195bacec", "mat3ra-utils" ] From 2079b2b290a223d13a28813ed98692b2c6aa45ed Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Tue, 14 May 2024 12:27:39 -0700 Subject: [PATCH 13/19] chore: import made from github --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3f32a328..d9f1e7f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ dependencies = [ "pandas>=1.5.3", "pymatgen>=2024.4.13", # "mat3ra-made>=2024.5.9.post0", - "mat3ra-made@git+ssh://git@github.com/Exabyte-io/made.git@c6e70f037a6964600fa1dba4036df184195bacec", + "mat3ra-made@git+ssh://git@github.com/Exabyte-io/made.git@d9a11684460e71fbf83580a8fed5225314de259b", "mat3ra-utils" ] From dc2f8333ddbacb98e87d10991e7d6e15729bad18 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 15 May 2024 13:15:09 -0700 Subject: [PATCH 14/19] chore: import made from github --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d9f1e7f3..6c42c8cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,8 +11,8 @@ dependencies = [ "pandas>=1.5.3", "pymatgen>=2024.4.13", # "mat3ra-made>=2024.5.9.post0", - "mat3ra-made@git+ssh://git@github.com/Exabyte-io/made.git@d9a11684460e71fbf83580a8fed5225314de259b", - "mat3ra-utils" + "mat3ra-made@git+ssh://git@github.com/Exabyte-io/made.git@a6a8c2ddb1af631dba77e1d69c86912682a439f5", + "mat3ra-utils>=2024.5.15.post0" ] From 82e9c7a39a7e3ac4c19a369a52bd0d67df9cb715 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 15 May 2024 14:03:13 -0700 Subject: [PATCH 15/19] chore: update imports --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6c42c8cb..f8a3e1ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,10 +10,8 @@ dependencies = [ "matplotlib>=3.4.1", "pandas>=1.5.3", "pymatgen>=2024.4.13", -# "mat3ra-made>=2024.5.9.post0", - "mat3ra-made@git+ssh://git@github.com/Exabyte-io/made.git@a6a8c2ddb1af631dba77e1d69c86912682a439f5", + "mat3ra-made>=2024.5.16.post1", "mat3ra-utils>=2024.5.15.post0" - ] [project.optional-dependencies] From 9062c82884d5bc016cd00c01ca9e976e8eca1962 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 15 May 2024 14:04:51 -0700 Subject: [PATCH 16/19] udpate: we need to move installation atop so mat3ra-made is avalialbe --- ...create_interface_with_min_strain_zsl.ipynb | 83 ++++++++++++------- 1 file changed, 55 insertions(+), 28 deletions(-) diff --git a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb index b5d30318..b4c69e9e 100644 --- a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb +++ b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb @@ -30,13 +30,39 @@ "3. When the strain matching is finished, the interface with the lowest strain (and the smallest number of atoms) is selected. We create the corresponding supercells and place them at a specified distance from each other (note no shift is performed currently).\n" ] }, + { + "cell_type": "markdown", + "source": [ + "## 1. Install Packages\n", + "The step executes only in Pyodide environment. For other environments, the packages should be installed via `pip install` as directed in README." + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "outputs": [], + "source": [ + "import sys\n", + "\n", + "if sys.platform == \"emscripten\":\n", + " import micropip\n", + " await micropip.install('mat3ra-api-examples', deps=False)\n", + " from utils.jupyterlite import install_packages\n", + " await install_packages(\"create_interface_with_min_strain_zsl.ipynb\", \"../../config.yml\")" + ], + "metadata": { + "collapsed": false + } + }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## 1. Set Interface Parameters\n", + "## 2. Set Interface Parameters\n", "\n", - "### 1.1. Set Substrate and Layer Parameters \n", + "### 2.1. Set Substrate and Layer Parameters \n", "Imported `InterfaceSettings` is a class that specifies the parameters for the construction of the interface. The default values are assumed if properties are not set during the initialization.\n", "Additionally, specify if the termination selection is done using interactive prompt, or the via selecting the termination index in the code." ] @@ -68,7 +94,7 @@ { "cell_type": "markdown", "source": [ - "### 1.2. Set Strain Matching Algorithm Parameters (Optional)\n", + "### 2.2. Set Strain Matching Algorithm Parameters (Optional)\n", "The search algorithm for supercells matching can be tuned by setting its parameters directly, otherwise the default values are used." ], "metadata": { @@ -81,7 +107,7 @@ "source": [ "from mat3ra.made.tools.build.interface import ZSLParameters\n", "interface_builder_settings.ZSLParameters = ZSLParameters(\n", - " max_area=400, # maximum area of the generated interfaces, in Angstroms^2\n", + " max_area=50, # maximum area of the generated interfaces, in Angstroms^2\n", " max_area_tol=0.09, # maximum tolerance on ratio of super-lattices to consider equal\n", " max_length_tol=0.03, # maximum length tolerance for two vectors to be considered equal\n", " max_angle_tol=0.01, # maximum angle tolerance for two sets of vectors to have equal angles\n", @@ -92,29 +118,6 @@ }, "execution_count": null }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 2. Install Packages\n", - "The step executes only in Pyodide environment. For other environments, the packages should be installed via `pip install` as directed in README." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import sys\n", - "\n", - "if sys.platform == \"emscripten\":\n", - " import micropip\n", - " await micropip.install('mat3ra-api-examples', deps=False)\n", - " from utils.jupyterlite import install_packages\n", - " await install_packages(\"create_interface_with_min_strain_zsl.ipynb\", \"../../config.yml\")" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -228,6 +231,18 @@ }, "execution_count": null }, + { + "cell_type": "code", + "outputs": [], + "source": [ + "import json\n", + "json.dumps(interface_data_holder.get_interfaces_as_materials(0, 0))" + ], + "metadata": { + "collapsed": false + }, + "execution_count": null + }, { "cell_type": "markdown", "source": [ @@ -347,13 +362,25 @@ "outputs": [], "source": [ "from utils.jupyterlite import set_data\n", + "import json\n", "\n", "for interface in selected_interfaces:\n", " if \"Interface, Strain:\" not in interface[\"name\"]:\n", " interface[\"name\"] = f'{interface[\"name\"]}, Interface, Strain:{interface[\"metadata\"][\"interface_properties\"][\"mean_abs_strain\"]*100:.3f}%'\n", "\n", - "set_data(\"materials\", selected_interfaces)" + "Material(selected_interfaces[0])\n", + "set_data(\"materials\", selected_interfaces)\n", + "print(selected_interfaces[0])" ] + }, + { + "cell_type": "code", + "outputs": [], + "source": [], + "metadata": { + "collapsed": false + }, + "execution_count": null } ], "metadata": { From dd40384e46632bce2901d4427ed656b0fe5f4d27 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 15 May 2024 14:54:36 -0700 Subject: [PATCH 17/19] chore: minor adjustemtns --- ...create_interface_with_min_strain_zsl.ipynb | 31 +++---------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb index b4c69e9e..cfe4e54b 100644 --- a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb +++ b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb @@ -54,7 +54,8 @@ ], "metadata": { "collapsed": false - } + }, + "execution_count": null }, { "cell_type": "markdown", @@ -231,22 +232,10 @@ }, "execution_count": null }, - { - "cell_type": "code", - "outputs": [], - "source": [ - "import json\n", - "json.dumps(interface_data_holder.get_interfaces_as_materials(0, 0))" - ], - "metadata": { - "collapsed": false - }, - "execution_count": null - }, { "cell_type": "markdown", "source": [ - "### 4.3. Print out interface with the lowest strain for selected termination" + "### 4.4. Print out interface with the lowest strain for selected termination" ], "metadata": { "collapsed": false @@ -362,25 +351,13 @@ "outputs": [], "source": [ "from utils.jupyterlite import set_data\n", - "import json\n", "\n", "for interface in selected_interfaces:\n", " if \"Interface, Strain:\" not in interface[\"name\"]:\n", " interface[\"name\"] = f'{interface[\"name\"]}, Interface, Strain:{interface[\"metadata\"][\"interface_properties\"][\"mean_abs_strain\"]*100:.3f}%'\n", "\n", - "Material(selected_interfaces[0])\n", - "set_data(\"materials\", selected_interfaces)\n", - "print(selected_interfaces[0])" + "set_data(\"materials\", selected_interfaces)" ] - }, - { - "cell_type": "code", - "outputs": [], - "source": [], - "metadata": { - "collapsed": false - }, - "execution_count": null } ], "metadata": { From 07361106ca9a8672639b882860100ee79c5f512e Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 15 May 2024 15:09:25 -0700 Subject: [PATCH 18/19] chore: minor adjustemtns --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f8a3e1ce..07722cd9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ dependencies = [ "matplotlib>=3.4.1", "pandas>=1.5.3", "pymatgen>=2024.4.13", - "mat3ra-made>=2024.5.16.post1", + "mat3ra-made>=2024.5.15.post1", "mat3ra-utils>=2024.5.15.post0" ] From 70a25e6820291541d6e66711f5b2025e194314ec Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Wed, 15 May 2024 15:20:40 -0700 Subject: [PATCH 19/19] chore: minor adjustemtns 2 --- .../create_interface_with_min_strain_zsl.ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb index cfe4e54b..4509c883 100644 --- a/other/materials_designer/create_interface_with_min_strain_zsl.ipynb +++ b/other/materials_designer/create_interface_with_min_strain_zsl.ipynb @@ -12,6 +12,7 @@ "\n", "1. Make sure to select Input Materials\n", "2. Set Interface Parameters (e.g. `distance_z`, `max_area`, `miller_indices`) below or use the default values\n", + "3. Additionally, specify whether termination is selected using interactive prompt, or the via the variable in the code.\n", "3. Click \"Run\" > \"Run All Cells\" to run all cells\n", "4. Wait for the run to complete (depending on the area, it can take 1-2 min or more). Scroll down to view cell results.\n", "5. Review the strain plot and modify its parameters as needed\n", @@ -78,7 +79,7 @@ "\n", "# Parameters can be set during the class initialization:\n", "interface_builder_settings = InterfaceSettings(\n", - " distance_z=3.0, # distance between two planes, in Angstroms\n", + " distance_z=3.0, # distance between substrate and layer, in Angstroms\n", " use_conventional_cell=True, # if True, the surface plane is constructed using miller indices of the conventional cell\n", ")\n", "\n",