Skip to content

Commit

Permalink
Merge pull request #127 from Exabyte-io/feature/SOF-7372
Browse files Browse the repository at this point in the history
feature/SOF-7372 update: use generalized interfaces builder
  • Loading branch information
VsevolodX authored Jun 3, 2024
2 parents 05a95b0 + 9d5a826 commit c3104fd
Show file tree
Hide file tree
Showing 5 changed files with 421 additions and 26 deletions.
4 changes: 4 additions & 0 deletions other/materials_designer/Introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
"\n",
"This notebook lets user create an interface between two materials and then relax it using the EMT potential. Interface creation is done in the same way as in the previous example, employing ZSL algorithm. [Click here to open the notebook](create_interface_with_relaxation_ase_emt.ipynb).\n",
"\n",
"#### [1.3. Interface creation with specified supercell matrix](create_interface_with_no_strain_matching.ipynb)\n",
"\n",
"This notebook lets user create an interface between two materials by specifying the supercell matrix, with ability to strain film to fit the substrate. [Click here to open the notebook](create_interface_with_no_strain_matching.ipynb).\n",
"\n",
"### 2. Data Import\n",
"\n",
"#### [2.1. Materials import from files in ASE-supported formats](import_materials_from_files.ipynb)\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"## 2. Set Interface Parameters\n",
"\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",
"Imported `InterfaceBuilderSettings` is a class that specifies the parameters for the builder that generates interfaces. 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."
]
},
Expand All @@ -75,10 +75,10 @@
"metadata": {},
"outputs": [],
"source": [
"from mat3ra.made.tools.build.interface import InterfaceSettings\n",
"from mat3ra.made.tools.build.interface import InterfaceBuilderSettings\n",
"\n",
"# Parameters can be set during the class initialization:\n",
"interface_builder_settings = InterfaceSettings(\n",
"interface_builder_settings = InterfaceBuilderSettings(\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",
Expand Down Expand Up @@ -107,12 +107,13 @@
"cell_type": "code",
"outputs": [],
"source": [
"from mat3ra.made.tools.build.interface import ZSLParameters\n",
"interface_builder_settings.ZSLParameters = ZSLParameters(\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",
"from mat3ra.made.tools.build.interface import StrainMatchingParameters\n",
"interface_builder_settings.StrainMatchingParameters = StrainMatchingParameters(\n",
" algorithm=\"ZSL\", # the algorithm to use for strain matching, currently only \"zsl\" is supported\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",
")"
],
"metadata": {
Expand Down Expand Up @@ -359,6 +360,15 @@
"\n",
"set_data(\"materials\", selected_interfaces)"
]
},
{
"cell_type": "code",
"outputs": [],
"source": [],
"metadata": {
"collapsed": false
},
"execution_count": null
}
],
"metadata": {
Expand Down
Loading

0 comments on commit c3104fd

Please sign in to comment.