@mat3ra/made 2026.8.7-0 → 2026.8.18-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/js/Material.d.ts +219 -0
- package/dist/js/Material.js +457 -0
- package/dist/js/basis/basis.d.ts +14 -9
- package/dist/js/basis/basis.js +15 -13
- package/dist/js/basis/constrained_basis.d.ts +9 -7
- package/dist/js/basis/constrained_basis.js +4 -4
- package/dist/js/generated/MaterialSchemaMixin.d.ts +5 -0
- package/dist/js/generated/MaterialSchemaMixin.js +69 -0
- package/dist/js/lattice/lattice.d.ts +4 -3
- package/dist/js/lattice/lattice.js +1 -2
- package/dist/js/made.d.ts +12 -12
- package/dist/js/made.js +38 -5
- package/dist/js/parsers/espresso.d.ts +2 -3
- package/dist/js/parsers/espresso.js +0 -1
- package/dist/js/parsers/native_format_parsers.d.ts +9 -8
- package/dist/js/parsers/native_format_parsers.js +6 -6
- package/dist/js/parsers/parsers.d.ts +6 -6
- package/dist/js/parsers/poscar.d.ts +5 -4
- package/dist/js/parsers/poscar.js +3 -2
- package/dist/js/parsers/xyz.d.ts +3 -5
- package/dist/js/parsers/xyz.js +3 -4
- package/dist/js/parsers/xyz_combinatorial_basis.js +3 -1
- package/dist/js/tools/basis.d.ts +1 -1
- package/dist/js/tools/index.d.ts +7 -7
- package/dist/js/tools/material.d.ts +1 -1
- package/dist/js/tools/material.js +8 -7
- package/dist/js/tools/supercell.d.ts +4 -5
- package/dist/js/tools/supercell.js +2 -4
- package/dist/js/tools/surface.d.ts +4 -4
- package/dist/js/tools/surface.js +2 -7
- package/package.json +12 -8
- package/.babelrc +0 -10
- package/.eslintrc.json +0 -11
- package/.gitattributes +0 -1
- package/.husky/post-checkout +0 -3
- package/.husky/post-commit +0 -3
- package/.husky/post-merge +0 -3
- package/.husky/pre-commit +0 -6
- package/.husky/pre-push +0 -3
- package/.mocharc.json +0 -5
- package/.pre-commit-config.yaml +0 -26
- package/.prettierignore +0 -2
- package/.prettierrc +0 -6
- package/AGENTS.md +0 -133
- package/MANIFEST.in +0 -1
- package/data/constants.json +0 -13
- package/data/reciprocal_paths.json +0 -111
- package/dist/js/material.d.ts +0 -169
- package/dist/js/material.js +0 -362
- package/images/made/tools/tools_diagram_general.png +0 -3
- package/images/made/tools/tools_diagram_interface.png +0 -3
- package/pyproject.toml +0 -123
- package/src/__init__.py +0 -0
- package/src/js/basis/basis.ts +0 -621
- package/src/js/basis/constrained_basis.ts +0 -114
- package/src/js/basis/coordinates.ts +0 -93
- package/src/js/basis/elements.ts +0 -24
- package/src/js/basis/helpers.ts +0 -20
- package/src/js/basis/labels.ts +0 -6
- package/src/js/cell/cell.ts +0 -150
- package/src/js/cell/conventional_cell.ts +0 -86
- package/src/js/cell/primitive_cell.ts +0 -166
- package/src/js/constants/molecule.ts +0 -18
- package/src/js/constants.ts +0 -4
- package/src/js/constraints/constraints.ts +0 -45
- package/src/js/lattice/lattice.ts +0 -306
- package/src/js/lattice/lattice_types.ts +0 -134
- package/src/js/lattice/reciprocal/lattice_reciprocal.ts +0 -193
- package/src/js/lattice/reciprocal/paths.ts +0 -39
- package/src/js/lattice/reciprocal/symmetry_points.ts +0 -886
- package/src/js/lattice/unit_cell.ts +0 -66
- package/src/js/made.ts +0 -62
- package/src/js/material.ts +0 -458
- package/src/js/parsers/cif.ts +0 -25
- package/src/js/parsers/errors.ts +0 -6
- package/src/js/parsers/espresso.ts +0 -30
- package/src/js/parsers/native_format_parsers.ts +0 -51
- package/src/js/parsers/parsers.ts +0 -13
- package/src/js/parsers/poscar.ts +0 -212
- package/src/js/parsers/xyz.ts +0 -187
- package/src/js/parsers/xyz_combinatorial_basis.ts +0 -265
- package/src/js/tools/basis.ts +0 -132
- package/src/js/tools/cell.ts +0 -41
- package/src/js/tools/index.ts +0 -11
- package/src/js/tools/material.ts +0 -62
- package/src/js/tools/supercell.ts +0 -88
- package/src/js/tools/surface.ts +0 -223
- package/src/py/__init__.py +0 -0
- package/src/py/mat3ra/__init__.py +0 -1
- package/src/py/mat3ra/made/__init__.py +0 -7
- package/src/py/mat3ra/made/basis/__init__.py +0 -255
- package/src/py/mat3ra/made/basis/coordinates.py +0 -43
- package/src/py/mat3ra/made/cell/__init__.py +0 -55
- package/src/py/mat3ra/made/cell/primitive_cell.py +0 -156
- package/src/py/mat3ra/made/data_helper.py +0 -5
- package/src/py/mat3ra/made/lattice.py +0 -195
- package/src/py/mat3ra/made/material.py +0 -134
- package/src/py/mat3ra/made/metadata.py +0 -45
- package/src/py/mat3ra/made/reciprocal/__init__.py +0 -5
- package/src/py/mat3ra/made/reciprocal/lattice_reciprocal.py +0 -147
- package/src/py/mat3ra/made/reciprocal/paths.py +0 -30
- package/src/py/mat3ra/made/reciprocal/symmetry_points.py +0 -385
- package/src/py/mat3ra/made/tools/README.md +0 -173
- package/src/py/mat3ra/made/tools/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/analyze/__init__.py +0 -31
- package/src/py/mat3ra/made/tools/analyze/basis/__init__.py +0 -3
- package/src/py/mat3ra/made/tools/analyze/basis/analyzer.py +0 -50
- package/src/py/mat3ra/made/tools/analyze/build_metadata_analyzer.py +0 -32
- package/src/py/mat3ra/made/tools/analyze/build_metadata_analyzer_factory.py +0 -31
- package/src/py/mat3ra/made/tools/analyze/coordination.py +0 -56
- package/src/py/mat3ra/made/tools/analyze/crystal_site/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/analyze/crystal_site/adatom_crystal_site_material_analyzer.py +0 -35
- package/src/py/mat3ra/made/tools/analyze/crystal_site/adatom_material_analyzer.py +0 -49
- package/src/py/mat3ra/made/tools/analyze/crystal_site/crystal_site_analyzer.py +0 -65
- package/src/py/mat3ra/made/tools/analyze/crystal_site/voronoi_crystal_site_analyzer.py +0 -47
- package/src/py/mat3ra/made/tools/analyze/enums.py +0 -33
- package/src/py/mat3ra/made/tools/analyze/fingerprint/__init__.py +0 -4
- package/src/py/mat3ra/made/tools/analyze/fingerprint/layers/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/analyze/fingerprint/layers/layered_fingerprint_along_axis.py +0 -83
- package/src/py/mat3ra/made/tools/analyze/fingerprint/layers/unique_element_string_per_layer.py +0 -9
- package/src/py/mat3ra/made/tools/analyze/interface/__init__.py +0 -20
- package/src/py/mat3ra/made/tools/analyze/interface/commensurate.py +0 -156
- package/src/py/mat3ra/made/tools/analyze/interface/enums.py +0 -60
- package/src/py/mat3ra/made/tools/analyze/interface/grain_boundary.py +0 -80
- package/src/py/mat3ra/made/tools/analyze/interface/simple.py +0 -251
- package/src/py/mat3ra/made/tools/analyze/interface/twisted_nanoribbons.py +0 -91
- package/src/py/mat3ra/made/tools/analyze/interface/utils/__init__.py +0 -77
- package/src/py/mat3ra/made/tools/analyze/interface/utils/holders.py +0 -14
- package/src/py/mat3ra/made/tools/analyze/interface/utils/vector.py +0 -56
- package/src/py/mat3ra/made/tools/analyze/interface/zsl.py +0 -259
- package/src/py/mat3ra/made/tools/analyze/interface_material.py +0 -45
- package/src/py/mat3ra/made/tools/analyze/lattice/__init__.py +0 -2
- package/src/py/mat3ra/made/tools/analyze/lattice/analyzer.py +0 -126
- package/src/py/mat3ra/made/tools/analyze/lattice/helpers.py +0 -31
- package/src/py/mat3ra/made/tools/analyze/lattice_lines.py +0 -30
- package/src/py/mat3ra/made/tools/analyze/lattice_planes.py +0 -192
- package/src/py/mat3ra/made/tools/analyze/lattice_swap_analyzer.py +0 -105
- package/src/py/mat3ra/made/tools/analyze/material.py +0 -276
- package/src/py/mat3ra/made/tools/analyze/other.py +0 -434
- package/src/py/mat3ra/made/tools/analyze/rdf.py +0 -74
- package/src/py/mat3ra/made/tools/analyze/slab.py +0 -76
- package/src/py/mat3ra/made/tools/analyze/solid_solution_analyzer.py +0 -171
- package/src/py/mat3ra/made/tools/analyze/terrace.py +0 -105
- package/src/py/mat3ra/made/tools/analyze/utils.py +0 -162
- package/src/py/mat3ra/made/tools/bond_directions/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/bond_directions/bond_directions.py +0 -150
- package/src/py/mat3ra/made/tools/bond_directions/bond_directions_for_element_list.py +0 -7
- package/src/py/mat3ra/made/tools/bond_directions/bond_directions_templates_enum.py +0 -8
- package/src/py/mat3ra/made/tools/bond_directions/bond_directions_templates_for_element.py +0 -16
- package/src/py/mat3ra/made/tools/build/__init__.py +0 -25
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/heterostructure/__init__.py +0 -7
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/heterostructure/helpers.py +0 -59
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/heterostructure/types.py +0 -26
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/heterostructure/utils.py +0 -139
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/__init__.py +0 -47
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/base/__init__.py +0 -11
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/base/build_parameters.py +0 -5
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/base/builder.py +0 -164
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/base/configuration.py +0 -48
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/base/helpers.py +0 -134
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/commensurate/__init__.py +0 -6
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/commensurate/helpers.py +0 -157
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/enums.py +0 -7
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/twisted/__init__.py +0 -7
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/twisted/configuration.py +0 -13
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/twisted/helpers.py +0 -70
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/utils.py +0 -87
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/zsl/__init__.py +0 -6
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/interface/zsl/helpers.py +0 -129
- package/src/py/mat3ra/made/tools/build/defective_structures/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/defective_structures/one_dimensional/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/defective_structures/one_dimensional/grain_boundary_linear/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/defective_structures/one_dimensional/grain_boundary_linear/build_parameters.py +0 -12
- package/src/py/mat3ra/made/tools/build/defective_structures/one_dimensional/grain_boundary_linear/builder.py +0 -17
- package/src/py/mat3ra/made/tools/build/defective_structures/one_dimensional/grain_boundary_linear/configuration.py +0 -40
- package/src/py/mat3ra/made/tools/build/defective_structures/one_dimensional/grain_boundary_linear/helpers.py +0 -82
- package/src/py/mat3ra/made/tools/build/defective_structures/three_dimensional/__init__.py +0 -1
- package/src/py/mat3ra/made/tools/build/defective_structures/three_dimensional/solid_solution/__init__.py +0 -9
- package/src/py/mat3ra/made/tools/build/defective_structures/three_dimensional/solid_solution/builder.py +0 -37
- package/src/py/mat3ra/made/tools/build/defective_structures/three_dimensional/solid_solution/configuration.py +0 -30
- package/src/py/mat3ra/made/tools/build/defective_structures/three_dimensional/solid_solution/enums.py +0 -8
- package/src/py/mat3ra/made/tools/build/defective_structures/three_dimensional/solid_solution/helpers.py +0 -76
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/adatom/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/adatom/builder.py +0 -11
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/adatom/configuration.py +0 -18
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/adatom/helpers.py +0 -137
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/adatom/types.py +0 -22
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/grain_boundary_planar/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/grain_boundary_planar/builder.py +0 -28
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/grain_boundary_planar/configuration.py +0 -55
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/grain_boundary_planar/helpers.py +0 -75
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/island/builder.py +0 -15
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/island/configuration.py +0 -16
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/island/helpers.py +0 -116
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/terrace/build_parameters.py +0 -10
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/terrace/builder.py +0 -30
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/terrace/configuration.py +0 -11
- package/src/py/mat3ra/made/tools/build/defective_structures/two_dimensional/terrace/helpers.py +0 -78
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/pair_defect/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/pair_defect/builder.py +0 -31
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/pair_defect/configuration.py +0 -45
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/pair_defect/helpers.py +0 -80
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/__init__.py +0 -40
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/atom_placement_method_enum.py +0 -14
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/base/__init__.py +0 -7
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/base/builder.py +0 -42
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/base/configuration.py +0 -27
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/complex_defect_type_enum.py +0 -5
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/factories.py +0 -69
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/helpers.py +0 -92
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/interstitial/__init__.py +0 -7
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/interstitial/builder.py +0 -8
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/interstitial/configuration.py +0 -29
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/interstitial/helpers.py +0 -48
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/interstitial/interstitial_placement_method_enum.py +0 -8
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/point_defect_type_enum.py +0 -8
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/substitutional/__init__.py +0 -7
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/substitutional/builder.py +0 -6
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/substitutional/configuration.py +0 -41
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/substitutional/helpers.py +0 -43
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/substitutional/substitution_placement_method_enum.py +0 -7
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/types.py +0 -24
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/vacancy/__init__.py +0 -7
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/vacancy/builder.py +0 -19
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/vacancy/configuration.py +0 -27
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/vacancy/helpers.py +0 -42
- package/src/py/mat3ra/made/tools/build/defective_structures/zero_dimensional/point_defect/vacancy/vacancy_placement_method_enum.py +0 -7
- package/src/py/mat3ra/made/tools/build/pristine_structures/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/pristine_structures/three_dimensional/ideal_crystal/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/pristine_structures/three_dimensional/ideal_crystal/builder.py +0 -80
- package/src/py/mat3ra/made/tools/build/pristine_structures/three_dimensional/ideal_crystal/configurations.py +0 -22
- package/src/py/mat3ra/made/tools/build/pristine_structures/three_dimensional/ideal_crystal/helpers.py +0 -40
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/nanoribbon/__init__.py +0 -29
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/nanoribbon/build_parameters.py +0 -5
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/nanoribbon/builders.py +0 -56
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/nanoribbon/configuration.py +0 -33
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/nanoribbon/helpers.py +0 -76
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/nanotape/__init__.py +0 -11
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/nanotape/build_parameters.py +0 -9
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/nanotape/builders.py +0 -83
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/nanotape/configuration.py +0 -35
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/nanotape/helpers.py +0 -62
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/slab/__init__.py +0 -9
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/slab/build_parameters.py +0 -8
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/slab/builder.py +0 -42
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/slab/configuration.py +0 -99
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/slab/helpers.py +0 -95
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/slab/termination_utils.py +0 -14
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/slab/utils.py +0 -61
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/slab_strained_supercell/builder.py +0 -22
- package/src/py/mat3ra/made/tools/build/pristine_structures/two_dimensional/slab_strained_supercell/configuration.py +0 -17
- package/src/py/mat3ra/made/tools/build/pristine_structures/zero_dimensional/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/pristine_structures/zero_dimensional/nanoparticle/__init__.py +0 -19
- package/src/py/mat3ra/made/tools/build/pristine_structures/zero_dimensional/nanoparticle/analyzer.py +0 -86
- package/src/py/mat3ra/made/tools/build/pristine_structures/zero_dimensional/nanoparticle/ase_based/__init__.py +0 -7
- package/src/py/mat3ra/made/tools/build/pristine_structures/zero_dimensional/nanoparticle/ase_based/builder.py +0 -54
- package/src/py/mat3ra/made/tools/build/pristine_structures/zero_dimensional/nanoparticle/ase_based/configuration.py +0 -19
- package/src/py/mat3ra/made/tools/build/pristine_structures/zero_dimensional/nanoparticle/enums.py +0 -42
- package/src/py/mat3ra/made/tools/build/pristine_structures/zero_dimensional/nanoparticle/helpers.py +0 -127
- package/src/py/mat3ra/made/tools/build/pristine_structures/zero_dimensional/nanoparticle/merge_based/__init__.py +0 -7
- package/src/py/mat3ra/made/tools/build/pristine_structures/zero_dimensional/nanoparticle/merge_based/builder.py +0 -33
- package/src/py/mat3ra/made/tools/build/pristine_structures/zero_dimensional/nanoparticle/merge_based/configuration.py +0 -16
- package/src/py/mat3ra/made/tools/build/processed_structures/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/processed_structures/two_dimensional/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/processed_structures/two_dimensional/passivation/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build/processed_structures/two_dimensional/passivation/analyzers/__init__.py +0 -9
- package/src/py/mat3ra/made/tools/build/processed_structures/two_dimensional/passivation/analyzers/coordination_based_passivation_material_analyzer.py +0 -112
- package/src/py/mat3ra/made/tools/build/processed_structures/two_dimensional/passivation/analyzers/passivation_material_analyzer.py +0 -16
- package/src/py/mat3ra/made/tools/build/processed_structures/two_dimensional/passivation/analyzers/surface_passivation_material_analyzer.py +0 -32
- package/src/py/mat3ra/made/tools/build/processed_structures/two_dimensional/passivation/builder.py +0 -23
- package/src/py/mat3ra/made/tools/build/processed_structures/two_dimensional/passivation/configuration.py +0 -31
- package/src/py/mat3ra/made/tools/build/processed_structures/two_dimensional/passivation/enums.py +0 -7
- package/src/py/mat3ra/made/tools/build/processed_structures/two_dimensional/passivation/helpers.py +0 -151
- package/src/py/mat3ra/made/tools/build_components/__init__.py +0 -10
- package/src/py/mat3ra/made/tools/build_components/entities/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build_components/entities/auxiliary/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build_components/entities/auxiliary/one_dimensional/miller_indices_2d.py +0 -0
- package/src/py/mat3ra/made/tools/build_components/entities/auxiliary/two_dimensional/miller_indices.py +0 -18
- package/src/py/mat3ra/made/tools/build_components/entities/auxiliary/two_dimensional/termination.py +0 -33
- package/src/py/mat3ra/made/tools/build_components/entities/auxiliary/zero_dimensional/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build_components/entities/auxiliary/zero_dimensional/crystal_site/__init__.py +0 -2
- package/src/py/mat3ra/made/tools/build_components/entities/auxiliary/zero_dimensional/crystal_site/crystal_site.py +0 -24
- package/src/py/mat3ra/made/tools/build_components/entities/auxiliary/zero_dimensional/crystal_site/crystal_site_list.py +0 -9
- package/src/py/mat3ra/made/tools/build_components/entities/auxiliary/zero_dimensional/point_defect_site/builder.py +0 -32
- package/src/py/mat3ra/made/tools/build_components/entities/auxiliary/zero_dimensional/point_defect_site/configuration.py +0 -14
- package/src/py/mat3ra/made/tools/build_components/entities/auxiliary/zero_dimensional/void_region/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build_components/entities/auxiliary/zero_dimensional/void_region/builder.py +0 -29
- package/src/py/mat3ra/made/tools/build_components/entities/auxiliary/zero_dimensional/void_region/configuration.py +0 -19
- package/src/py/mat3ra/made/tools/build_components/entities/core/two_dimensional/vacuum/builder.py +0 -48
- package/src/py/mat3ra/made/tools/build_components/entities/core/two_dimensional/vacuum/configuration.py +0 -17
- package/src/py/mat3ra/made/tools/build_components/entities/core/zero_dimensional/atom/builder.py +0 -25
- package/src/py/mat3ra/made/tools/build_components/entities/core/zero_dimensional/atom/configuration.py +0 -8
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/base_builder/__init__.py +0 -16
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/base_builder/base_configuration_pydantic.py +0 -5
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/base_builder/base_single_builder.py +0 -87
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/base_builder/build_parameters.py +0 -5
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/one_dimensional/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/one_dimensional/crystal_lattice_lines/__init__.py +0 -4
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/one_dimensional/crystal_lattice_lines/builder.py +0 -46
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/one_dimensional/crystal_lattice_lines/configuration.py +0 -19
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/one_dimensional/crystal_lattice_lines/edge_types.py +0 -51
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/one_dimensional/crystal_lattice_lines/helpers.py +0 -58
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/one_dimensional/crystal_lattice_lines_unique_repeated/__init__.py +0 -4
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/one_dimensional/crystal_lattice_lines_unique_repeated/builder.py +0 -42
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/one_dimensional/crystal_lattice_lines_unique_repeated/configuration.py +0 -21
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/three_dimensional/supercell/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/three_dimensional/supercell/configuration.py +0 -11
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/three_dimensional/supercell/helpers.py +0 -38
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/two_dimensional/__init__.py +0 -24
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/two_dimensional/atomic_layers_unique_repeated/__init__.py +0 -7
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/two_dimensional/atomic_layers_unique_repeated/builder.py +0 -62
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/two_dimensional/atomic_layers_unique_repeated/configuration.py +0 -14
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/two_dimensional/atomic_layers_unique_repeated/helpers.py +0 -42
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/two_dimensional/crystal_lattice_planes/__init__.py +0 -7
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/two_dimensional/crystal_lattice_planes/builder.py +0 -39
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/two_dimensional/crystal_lattice_planes/configuration.py +0 -24
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/two_dimensional/slab_stack/__init__.py +0 -10
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/two_dimensional/slab_stack/builder.py +0 -36
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/two_dimensional/slab_stack/configuration.py +0 -31
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/two_dimensional/slab_stack/helpers.py +0 -80
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/zero_dimensional/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build_components/entities/reusable/zero_dimensional/coordinates_shape_enum.py +0 -8
- package/src/py/mat3ra/made/tools/build_components/metadata/__init__.py +0 -2
- package/src/py/mat3ra/made/tools/build_components/metadata/build_metadata.py +0 -7
- package/src/py/mat3ra/made/tools/build_components/metadata/material_build_metadata.py +0 -35
- package/src/py/mat3ra/made/tools/build_components/metadata/material_with_build_metadata.py +0 -8
- package/src/py/mat3ra/made/tools/build_components/mixins/__init__.py +0 -2
- package/src/py/mat3ra/made/tools/build_components/mixins/convert_generated_items_ase_atoms_mixin.py +0 -8
- package/src/py/mat3ra/made/tools/build_components/mixins/convert_generated_items_pymatgen_structure_mixin.py +0 -8
- package/src/py/mat3ra/made/tools/build_components/operations/core/combinations/__init__.py +0 -0
- package/src/py/mat3ra/made/tools/build_components/operations/core/combinations/enums.py +0 -11
- package/src/py/mat3ra/made/tools/build_components/operations/core/combinations/merge/__init__.py +0 -6
- package/src/py/mat3ra/made/tools/build_components/operations/core/combinations/merge/build_parameters.py +0 -18
- package/src/py/mat3ra/made/tools/build_components/operations/core/combinations/merge/builder.py +0 -93
- package/src/py/mat3ra/made/tools/build_components/operations/core/combinations/merge/configuration.py +0 -20
- package/src/py/mat3ra/made/tools/build_components/operations/core/combinations/stack/builder.py +0 -83
- package/src/py/mat3ra/made/tools/build_components/operations/core/combinations/stack/configuration.py +0 -24
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/perturb/__init__.py +0 -15
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/perturb/build_parameters.py +0 -5
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/perturb/builders/base.py +0 -33
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/perturb/builders/isometric.py +0 -25
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/perturb/configuration.py +0 -24
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/perturb/functions/__init__.py +0 -13
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/perturb/functions/atomic_mass_dependent_function_holder.py +0 -32
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/perturb/functions/function_holder.py +0 -80
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/perturb/functions/maxwell_boltzmann.py +0 -39
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/perturb/functions/perturbation_function_holder.py +0 -45
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/perturb/functions/sine_wave_perturbation_function_holder.py +0 -29
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/perturb/helpers.py +0 -83
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/strain/__init__.py +0 -5
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/strain/builder.py +0 -25
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/strain/configuration.py +0 -23
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/strain/helpers.py +0 -49
- package/src/py/mat3ra/made/tools/build_components/utils.py +0 -44
- package/src/py/mat3ra/made/tools/calculate/__init__.py +0 -149
- package/src/py/mat3ra/made/tools/calculate/ase/__init__.py +0 -133
- package/src/py/mat3ra/made/tools/calculate/ase/constraints.py +0 -91
- package/src/py/mat3ra/made/tools/calculate/calculators/__init__.py +0 -4
- package/src/py/mat3ra/made/tools/calculate/calculators/interface_material_calculator.py +0 -70
- package/src/py/mat3ra/made/tools/calculate/calculators/interface_material_calculator_parameters.py +0 -14
- package/src/py/mat3ra/made/tools/calculate/calculators/material_calculator.py +0 -32
- package/src/py/mat3ra/made/tools/calculate/calculators/material_calculator_parameters.py +0 -17
- package/src/py/mat3ra/made/tools/calculate/interaction_functions.py +0 -23
- package/src/py/mat3ra/made/tools/convert/__init__.py +0 -286
- package/src/py/mat3ra/made/tools/convert/interface_parts_enum.py +0 -9
- package/src/py/mat3ra/made/tools/convert/utils.py +0 -96
- package/src/py/mat3ra/made/tools/entities/__init__.py +0 -5
- package/src/py/mat3ra/made/tools/entities/coordinate/__init__.py +0 -14
- package/src/py/mat3ra/made/tools/entities/coordinate/box_coordinate_condition.py +0 -15
- package/src/py/mat3ra/made/tools/entities/coordinate/coordinate_condition.py +0 -16
- package/src/py/mat3ra/made/tools/entities/coordinate/coordinate_functions.py +0 -158
- package/src/py/mat3ra/made/tools/entities/coordinate/cylinder_coordinate_condition.py +0 -17
- package/src/py/mat3ra/made/tools/entities/coordinate/plane_coordinate_condition.py +0 -14
- package/src/py/mat3ra/made/tools/entities/coordinate/sphere_coordinate_condition.py +0 -15
- package/src/py/mat3ra/made/tools/entities/coordinate/triangular_prism_coordinate_condition.py +0 -26
- package/src/py/mat3ra/made/tools/entities/termination_holder.py +0 -12
- package/src/py/mat3ra/made/tools/helpers.py +0 -168
- package/src/py/mat3ra/made/tools/modify.py +0 -627
- package/src/py/mat3ra/made/tools/operations/core/binary.py +0 -106
- package/src/py/mat3ra/made/tools/operations/core/unary.py +0 -170
- package/src/py/mat3ra/made/tools/operations/core/utils.py +0 -138
- package/src/py/mat3ra/made/tools/operations/reusable/unary.py +0 -53
- package/src/py/mat3ra/made/tools/optimize.py +0 -55
- package/src/py/mat3ra/made/tools/third_party.py +0 -69
- package/src/py/mat3ra/made/tools/utils.py +0 -182
- package/src/py/mat3ra/made/utils.py +0 -144
- package/tests/.gitattributes +0 -1
- package/tests/fixtures/AsGe-basis.json +0 -3
- package/tests/fixtures/C2H4-translated.json +0 -3
- package/tests/fixtures/C2H4.json +0 -3
- package/tests/fixtures/FeLiSi-basis.json +0 -3
- package/tests/fixtures/FeO.json +0 -3
- package/tests/fixtures/Ge2-basis.json +0 -3
- package/tests/fixtures/Graphene.json +0 -3
- package/tests/fixtures/Graphene.poscar +0 -3
- package/tests/fixtures/H2+H-final.json +0 -3
- package/tests/fixtures/H2+H-image.json +0 -3
- package/tests/fixtures/H2+H-initial.json +0 -3
- package/tests/fixtures/H2O.poscar +0 -3
- package/tests/fixtures/LiFeSi-basis-labels.json +0 -3
- package/tests/fixtures/LiFeSi-basis.json +0 -3
- package/tests/fixtures/Na.json +0 -3
- package/tests/fixtures/Na4Cl4-cartesian.json +0 -3
- package/tests/fixtures/Na4Cl4.json +0 -3
- package/tests/fixtures/Na4Cl4.poscar +0 -3
- package/tests/fixtures/Ni-hex.json +0 -3
- package/tests/fixtures/Ni-hex.poscar +0 -3
- package/tests/fixtures/OSi-basis.json +0 -3
- package/tests/fixtures/Si-hex.poscar +0 -3
- package/tests/fixtures/Si-pwscf.in +0 -3
- package/tests/fixtures/Si-slab.json +0 -3
- package/tests/fixtures/Si-supercell.json +0 -3
- package/tests/fixtures/Si2-basis-repeated.json +0 -3
- package/tests/fixtures/Si2-basis.json +0 -3
- package/tests/fixtures/Zr1H23Zr1H1.json +0 -3
- package/tests/fixtures/Zr1H23Zr1H1.poscar +0 -3
- package/tests/fixtures/atomic-constraints.json +0 -3
- package/tests/fixtures/hashes.json +0 -3
- package/tests/fixtures/si-slab-100.json +0 -3
- package/tests/fixtures/si-slab-111-0-vacuum.json +0 -3
- package/tests/fixtures/si-slab-111-0.5-vacuum-gamma-120.json +0 -3
- package/tests/fixtures/si-slab-111-0.5-vacuum-ratio.json +0 -3
- package/tests/fixtures/si-standata.json +0 -3
- package/tests/js/basis/basis.ts +0 -247
- package/tests/js/cell/cell.ts +0 -182
- package/tests/js/cell/primitive_cell.ts +0 -21
- package/tests/js/constraints/constraints.ts +0 -11
- package/tests/js/fixtures.ts +0 -120
- package/tests/js/lattice/lattice.ts +0 -43
- package/tests/js/lattice/lattice_reciprocal.ts +0 -104
- package/tests/js/material.test.ts +0 -42
- package/tests/js/parsers/espresso.ts +0 -15
- package/tests/js/parsers/native_formats.ts +0 -35
- package/tests/js/parsers/poscar.ts +0 -89
- package/tests/js/parsers/xyz.ts +0 -33
- package/tests/js/parsers/xyz_combinatorial_basis.ts +0 -156
- package/tests/js/setup.ts +0 -6
- package/tests/js/tools/basis.ts +0 -22
- package/tests/js/tools/supercell.ts +0 -58
- package/tests/js/tools/surface.ts +0 -115
- package/tests/py/conftest.py +0 -34
- package/tests/py/mat3ra/debug_utils.py +0 -75
- package/tests/py/unit/__init__.py +0 -0
- package/tests/py/unit/fixtures/__init__.py +0 -0
- package/tests/py/unit/fixtures/adatom.py +0 -60
- package/tests/py/unit/fixtures/bulk.py +0 -162
- package/tests/py/unit/fixtures/cuts.py +0 -118
- package/tests/py/unit/fixtures/grain_boundary.py +0 -875
- package/tests/py/unit/fixtures/interface/commensurate.py +0 -498
- package/tests/py/unit/fixtures/interface/gaas_dia.py +0 -837
- package/tests/py/unit/fixtures/interface/gr_ni_111_top_hcp.py +0 -123
- package/tests/py/unit/fixtures/interface/simple.py +0 -84
- package/tests/py/unit/fixtures/interface/twisted_nanoribbons.py +0 -131
- package/tests/py/unit/fixtures/interface/zsl.py +0 -756
- package/tests/py/unit/fixtures/island.py +0 -336
- package/tests/py/unit/fixtures/merge.py +0 -147
- package/tests/py/unit/fixtures/monolayer.py +0 -46
- package/tests/py/unit/fixtures/nanoparticle.py +0 -116
- package/tests/py/unit/fixtures/nanoribbon/__init__.py +0 -0
- package/tests/py/unit/fixtures/nanoribbon/armchair.py +0 -102
- package/tests/py/unit/fixtures/nanoribbon/nanoribbon.py +0 -145
- package/tests/py/unit/fixtures/nanoribbon/zigzag.py +0 -54
- package/tests/py/unit/fixtures/pair_defects.py +0 -41
- package/tests/py/unit/fixtures/passivated/nanoribbon.py +0 -69
- package/tests/py/unit/fixtures/passivated/slab.py +0 -58
- package/tests/py/unit/fixtures/point_defects.py +0 -158
- package/tests/py/unit/fixtures/slab.py +0 -606
- package/tests/py/unit/fixtures/strain.py +0 -42
- package/tests/py/unit/fixtures/supercell.py +0 -64
- package/tests/py/unit/fixtures/terrace.py +0 -70
- package/tests/py/unit/fixtures/thrid_party/ase_atoms.py +0 -13
- package/tests/py/unit/test_analyze_lattice_planes.py +0 -131
- package/tests/py/unit/test_cell.py +0 -104
- package/tests/py/unit/test_data_files.py +0 -68
- package/tests/py/unit/test_lattice.py +0 -103
- package/tests/py/unit/test_lattice_type_extended.py +0 -53
- package/tests/py/unit/test_material.py +0 -158
- package/tests/py/unit/test_operations.py +0 -126
- package/tests/py/unit/test_primitive_cell.py +0 -118
- package/tests/py/unit/test_reciprocal_lattice.py +0 -86
- package/tests/py/unit/test_reciprocal_paths.py +0 -64
- package/tests/py/unit/test_symmetry_points.py +0 -151
- package/tests/py/unit/test_tools_analyze.py +0 -219
- package/tests/py/unit/test_tools_analyze_basis.py +0 -105
- package/tests/py/unit/test_tools_analyze_interface.py +0 -223
- package/tests/py/unit/test_tools_analyze_interface_material.py +0 -63
- package/tests/py/unit/test_tools_analyze_interface_zsl.py +0 -187
- package/tests/py/unit/test_tools_analyze_lattice.py +0 -74
- package/tests/py/unit/test_tools_analyze_swap.py +0 -80
- package/tests/py/unit/test_tools_build.py +0 -158
- package/tests/py/unit/test_tools_build_defect/__init__.py +0 -0
- package/tests/py/unit/test_tools_build_defect/test_adatom.py +0 -84
- package/tests/py/unit/test_tools_build_defect/test_island.py +0 -45
- package/tests/py/unit/test_tools_build_defect/test_pair_defect.py +0 -84
- package/tests/py/unit/test_tools_build_defect/test_point_defect.py +0 -196
- package/tests/py/unit/test_tools_build_defect/test_slab_stack.py +0 -30
- package/tests/py/unit/test_tools_build_defect/test_solid_solution.py +0 -90
- package/tests/py/unit/test_tools_build_defect/test_terrace.py +0 -44
- package/tests/py/unit/test_tools_build_grain_boundary.py +0 -133
- package/tests/py/unit/test_tools_build_heterostructure.py +0 -46
- package/tests/py/unit/test_tools_build_interface.py +0 -292
- package/tests/py/unit/test_tools_build_interface_zsl.py +0 -263
- package/tests/py/unit/test_tools_build_maxwell_disorder.py +0 -123
- package/tests/py/unit/test_tools_build_metadata.py +0 -79
- package/tests/py/unit/test_tools_build_monolayer.py +0 -33
- package/tests/py/unit/test_tools_build_nanoparticle.py +0 -42
- package/tests/py/unit/test_tools_build_nanoribbon.py +0 -45
- package/tests/py/unit/test_tools_build_passivation.py +0 -85
- package/tests/py/unit/test_tools_build_perturbation.py +0 -103
- package/tests/py/unit/test_tools_build_slab.py +0 -382
- package/tests/py/unit/test_tools_build_strain.py +0 -36
- package/tests/py/unit/test_tools_build_supercell.py +0 -47
- package/tests/py/unit/test_tools_calculate.py +0 -67
- package/tests/py/unit/test_tools_convert.py +0 -174
- package/tests/py/unit/test_tools_modify.py +0 -248
- package/tests/py/unit/utils.py +0 -142
- package/tsconfig-transpile.json +0 -3
- package/tsconfig.json +0 -3
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
|
|
3
|
-
from .types import StackComponentDict
|
|
4
|
-
from .utils import (
|
|
5
|
-
apply_gaps_and_stack,
|
|
6
|
-
create_initial_slabs,
|
|
7
|
-
create_strained_films,
|
|
8
|
-
create_strained_substrate,
|
|
9
|
-
find_common_supercell_matrix,
|
|
10
|
-
validate_heterostructure_inputs,
|
|
11
|
-
)
|
|
12
|
-
from .....analyze import BaseMaterialAnalyzer
|
|
13
|
-
from .....build_components import MaterialWithBuildMetadata
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def create_heterostructure(
|
|
17
|
-
stack_component_dicts: List[StackComponentDict],
|
|
18
|
-
gaps: List[float],
|
|
19
|
-
vacuum: float = 10.0,
|
|
20
|
-
use_conventional_cell: bool = True,
|
|
21
|
-
optimize_layer_supercells: bool = True,
|
|
22
|
-
) -> MaterialWithBuildMetadata:
|
|
23
|
-
"""
|
|
24
|
-
Create a heterostructure by stacking multiple slabs, while applying strain to each slab relative to the first slab.
|
|
25
|
-
Args:
|
|
26
|
-
stack_component_dicts: List of stack component configurations
|
|
27
|
-
gaps: List of gaps between adjacent slabs (in Angstroms)
|
|
28
|
-
vacuum: Size of vacuum layer over the last slab (in Angstroms)
|
|
29
|
-
use_conventional_cell: Whether to use conventional cell
|
|
30
|
-
optimize_layer_supercells: Whether to find optimal supercells for strained layers
|
|
31
|
-
Returns:
|
|
32
|
-
Heterostructure material with stacked strained slabs
|
|
33
|
-
"""
|
|
34
|
-
validate_heterostructure_inputs(stack_component_dicts, gaps)
|
|
35
|
-
|
|
36
|
-
slabs = create_initial_slabs(stack_component_dicts, vacuum, use_conventional_cell)
|
|
37
|
-
common_supercell_matrix = find_common_supercell_matrix(slabs, optimize_layer_supercells)
|
|
38
|
-
|
|
39
|
-
strained_substrate = create_strained_substrate(slabs[0], common_supercell_matrix)
|
|
40
|
-
strained_films = create_strained_films(slabs, common_supercell_matrix, optimize_layer_supercells)
|
|
41
|
-
|
|
42
|
-
strained_slabs = [strained_substrate] + strained_films
|
|
43
|
-
heterostructure = apply_gaps_and_stack(strained_slabs, gaps)
|
|
44
|
-
heterostructure.name = generate_heterostructure_name(stack_component_dicts)
|
|
45
|
-
|
|
46
|
-
return heterostructure
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def generate_heterostructure_name(stack_component_dicts: List[StackComponentDict]):
|
|
50
|
-
"""Generate a descriptive name for the heterostructure."""
|
|
51
|
-
|
|
52
|
-
components = []
|
|
53
|
-
for component in stack_component_dicts:
|
|
54
|
-
analyzer = BaseMaterialAnalyzer(material=component.crystal)
|
|
55
|
-
formula = analyzer.formula
|
|
56
|
-
miller_str = "".join(map(str, component.miller_indices))
|
|
57
|
-
components.append(f"{formula}({miller_str})")
|
|
58
|
-
|
|
59
|
-
return f"Heterostructure [{'-'.join(components)}]"
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
from typing import List, Optional, Tuple, Union
|
|
2
|
-
|
|
3
|
-
from mat3ra.code.entity import InMemoryEntityPydantic
|
|
4
|
-
from pydantic import Field
|
|
5
|
-
|
|
6
|
-
from mat3ra.made.material import Material
|
|
7
|
-
from .....build_components import MaterialWithBuildMetadata
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class StackComponentDict(InMemoryEntityPydantic):
|
|
11
|
-
"""
|
|
12
|
-
Pydantic model for heterostructure stack component configurations.
|
|
13
|
-
|
|
14
|
-
Required fields:
|
|
15
|
-
crystal: The crystal material to create a slab from
|
|
16
|
-
miller_indices: Miller indices for the slab surface as (h, k, l)
|
|
17
|
-
thickness: Number of layers in the slab
|
|
18
|
-
|
|
19
|
-
Optional fields:
|
|
20
|
-
xy_supercell_matrix: Optional supercell matrix for the xy plane
|
|
21
|
-
"""
|
|
22
|
-
|
|
23
|
-
crystal: Union[Material, MaterialWithBuildMetadata] = Field(..., description="Crystal material for the slab")
|
|
24
|
-
miller_indices: Tuple[int, int, int] = Field(..., description="Miller indices for the slab surface")
|
|
25
|
-
thickness: int = Field(..., gt=0, description="Number of layers in the slab")
|
|
26
|
-
xy_supercell_matrix: Optional[List[List[int]]] = Field(None, description="Optional xy supercell matrix")
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
|
|
3
|
-
import numpy as np
|
|
4
|
-
from mat3ra.esse.models.core.abstract.matrix_3x3 import Matrix3x3Schema
|
|
5
|
-
from mat3ra.esse.models.core.reusable.axis_enum import AxisEnum
|
|
6
|
-
from mat3ra.esse.models.materials_category_components.entities.auxiliary.two_dimensional.supercell_matrix_2d import (
|
|
7
|
-
SupercellMatrix2DSchema,
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
from .types import StackComponentDict
|
|
11
|
-
from mat3ra.made.utils import adjust_material_cell_to_set_gap_along_direction
|
|
12
|
-
from ....pristine_structures.two_dimensional.slab.helpers import create_slab
|
|
13
|
-
from ....pristine_structures.two_dimensional.slab_strained_supercell.builder import SlabStrainedSupercellBuilder
|
|
14
|
-
from ....pristine_structures.two_dimensional.slab_strained_supercell.configuration import (
|
|
15
|
-
SlabStrainedSupercellConfiguration,
|
|
16
|
-
)
|
|
17
|
-
from .....analyze.interface import InterfaceAnalyzer
|
|
18
|
-
from .....analyze.slab import SlabMaterialAnalyzer
|
|
19
|
-
from .....build_components import MaterialWithBuildMetadata
|
|
20
|
-
from .....operations.core.binary import stack
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def validate_heterostructure_inputs(stack_component_dicts: List[StackComponentDict], gaps: List[float]) -> None:
|
|
24
|
-
"""Validate inputs for heterostructure creation."""
|
|
25
|
-
if len(stack_component_dicts) < 2:
|
|
26
|
-
raise ValueError("At least 2 stack components are required for a heterostructure")
|
|
27
|
-
if len(gaps) != len(stack_component_dicts) - 1:
|
|
28
|
-
raise ValueError("Number of gaps must be one less than number of stack components")
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
def create_initial_slabs(
|
|
32
|
-
stack_component_dicts: List[StackComponentDict], vacuum: float, use_conventional_cell: bool
|
|
33
|
-
) -> List[MaterialWithBuildMetadata]:
|
|
34
|
-
"""Create initial slabs from stack components."""
|
|
35
|
-
slabs = []
|
|
36
|
-
for i, component in enumerate(stack_component_dicts):
|
|
37
|
-
slab = create_slab(
|
|
38
|
-
crystal=component.crystal,
|
|
39
|
-
miller_indices=component.miller_indices,
|
|
40
|
-
number_of_layers=component.thickness,
|
|
41
|
-
vacuum=0.0 if i < len(stack_component_dicts) - 1 else vacuum,
|
|
42
|
-
use_conventional_cell=use_conventional_cell,
|
|
43
|
-
xy_supercell_matrix=component.xy_supercell_matrix or [[1, 0], [0, 1]],
|
|
44
|
-
)
|
|
45
|
-
slabs.append(slab)
|
|
46
|
-
return slabs
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def find_common_supercell_matrix(
|
|
50
|
-
slabs: List[MaterialWithBuildMetadata], optimize_layer_supercells: bool
|
|
51
|
-
) -> SupercellMatrix2DSchema:
|
|
52
|
-
"""Find common supercell matrix for all materials."""
|
|
53
|
-
reference_substrate = slabs[0]
|
|
54
|
-
|
|
55
|
-
for i in range(1, len(slabs)):
|
|
56
|
-
film_slab = slabs[i]
|
|
57
|
-
|
|
58
|
-
substrate_analyzer = SlabMaterialAnalyzer(material=reference_substrate)
|
|
59
|
-
film_analyzer = SlabMaterialAnalyzer(material=film_slab)
|
|
60
|
-
|
|
61
|
-
analyzer = InterfaceAnalyzer(
|
|
62
|
-
substrate_slab_configuration=substrate_analyzer.build_configuration,
|
|
63
|
-
film_slab_configuration=film_analyzer.build_configuration,
|
|
64
|
-
substrate_build_parameters=substrate_analyzer.build_parameters,
|
|
65
|
-
film_build_parameters=film_analyzer.build_parameters,
|
|
66
|
-
optimize_film_supercell=optimize_layer_supercells,
|
|
67
|
-
)
|
|
68
|
-
analyzer.__dict__["substrate_material"] = reference_substrate
|
|
69
|
-
analyzer.__dict__["film_material"] = film_slab
|
|
70
|
-
|
|
71
|
-
return analyzer.film_strained_configuration.xy_supercell_matrix
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
def create_strained_substrate(
|
|
75
|
-
reference_substrate: MaterialWithBuildMetadata, common_supercell_matrix: SupercellMatrix2DSchema
|
|
76
|
-
) -> MaterialWithBuildMetadata:
|
|
77
|
-
"""Create strained substrate with common supercell."""
|
|
78
|
-
substrate_analyzer = SlabMaterialAnalyzer(material=reference_substrate)
|
|
79
|
-
|
|
80
|
-
substrate_config = SlabStrainedSupercellConfiguration(
|
|
81
|
-
**substrate_analyzer.build_configuration.model_dump(),
|
|
82
|
-
strain_matrix=Matrix3x3Schema(root=np.eye(3).tolist()),
|
|
83
|
-
xy_supercell_matrix=common_supercell_matrix,
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
builder = SlabStrainedSupercellBuilder()
|
|
87
|
-
return builder.get_material(substrate_config)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
def create_strained_films(
|
|
91
|
-
slabs: List[MaterialWithBuildMetadata],
|
|
92
|
-
common_supercell_matrix: SupercellMatrix2DSchema,
|
|
93
|
-
optimize_layer_supercells: bool,
|
|
94
|
-
) -> List[MaterialWithBuildMetadata]:
|
|
95
|
-
"""Create strained films with common supercell."""
|
|
96
|
-
reference_substrate = slabs[0]
|
|
97
|
-
strained_films = []
|
|
98
|
-
builder = SlabStrainedSupercellBuilder()
|
|
99
|
-
|
|
100
|
-
for i in range(1, len(slabs)):
|
|
101
|
-
film_slab = slabs[i]
|
|
102
|
-
|
|
103
|
-
substrate_analyzer = SlabMaterialAnalyzer(material=reference_substrate)
|
|
104
|
-
film_analyzer = SlabMaterialAnalyzer(material=film_slab)
|
|
105
|
-
|
|
106
|
-
analyzer = InterfaceAnalyzer(
|
|
107
|
-
substrate_slab_configuration=substrate_analyzer.build_configuration,
|
|
108
|
-
film_slab_configuration=film_analyzer.build_configuration,
|
|
109
|
-
substrate_build_parameters=substrate_analyzer.build_parameters,
|
|
110
|
-
film_build_parameters=film_analyzer.build_parameters,
|
|
111
|
-
optimize_film_supercell=optimize_layer_supercells,
|
|
112
|
-
)
|
|
113
|
-
analyzer.__dict__["substrate_material"] = reference_substrate
|
|
114
|
-
analyzer.__dict__["film_material"] = film_slab
|
|
115
|
-
|
|
116
|
-
film_config = analyzer.film_strained_configuration
|
|
117
|
-
film_config_dict = film_config.model_dump()
|
|
118
|
-
film_config_dict["xy_supercell_matrix"] = common_supercell_matrix
|
|
119
|
-
film_config_common = SlabStrainedSupercellConfiguration(**film_config_dict)
|
|
120
|
-
|
|
121
|
-
strained_film = builder.get_material(film_config_common)
|
|
122
|
-
strained_films.append(strained_film)
|
|
123
|
-
|
|
124
|
-
return strained_films
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
def apply_gaps_and_stack(
|
|
128
|
-
strained_slabs: List[MaterialWithBuildMetadata], gaps: List[float]
|
|
129
|
-
) -> MaterialWithBuildMetadata:
|
|
130
|
-
"""Apply gaps and stack materials."""
|
|
131
|
-
stacked_materials = []
|
|
132
|
-
for i, slab in enumerate(strained_slabs):
|
|
133
|
-
if i < len(gaps):
|
|
134
|
-
slab_with_gap = adjust_material_cell_to_set_gap_along_direction(slab, gaps[i], AxisEnum.z)
|
|
135
|
-
stacked_materials.append(slab_with_gap)
|
|
136
|
-
else:
|
|
137
|
-
stacked_materials.append(slab)
|
|
138
|
-
|
|
139
|
-
return stack(stacked_materials, AxisEnum.z)
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
from .base import (
|
|
2
|
-
InterfaceConfiguration,
|
|
3
|
-
InterfaceBuilder,
|
|
4
|
-
InterfaceBuilderParameters,
|
|
5
|
-
create_interface_simple_between_slabs,
|
|
6
|
-
)
|
|
7
|
-
from .commensurate import (
|
|
8
|
-
create_interface_commensurate,
|
|
9
|
-
get_commensurate_strained_configurations,
|
|
10
|
-
)
|
|
11
|
-
from .enums import StrainModes
|
|
12
|
-
from .twisted import (
|
|
13
|
-
TwistedNanoribbonsInterfaceConfiguration,
|
|
14
|
-
create_interface_twisted,
|
|
15
|
-
)
|
|
16
|
-
from .utils import (
|
|
17
|
-
get_optimal_film_displacement,
|
|
18
|
-
get_slab,
|
|
19
|
-
remove_duplicate_interfaces,
|
|
20
|
-
)
|
|
21
|
-
from .zsl import (
|
|
22
|
-
create_interface_zsl,
|
|
23
|
-
create_interface_zsl_between_slabs,
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
__all__ = [
|
|
27
|
-
# Base interface classes
|
|
28
|
-
"InterfaceConfiguration",
|
|
29
|
-
"InterfaceBuilder",
|
|
30
|
-
"InterfaceBuilderParameters",
|
|
31
|
-
# Simple interface
|
|
32
|
-
"create_interface_simple_between_slabs",
|
|
33
|
-
# ZSL interface
|
|
34
|
-
"create_interface_zsl",
|
|
35
|
-
"create_interface_zsl_between_slabs",
|
|
36
|
-
# Commensurate interface
|
|
37
|
-
"create_interface_commensurate",
|
|
38
|
-
"get_commensurate_strained_configurations",
|
|
39
|
-
# Twisted interface
|
|
40
|
-
"TwistedNanoribbonsInterfaceConfiguration",
|
|
41
|
-
"create_interface_twisted",
|
|
42
|
-
# Utilities
|
|
43
|
-
"get_optimal_film_displacement",
|
|
44
|
-
"get_slab",
|
|
45
|
-
"remove_duplicate_interfaces",
|
|
46
|
-
"StrainModes",
|
|
47
|
-
]
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
from .configuration import InterfaceConfiguration
|
|
2
|
-
from .builder import InterfaceBuilder
|
|
3
|
-
from .build_parameters import InterfaceBuilderParameters
|
|
4
|
-
from .helpers import create_interface_simple_between_slabs
|
|
5
|
-
|
|
6
|
-
__all__ = [
|
|
7
|
-
"InterfaceConfiguration",
|
|
8
|
-
"InterfaceBuilder",
|
|
9
|
-
"InterfaceBuilderParameters",
|
|
10
|
-
"create_interface_simple_between_slabs",
|
|
11
|
-
]
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
from typing import Optional, Any, Type, Union, cast
|
|
2
|
-
|
|
3
|
-
import numpy as np
|
|
4
|
-
|
|
5
|
-
from mat3ra.made.material import Material
|
|
6
|
-
from mat3ra.made.utils import AXIS_TO_INDEX_MAP
|
|
7
|
-
from .build_parameters import InterfaceBuilderParameters
|
|
8
|
-
from .configuration import InterfaceConfiguration
|
|
9
|
-
from .....pristine_structures.two_dimensional.slab_strained_supercell.builder import SlabStrainedSupercellBuilder
|
|
10
|
-
from .....pristine_structures.two_dimensional.slab_strained_supercell.configuration import (
|
|
11
|
-
SlabStrainedSupercellConfiguration,
|
|
12
|
-
)
|
|
13
|
-
from ......analyze import BaseMaterialAnalyzer
|
|
14
|
-
from ......analyze.lattice import get_material_with_primitive_lattice
|
|
15
|
-
from ......build_components import MaterialWithBuildMetadata
|
|
16
|
-
from ......build_components.operations.core.combinations.stack.builder import StackNComponentsBuilder
|
|
17
|
-
from ......build_components.operations.core.combinations.stack.configuration import StackConfiguration
|
|
18
|
-
from ......convert.interface_parts_enum import InterfacePartsEnum
|
|
19
|
-
from ......modify import translate_by_vector, translate_to_center, wrap_to_unit_cell
|
|
20
|
-
from ......operations.core.unary import supercell
|
|
21
|
-
from ......operations.core.utils import should_skip_stacking
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class InterfaceBuilder(StackNComponentsBuilder):
|
|
25
|
-
"""
|
|
26
|
-
Creates an interface by straining the film to match the substrate.
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
_ConfigurationType: Type[InterfaceConfiguration] = InterfaceConfiguration
|
|
30
|
-
_BuildParametersType: Type[InterfaceBuilderParameters] = InterfaceBuilderParameters
|
|
31
|
-
_DefaultBuildParameters: InterfaceBuilderParameters = InterfaceBuilderParameters()
|
|
32
|
-
_GeneratedItemType: Type[Material] = Material
|
|
33
|
-
|
|
34
|
-
@property
|
|
35
|
-
def stack_component_types_conversion_map(self):
|
|
36
|
-
return {
|
|
37
|
-
**super().stack_component_types_conversion_map,
|
|
38
|
-
SlabStrainedSupercellConfiguration: SlabStrainedSupercellBuilder,
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
def _generate(self, configuration: InterfaceConfiguration) -> MaterialWithBuildMetadata:
|
|
42
|
-
film_material = self._stack_component_to_material(configuration.film_configuration, configuration)
|
|
43
|
-
substrate_material = self._stack_component_to_material(configuration.substrate_configuration, configuration)
|
|
44
|
-
|
|
45
|
-
if film_material:
|
|
46
|
-
film_material.set_labels_from_value(InterfacePartsEnum.FILM.value)
|
|
47
|
-
if substrate_material:
|
|
48
|
-
substrate_material.set_labels_from_value(InterfacePartsEnum.SUBSTRATE.value)
|
|
49
|
-
|
|
50
|
-
# Apply xy shift to the film material
|
|
51
|
-
stacking_axis = AXIS_TO_INDEX_MAP[configuration.direction.value]
|
|
52
|
-
other_axes = [i for i in range(3) if i != stacking_axis]
|
|
53
|
-
translation_vector = [0.0, 0.0, 0.0]
|
|
54
|
-
translation_vector[other_axes[0]] = configuration.xy_shift[0]
|
|
55
|
-
translation_vector[other_axes[1]] = configuration.xy_shift[1]
|
|
56
|
-
film_material = translate_by_vector(film_material, translation_vector, use_cartesian_coordinates=True)
|
|
57
|
-
|
|
58
|
-
try:
|
|
59
|
-
should_skip_stacking(substrate_material, film_material, stacking_axis)
|
|
60
|
-
except ValueError:
|
|
61
|
-
film_material = supercell(film_material, [[0, 1, 0], [1, 0, 0], [0, 0, 1]])
|
|
62
|
-
print(
|
|
63
|
-
"Switched in-plane lattice vectors of the film material to match substrate"
|
|
64
|
-
+ "Direct stacking was not possible."
|
|
65
|
-
)
|
|
66
|
-
should_skip_stacking(substrate_material, film_material, stacking_axis)
|
|
67
|
-
|
|
68
|
-
stack_configuration = StackConfiguration(
|
|
69
|
-
stack_components=[substrate_material, film_material, configuration.vacuum_configuration],
|
|
70
|
-
gaps=configuration.gaps,
|
|
71
|
-
direction=configuration.direction,
|
|
72
|
-
)
|
|
73
|
-
interface = super()._generate(stack_configuration)
|
|
74
|
-
wrapped_interface = wrap_to_unit_cell(interface)
|
|
75
|
-
return wrapped_interface
|
|
76
|
-
|
|
77
|
-
def _post_process(
|
|
78
|
-
self,
|
|
79
|
-
material: MaterialWithBuildMetadata,
|
|
80
|
-
post_process_parameters: Optional[Any],
|
|
81
|
-
configuration: Optional[InterfaceConfiguration] = None,
|
|
82
|
-
) -> MaterialWithBuildMetadata:
|
|
83
|
-
build_params = cast(InterfaceBuilderParameters, self.build_parameters)
|
|
84
|
-
if build_params.make_primitive:
|
|
85
|
-
primitive_material = get_material_with_primitive_lattice(
|
|
86
|
-
material, return_original_if_not_reduced=True, keep_orientation=True
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
if primitive_material != material:
|
|
90
|
-
if configuration is None:
|
|
91
|
-
raise ValueError(
|
|
92
|
-
"Configuration cannot be None when make_primitive is True and material is changed."
|
|
93
|
-
)
|
|
94
|
-
primitive_material = self._preserve_interface_labels_after_primitive_conversion(
|
|
95
|
-
original_material=material,
|
|
96
|
-
primitive_material=primitive_material,
|
|
97
|
-
axis=configuration.direction.value,
|
|
98
|
-
)
|
|
99
|
-
|
|
100
|
-
material = primitive_material
|
|
101
|
-
|
|
102
|
-
return super()._post_process(material, post_process_parameters=None, configuration=configuration)
|
|
103
|
-
|
|
104
|
-
def get_base_name_from_configuration(self, first_configuration, second_configuration) -> str:
|
|
105
|
-
first_component_formula = BaseMaterialAnalyzer(material=first_configuration.atomic_layers.crystal).formula
|
|
106
|
-
second_component_formula = BaseMaterialAnalyzer(material=second_configuration.atomic_layers.crystal).formula
|
|
107
|
-
first_component_miller = first_configuration.atomic_layers.miller_indices_as_string
|
|
108
|
-
second_component_miller = second_configuration.atomic_layers.miller_indices_as_string
|
|
109
|
-
return f"{first_component_formula}{first_component_miller}-{second_component_formula}{second_component_miller}"
|
|
110
|
-
|
|
111
|
-
def get_name_suffix(self, configuration: InterfaceConfiguration) -> str:
|
|
112
|
-
strain = configuration.von_mises_strain_percentage
|
|
113
|
-
if strain == 0:
|
|
114
|
-
return "Interface"
|
|
115
|
-
return f"Interface, Strain {strain:.3f}pct"
|
|
116
|
-
|
|
117
|
-
def _update_material_name(
|
|
118
|
-
self, material: Union[Material, MaterialWithBuildMetadata], configuration: InterfaceConfiguration
|
|
119
|
-
) -> MaterialWithBuildMetadata:
|
|
120
|
-
base_name = self.get_base_name_from_configuration(
|
|
121
|
-
configuration.film_configuration, configuration.substrate_configuration
|
|
122
|
-
)
|
|
123
|
-
name_suffix = self.get_name_suffix(configuration) or self.name_suffix
|
|
124
|
-
name = f"{base_name}, {name_suffix}"
|
|
125
|
-
material.name = name
|
|
126
|
-
return material
|
|
127
|
-
|
|
128
|
-
def _preserve_interface_labels_after_primitive_conversion(
|
|
129
|
-
self, original_material: MaterialWithBuildMetadata, primitive_material: MaterialWithBuildMetadata, axis: str
|
|
130
|
-
) -> MaterialWithBuildMetadata:
|
|
131
|
-
if not original_material.basis.labels.values:
|
|
132
|
-
return primitive_material
|
|
133
|
-
|
|
134
|
-
labeled_primitive = primitive_material.clone()
|
|
135
|
-
interface_gap_coordinate = self._find_interface_coordinate_level(original_material, axis)
|
|
136
|
-
primitive_labels = self._assign_labels_by_coordinate_level(labeled_primitive, interface_gap_coordinate, axis)
|
|
137
|
-
labeled_primitive.set_labels_from_list(primitive_labels)
|
|
138
|
-
return labeled_primitive
|
|
139
|
-
|
|
140
|
-
def _find_interface_coordinate_level(self, material: MaterialWithBuildMetadata, axis) -> float:
|
|
141
|
-
normalized_material = translate_to_center(material, axes=[axis])
|
|
142
|
-
normalized_material.to_cartesian()
|
|
143
|
-
direction_coords = np.array(normalized_material.coordinates_array)[:, AXIS_TO_INDEX_MAP[axis]]
|
|
144
|
-
labels = material.basis.labels.values
|
|
145
|
-
|
|
146
|
-
substrate_gap_coordinate = direction_coords[np.array(labels) == int(InterfacePartsEnum.SUBSTRATE.value)]
|
|
147
|
-
film_gap_coordinate = direction_coords[np.array(labels) == int(InterfacePartsEnum.FILM.value)]
|
|
148
|
-
|
|
149
|
-
if len(substrate_gap_coordinate) == 0 or len(film_gap_coordinate) == 0:
|
|
150
|
-
return (np.min(direction_coords) + np.max(direction_coords)) / 2
|
|
151
|
-
|
|
152
|
-
max_substrate_gap_coordinate = np.max(substrate_gap_coordinate)
|
|
153
|
-
min_film_gap_coordinate = np.min(film_gap_coordinate)
|
|
154
|
-
return (max_substrate_gap_coordinate + min_film_gap_coordinate) / 2
|
|
155
|
-
|
|
156
|
-
def _assign_labels_by_coordinate_level(
|
|
157
|
-
self, material: MaterialWithBuildMetadata, interface_gap_coordinate: float, axis
|
|
158
|
-
) -> list:
|
|
159
|
-
normalized_material = translate_to_center(material, axes=[axis])
|
|
160
|
-
normalized_material.to_cartesian()
|
|
161
|
-
direction_coords = np.array(normalized_material.coordinates_array)[:, AXIS_TO_INDEX_MAP[axis]]
|
|
162
|
-
substrate_label = int(InterfacePartsEnum.SUBSTRATE.value)
|
|
163
|
-
film_label = int(InterfacePartsEnum.FILM.value)
|
|
164
|
-
return [substrate_label if z < interface_gap_coordinate else film_label for z in direction_coords]
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
from typing import Union, List, Optional
|
|
2
|
-
|
|
3
|
-
import numpy as np
|
|
4
|
-
from mat3ra.esse.models.materials_category.compound_pristine_structures.two_dimensional.interface.configuration import ( # noqa: E501
|
|
5
|
-
InterfaceConfigurationSchema,
|
|
6
|
-
)
|
|
7
|
-
|
|
8
|
-
from .....pristine_structures.two_dimensional.slab_strained_supercell.configuration import (
|
|
9
|
-
SlabStrainedSupercellConfiguration,
|
|
10
|
-
)
|
|
11
|
-
from ......analyze.utils import calculate_von_mises_strain
|
|
12
|
-
from ......build_components.entities.core.two_dimensional.vacuum.configuration import VacuumConfiguration
|
|
13
|
-
from ......build_components.operations.core.combinations.stack.configuration import StackConfiguration
|
|
14
|
-
from ......utils import unwrap
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class InterfaceConfiguration(StackConfiguration, InterfaceConfigurationSchema):
|
|
18
|
-
# components and their modifiers added in the order they are stacked, from bottom to top
|
|
19
|
-
stack_components: List[
|
|
20
|
-
Union[
|
|
21
|
-
SlabStrainedSupercellConfiguration,
|
|
22
|
-
VacuumConfiguration,
|
|
23
|
-
]
|
|
24
|
-
]
|
|
25
|
-
xy_shift: List[float] = InterfaceConfigurationSchema.model_fields["xy_shift"].default # in Angstroms
|
|
26
|
-
|
|
27
|
-
type: str = "InterfaceConfiguration"
|
|
28
|
-
|
|
29
|
-
@property
|
|
30
|
-
def substrate_configuration(self) -> SlabStrainedSupercellConfiguration:
|
|
31
|
-
return self.stack_components[0]
|
|
32
|
-
|
|
33
|
-
@property
|
|
34
|
-
def film_configuration(self) -> SlabStrainedSupercellConfiguration:
|
|
35
|
-
return self.stack_components[1]
|
|
36
|
-
|
|
37
|
-
@property
|
|
38
|
-
def vacuum_configuration(self) -> Optional[VacuumConfiguration]:
|
|
39
|
-
if len(self.stack_components) > 2:
|
|
40
|
-
return self.stack_components[2]
|
|
41
|
-
return None
|
|
42
|
-
|
|
43
|
-
@property
|
|
44
|
-
def von_mises_strain_percentage(self) -> float:
|
|
45
|
-
"""Von Mises strain (%) from the film's strain_matrix (2D part)."""
|
|
46
|
-
raw = self.film_configuration.strain_matrix.root
|
|
47
|
-
strain_matrix = np.array(unwrap(raw))
|
|
48
|
-
return calculate_von_mises_strain(strain_matrix)
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
from typing import List, Optional, Tuple, Union
|
|
2
|
-
|
|
3
|
-
from mat3ra.code.array_with_ids import ArrayWithIds
|
|
4
|
-
|
|
5
|
-
from mat3ra.made.material import Material
|
|
6
|
-
from .build_parameters import InterfaceBuilderParameters
|
|
7
|
-
from .builder import InterfaceBuilder
|
|
8
|
-
from .configuration import InterfaceConfiguration
|
|
9
|
-
from ......analyze.interface import InterfaceAnalyzer
|
|
10
|
-
from ......analyze.slab import SlabMaterialAnalyzer
|
|
11
|
-
from ......build.pristine_structures.two_dimensional.slab.helpers import create_slab
|
|
12
|
-
from ......build_components import MaterialWithBuildMetadata
|
|
13
|
-
from ......build_components.entities.core.two_dimensional.vacuum.configuration import VacuumConfiguration
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def create_interface_simple_between_slabs(
|
|
17
|
-
substrate_slab: MaterialWithBuildMetadata,
|
|
18
|
-
film_slab: MaterialWithBuildMetadata,
|
|
19
|
-
gap: Optional[float] = None,
|
|
20
|
-
vacuum: float = 10.0,
|
|
21
|
-
xy_shift: List[float] = [0, 0],
|
|
22
|
-
reduce_result_cell_to_primitive: bool = False,
|
|
23
|
-
) -> Material:
|
|
24
|
-
"""
|
|
25
|
-
Create an interface between two slab materials with specified parameters.
|
|
26
|
-
No strain matching is performed, the interface is created as a simple stack of two slabs.
|
|
27
|
-
|
|
28
|
-
Args:
|
|
29
|
-
substrate_slab (MaterialWithBuildMetadata): Substrate slab material.
|
|
30
|
-
film_slab (MaterialWithBuildMetadata): Film slab material.
|
|
31
|
-
gap (Optional[float]): Gap between the two materials, in Angstroms.
|
|
32
|
-
Distance between top most atom of the substrate and bottom most atom of the film.
|
|
33
|
-
vacuum (float): Size of the vacuum layer in Angstroms.
|
|
34
|
-
xy_shift (List[float]): Shift in x and y directions, in Angstroms.
|
|
35
|
-
|
|
36
|
-
Returns:
|
|
37
|
-
Material: The interface material.
|
|
38
|
-
"""
|
|
39
|
-
substrate_analyzer = SlabMaterialAnalyzer(material=substrate_slab)
|
|
40
|
-
film_analyzer = SlabMaterialAnalyzer(material=film_slab)
|
|
41
|
-
|
|
42
|
-
analyzer = InterfaceAnalyzer(
|
|
43
|
-
substrate_slab_configuration=substrate_analyzer.build_configuration,
|
|
44
|
-
film_slab_configuration=film_analyzer.build_configuration,
|
|
45
|
-
substrate_build_parameters=substrate_analyzer.build_parameters,
|
|
46
|
-
film_build_parameters=film_analyzer.build_parameters,
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
film_configuration = analyzer.film_strained_configuration
|
|
50
|
-
substrate_configuration = analyzer.substrate_strained_configuration
|
|
51
|
-
vacuum_configuration = VacuumConfiguration(
|
|
52
|
-
size=vacuum,
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
config = InterfaceConfiguration(
|
|
56
|
-
stack_components=[substrate_configuration, film_configuration, vacuum_configuration],
|
|
57
|
-
xy_shift=xy_shift,
|
|
58
|
-
gaps=ArrayWithIds.from_values([gap]),
|
|
59
|
-
)
|
|
60
|
-
builder = InterfaceBuilder(
|
|
61
|
-
build_parameters=InterfaceBuilderParameters(make_primitive=reduce_result_cell_to_primitive)
|
|
62
|
-
)
|
|
63
|
-
interface = builder.get_material(config)
|
|
64
|
-
return interface
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
def create_interface_simple(
|
|
68
|
-
substrate_crystal: Union[Material, MaterialWithBuildMetadata],
|
|
69
|
-
film_crystal: Union[Material, MaterialWithBuildMetadata],
|
|
70
|
-
substrate_miller_indices: Tuple[int, int, int] = (0, 0, 1),
|
|
71
|
-
film_miller_indices: Tuple[int, int, int] = (0, 0, 1),
|
|
72
|
-
substrate_number_of_layers: int = 1,
|
|
73
|
-
film_number_of_layers: int = 1,
|
|
74
|
-
substrate_termination_formula: Optional[str] = None,
|
|
75
|
-
film_termination_formula: Optional[str] = None,
|
|
76
|
-
substrate_xy_supercell_matrix: List[List[int]] = [[1, 0], [0, 1]],
|
|
77
|
-
film_xy_supercell_matrix: List[List[int]] = [[1, 0], [0, 1]],
|
|
78
|
-
gap: Optional[float] = None,
|
|
79
|
-
vacuum: float = 10.0,
|
|
80
|
-
xy_shift: List[float] = [0, 0],
|
|
81
|
-
use_conventional_cell: bool = True,
|
|
82
|
-
reduce_result_cell_to_primitive: bool = False,
|
|
83
|
-
) -> Material:
|
|
84
|
-
"""
|
|
85
|
-
Create an interface between two crystal materials by first creating slabs and then stacking them.
|
|
86
|
-
No strain matching is performed, the interface is created as a simple stack of two slabs.
|
|
87
|
-
|
|
88
|
-
Args:
|
|
89
|
-
substrate_crystal (Union[Material, MaterialWithBuildMetadata]): Substrate crystal material.
|
|
90
|
-
film_crystal (Union[Material, MaterialWithBuildMetadata]): Film crystal material.
|
|
91
|
-
substrate_miller_indices (Tuple[int, int, int]): Miller indices for the substrate slab surface.
|
|
92
|
-
film_miller_indices (Tuple[int, int, int]): Miller indices for the film slab surface.
|
|
93
|
-
substrate_number_of_layers (int): Number of atomic layers in the substrate slab.
|
|
94
|
-
film_number_of_layers (int): Number of atomic layers in the film slab.
|
|
95
|
-
substrate_termination_formula (Optional[str]): Formula of the termination for substrate slab.
|
|
96
|
-
film_termination_formula (Optional[str]): Formula of the termination for film slab.
|
|
97
|
-
substrate_xy_supercell_matrix (List[List[int]]): Supercell matrix for substrate slab xy plane.
|
|
98
|
-
film_xy_supercell_matrix (List[List[int]]): Supercell matrix for film slab xy plane.
|
|
99
|
-
gap (Optional[float]): Gap between the two materials, in Angstroms.
|
|
100
|
-
vacuum (float): Size of the vacuum layer in Angstroms.
|
|
101
|
-
xy_shift (List[float]): Shift in x and y directions, in Angstroms.
|
|
102
|
-
use_conventional_cell (bool): Whether to use conventional cell for crystals.
|
|
103
|
-
reduce_result_cell_to_primitive (bool): Whether to reduce result cell to primitive.
|
|
104
|
-
|
|
105
|
-
Returns:
|
|
106
|
-
Material: The interface material.
|
|
107
|
-
"""
|
|
108
|
-
substrate_slab = create_slab(
|
|
109
|
-
crystal=substrate_crystal,
|
|
110
|
-
miller_indices=substrate_miller_indices,
|
|
111
|
-
number_of_layers=substrate_number_of_layers,
|
|
112
|
-
vacuum=0,
|
|
113
|
-
termination_top_formula=substrate_termination_formula,
|
|
114
|
-
xy_supercell_matrix=substrate_xy_supercell_matrix,
|
|
115
|
-
use_conventional_cell=use_conventional_cell,
|
|
116
|
-
)
|
|
117
|
-
film_slab = create_slab(
|
|
118
|
-
crystal=film_crystal,
|
|
119
|
-
miller_indices=film_miller_indices,
|
|
120
|
-
number_of_layers=film_number_of_layers,
|
|
121
|
-
vacuum=0,
|
|
122
|
-
termination_top_formula=film_termination_formula,
|
|
123
|
-
xy_supercell_matrix=film_xy_supercell_matrix,
|
|
124
|
-
use_conventional_cell=use_conventional_cell,
|
|
125
|
-
)
|
|
126
|
-
|
|
127
|
-
return create_interface_simple_between_slabs(
|
|
128
|
-
substrate_slab=substrate_slab,
|
|
129
|
-
film_slab=film_slab,
|
|
130
|
-
gap=gap,
|
|
131
|
-
vacuum=vacuum,
|
|
132
|
-
xy_shift=xy_shift,
|
|
133
|
-
reduce_result_cell_to_primitive=reduce_result_cell_to_primitive,
|
|
134
|
-
)
|