Skip to content

Commit

Permalink
chore: minor adjustments:
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed May 31, 2024
1 parent b13ff7d commit 5f79848
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"substrate_slab_configuration = SlabConfiguration(\n",
" bulk=substrate,\n",
" # the Miller indices of the interfacial plane of the substrate\n",
" miller_indices=(0,1,1),\n",
" miller_indices=(0,0,1),\n",
" thickness=3,\n",
" vacuum=3,\n",
" xy_supercell_matrix=[[1, 0], [0, 1]],\n",
Expand Down Expand Up @@ -274,33 +274,9 @@
"\n",
"interface_configuration = InterfaceConfiguration(film_slab_configuration, substrate_slab_configuration, film_termination, substrate_termination, distance_z=3.0, vacuum=5.0)\n",
"\n",
"\n",
"matched_interfaces_builder = ZSLStrainMatchingInterfaceBuilder(build_parameters=ZSLStrainMatchingInterfaceBuilderParameters(strain_matching_parameters=zsl_strain_matching_parameters))\n",
"\n",
"interfaces_sorted_by_strain_and_size = matched_interfaces_builder.get_materials(configuration=interface_configuration)\n"
],
"metadata": {
"collapsed": false
},
"execution_count": null
},
{
"cell_type": "markdown",
"source": [
"### 4.4. Print out interface with the lowest strain for selected termination"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"outputs": [],
"source": [
"print(f\"Interface with lowest strain for termination {termination_pair} (index 0):\")\n",
"first_interface = interfaces_sorted_by_strain_and_size[0]\n",
"# print(f\" strain: {first_interface.get_mean_abs_strain() * 100:.3f}%\")\n",
"# print(\" number of atoms:\", first_interface.num_sites)"
"interfaces_sorted_by_strain_and_size = matched_interfaces_builder.get_materials(configuration=interface_configuration)"
],
"metadata": {
"collapsed": false
Expand Down
3 changes: 1 addition & 2 deletions utils/plot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Dict, List, Union

import plotly.graph_objs as go
from express.properties.material import Material
from mat3ra.made.material import Material
from mat3ra.made.tools.build.interface import StrainModes


Expand All @@ -17,7 +17,6 @@ def plot_strain_vs_atoms(interfaces: List[Material], settings: Dict[str, Union[s
data = []
for index, interface in enumerate(interfaces):
strain_percentage = interface.metadata[StrainModes.mean_abs_strain] * 100
print(interface.basis["coordinates"])
num_sites = len(interface.basis["coordinates"])

hover_text = f"Index: {index}<br>Strain: {strain_percentage:.2f}%<br>Atoms: {num_sites}"
Expand Down

0 comments on commit 5f79848

Please sign in to comment.