@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,157 +0,0 @@
|
|
|
1
|
-
from typing import List, Optional, Tuple, Union
|
|
2
|
-
|
|
3
|
-
from mat3ra.code.array_with_ids import ArrayWithIds
|
|
4
|
-
from mat3ra.esse.models.core.reusable.axis_enum import AxisEnum
|
|
5
|
-
|
|
6
|
-
from mat3ra.made.material import Material
|
|
7
|
-
from .. import InterfaceBuilder, InterfaceConfiguration
|
|
8
|
-
from ......build_components.entities.core.two_dimensional.vacuum.configuration import VacuumConfiguration
|
|
9
|
-
from .....pristine_structures.two_dimensional.slab_strained_supercell.configuration import (
|
|
10
|
-
SlabStrainedSupercellConfiguration,
|
|
11
|
-
)
|
|
12
|
-
from ......analyze.interface import CommensurateLatticeInterfaceAnalyzer
|
|
13
|
-
from ......analyze.lattice import get_material_with_conventional_lattice
|
|
14
|
-
from mat3ra.made.tools.build.pristine_structures.two_dimensional.slab.configuration import SlabConfiguration
|
|
15
|
-
from ......build_components.metadata import MaterialWithBuildMetadata
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
def get_commensurate_strained_configurations(
|
|
19
|
-
material: Union[Material, MaterialWithBuildMetadata],
|
|
20
|
-
target_angle: float,
|
|
21
|
-
angle_tolerance: float,
|
|
22
|
-
max_repetition_int: Optional[int],
|
|
23
|
-
limit_max_int: int,
|
|
24
|
-
return_first_match: bool,
|
|
25
|
-
miller_indices: Tuple[int, int, int],
|
|
26
|
-
number_of_layers: int,
|
|
27
|
-
vacuum: float,
|
|
28
|
-
match_id: int = 0,
|
|
29
|
-
use_conventional_cell: bool = True,
|
|
30
|
-
) -> Tuple[List[SlabStrainedSupercellConfiguration], float]:
|
|
31
|
-
"""
|
|
32
|
-
Get strained configurations for commensurate lattice matching.
|
|
33
|
-
|
|
34
|
-
This function creates strained configurations for both substrate and film phases
|
|
35
|
-
based on commensurate lattice matching at a specified twist angle.
|
|
36
|
-
|
|
37
|
-
Args:
|
|
38
|
-
material (Material): The material to create configurations from.
|
|
39
|
-
target_angle (float): The target twist angle in degrees.
|
|
40
|
-
angle_tolerance (float): Tolerance for matching angles in degrees.
|
|
41
|
-
max_repetition_int (Optional[int]): Maximum integer for supercell matrix elements.
|
|
42
|
-
limit_max_int (int): Limit for maximum integer to search for supercell matrices.
|
|
43
|
-
return_first_match (bool): Whether to return the first match or all matches.
|
|
44
|
-
miller_indices (Tuple[int, int, int]): Miller indices for the slab surface.
|
|
45
|
-
number_of_layers (int): Number of atomic layers in the slab.
|
|
46
|
-
vacuum (float): Size of the vacuum layer in Angstroms.
|
|
47
|
-
match_id (int): ID of the match to use (0 for first match).
|
|
48
|
-
|
|
49
|
-
Returns:
|
|
50
|
-
Tuple[List[SlabStrainedSupercellConfiguration], float]:
|
|
51
|
-
List of strained configurations [substrate, film] and the actual angle.
|
|
52
|
-
|
|
53
|
-
Raises:
|
|
54
|
-
ValueError: If no commensurate lattice matches are found.
|
|
55
|
-
"""
|
|
56
|
-
if use_conventional_cell:
|
|
57
|
-
material = get_material_with_conventional_lattice(material)
|
|
58
|
-
|
|
59
|
-
slab_config = SlabConfiguration.from_parameters(
|
|
60
|
-
material_or_dict=material,
|
|
61
|
-
miller_indices=miller_indices,
|
|
62
|
-
number_of_layers=number_of_layers,
|
|
63
|
-
vacuum=vacuum,
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
analyzer = CommensurateLatticeInterfaceAnalyzer(
|
|
67
|
-
substrate_slab_configuration=slab_config,
|
|
68
|
-
target_angle=target_angle,
|
|
69
|
-
angle_tolerance=angle_tolerance,
|
|
70
|
-
max_supercell_matrix_int=max_repetition_int,
|
|
71
|
-
limit_max_int=limit_max_int,
|
|
72
|
-
return_first_match=return_first_match,
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
match_holders = analyzer.commensurate_lattice_match_holders
|
|
76
|
-
if not match_holders:
|
|
77
|
-
raise ValueError(f"No commensurate lattice matches found for angle {target_angle}°")
|
|
78
|
-
|
|
79
|
-
selected_config = analyzer.get_strained_configuration_by_match_id(match_id)
|
|
80
|
-
actual_angle = match_holders[match_id].actual_angle
|
|
81
|
-
return [selected_config.substrate_configuration, selected_config.film_configuration], actual_angle
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
def create_interface_commensurate(
|
|
85
|
-
material: Union[Material, MaterialWithBuildMetadata],
|
|
86
|
-
target_angle: float = 0.0,
|
|
87
|
-
angle_tolerance: float = 0.1,
|
|
88
|
-
max_repetition_int: Optional[int] = None,
|
|
89
|
-
limit_max_int: int = 20,
|
|
90
|
-
return_first_match: bool = True,
|
|
91
|
-
direction: AxisEnum = AxisEnum.z,
|
|
92
|
-
gap: float = 3.0,
|
|
93
|
-
miller_indices: Tuple[int, int, int] = (0, 0, 1),
|
|
94
|
-
number_of_layers: int = 1,
|
|
95
|
-
vacuum: float = 0.0,
|
|
96
|
-
match_id: int = 0,
|
|
97
|
-
use_conventional_cell: bool = True,
|
|
98
|
-
remove_overlapping_atoms: bool = True,
|
|
99
|
-
tolerance_for_overlap: float = 1.0,
|
|
100
|
-
) -> MaterialWithBuildMetadata:
|
|
101
|
-
"""
|
|
102
|
-
Create a commensurate lattice interface (twisted interface) from a material with specified twist angle.
|
|
103
|
-
|
|
104
|
-
This function creates a commensurate interface by:
|
|
105
|
-
1. Creating a slab configuration from the material
|
|
106
|
-
2. Finding commensurate lattice matches at the target angle using CommensurateLatticeInterfaceAnalyzer
|
|
107
|
-
3. Creating strained configurations with directional gaps for both phases
|
|
108
|
-
4. Stacking them along the specified direction
|
|
109
|
-
|
|
110
|
-
Args:
|
|
111
|
-
material (Material): The material to create the interface from.
|
|
112
|
-
target_angle (float): The target twist angle in degrees.
|
|
113
|
-
angle_tolerance (float): Tolerance for matching angles in degrees.
|
|
114
|
-
max_repetition_int (Optional[int]): Maximum integer for supercell matrix elements.
|
|
115
|
-
limit_max_int (int): Limit for maximum integer to search for supercell matrices.
|
|
116
|
-
return_first_match (bool): Whether to return the first match or all matches.
|
|
117
|
-
direction (AxisEnum): Direction along which to stack components (x, y, or z).
|
|
118
|
-
gap (float): The gap between the two phases in Angstroms.
|
|
119
|
-
miller_indices (Tuple[int, int, int]): Miller indices for the slab surface.
|
|
120
|
-
number_of_layers (int): Number of atomic layers in the slab.
|
|
121
|
-
vacuum (float): Size of the vacuum layer in Angstroms.
|
|
122
|
-
match_id (int): ID of the match to use (0 for first match).
|
|
123
|
-
use_conventional_cell (bool): Whether to use the conventional cell for the material.
|
|
124
|
-
remove_overlapping_atoms (bool): Whether to resolve overlapping atoms in the interface after creation.
|
|
125
|
-
tolerance_for_overlap (float): Tolerance for resolving overlapping atoms, in Angstroms.
|
|
126
|
-
Returns:
|
|
127
|
-
Material: The commensurate interface material.
|
|
128
|
-
|
|
129
|
-
Raises:
|
|
130
|
-
ValueError: If no commensurate lattice matches are found.
|
|
131
|
-
"""
|
|
132
|
-
strained_configs, _ = get_commensurate_strained_configurations(
|
|
133
|
-
material=material,
|
|
134
|
-
target_angle=target_angle,
|
|
135
|
-
angle_tolerance=angle_tolerance,
|
|
136
|
-
max_repetition_int=max_repetition_int,
|
|
137
|
-
limit_max_int=limit_max_int,
|
|
138
|
-
return_first_match=return_first_match,
|
|
139
|
-
miller_indices=miller_indices,
|
|
140
|
-
number_of_layers=number_of_layers,
|
|
141
|
-
vacuum=vacuum,
|
|
142
|
-
match_id=match_id,
|
|
143
|
-
use_conventional_cell=use_conventional_cell,
|
|
144
|
-
)
|
|
145
|
-
|
|
146
|
-
vacuum_config = VacuumConfiguration(size=vacuum, crystal=None, direction=direction)
|
|
147
|
-
interface_config = InterfaceConfiguration(
|
|
148
|
-
stack_components=strained_configs + [vacuum_config],
|
|
149
|
-
gaps=ArrayWithIds.from_values([gap, gap]),
|
|
150
|
-
direction=direction,
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
builder = InterfaceBuilder()
|
|
154
|
-
interface = builder.get_material(interface_config)
|
|
155
|
-
if remove_overlapping_atoms:
|
|
156
|
-
interface.basis.resolve_colliding_coordinates(tolerance=tolerance_for_overlap)
|
|
157
|
-
return interface
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
from ..base.configuration import InterfaceConfiguration
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class TwistedNanoribbonsInterfaceConfiguration(InterfaceConfiguration):
|
|
5
|
-
"""
|
|
6
|
-
Configuration for creating a twisted interface between two nanoribbons with specified twist angle.
|
|
7
|
-
|
|
8
|
-
Args:
|
|
9
|
-
stack_components (List[SlabConfiguration]): List of two nanoribbons as slab configurations.
|
|
10
|
-
angle (float): Twist angle in degrees for provenance.
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
|
-
angle: float = 0.0
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
from typing import Union
|
|
2
|
-
|
|
3
|
-
from mat3ra.code.array_with_ids import ArrayWithIds
|
|
4
|
-
from mat3ra.esse.models.core.reusable.axis_enum import AxisEnum
|
|
5
|
-
|
|
6
|
-
from mat3ra.made.material import Material
|
|
7
|
-
from .. import InterfaceBuilder, InterfaceConfiguration
|
|
8
|
-
from ......analyze.interface import TwistedNanoribbonsInterfaceAnalyzer
|
|
9
|
-
from ......analyze.lattice import get_material_with_conventional_lattice
|
|
10
|
-
from ......build_components import MaterialWithBuildMetadata
|
|
11
|
-
from mat3ra.made.tools.build.pristine_structures.two_dimensional.slab.configuration import SlabConfiguration
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def create_interface_twisted(
|
|
15
|
-
material1: Union[Material, MaterialWithBuildMetadata],
|
|
16
|
-
material2: Union[Material, MaterialWithBuildMetadata],
|
|
17
|
-
angle: float = 0.0,
|
|
18
|
-
vacuum_x: float = 5.0,
|
|
19
|
-
vacuum_y: float = 5.0,
|
|
20
|
-
gap: float = 3.0,
|
|
21
|
-
use_conventional_cell: bool = False,
|
|
22
|
-
) -> MaterialWithBuildMetadata:
|
|
23
|
-
"""
|
|
24
|
-
Create a twisted interface between two nanoribbons.
|
|
25
|
-
|
|
26
|
-
Args:
|
|
27
|
-
material1 (Material): First nanoribbon material.
|
|
28
|
-
material2 (Material): Second nanoribbon material.
|
|
29
|
-
angle (float): Twist angle in degrees.
|
|
30
|
-
vacuum_x (float): Vacuum along x on both sides, in Angstroms.
|
|
31
|
-
vacuum_y (float): Vacuum along y on both sides, in Angstroms.
|
|
32
|
-
gap (float): Gap between the nanoribbons in Angstroms.
|
|
33
|
-
|
|
34
|
-
Returns:
|
|
35
|
-
Material: The twisted interface material.
|
|
36
|
-
"""
|
|
37
|
-
if use_conventional_cell:
|
|
38
|
-
material1 = get_material_with_conventional_lattice(material1)
|
|
39
|
-
material2 = get_material_with_conventional_lattice(material2)
|
|
40
|
-
slab1 = SlabConfiguration.from_parameters(
|
|
41
|
-
material_or_dict=material1,
|
|
42
|
-
miller_indices=(0, 0, 1),
|
|
43
|
-
number_of_layers=1,
|
|
44
|
-
vacuum=0.0,
|
|
45
|
-
use_conventional_cell=use_conventional_cell,
|
|
46
|
-
)
|
|
47
|
-
slab2 = SlabConfiguration.from_parameters(
|
|
48
|
-
material_or_dict=material2,
|
|
49
|
-
miller_indices=(0, 0, 1),
|
|
50
|
-
number_of_layers=1,
|
|
51
|
-
vacuum=0.0,
|
|
52
|
-
use_conventional_cell=use_conventional_cell,
|
|
53
|
-
)
|
|
54
|
-
analyzer = TwistedNanoribbonsInterfaceAnalyzer(
|
|
55
|
-
substrate_slab_configuration=slab1,
|
|
56
|
-
film_slab_configuration=slab2,
|
|
57
|
-
angle=angle,
|
|
58
|
-
vacuum_x=vacuum_x,
|
|
59
|
-
vacuum_y=vacuum_y,
|
|
60
|
-
)
|
|
61
|
-
processed_slab1 = analyzer.substrate_nanoribbon_configuration
|
|
62
|
-
processed_slab2 = analyzer.film_nanoribbon_configuration
|
|
63
|
-
|
|
64
|
-
configuration = InterfaceConfiguration(
|
|
65
|
-
stack_components=[processed_slab1, processed_slab2],
|
|
66
|
-
gaps=ArrayWithIds.from_values([gap, gap]),
|
|
67
|
-
direction=AxisEnum.z,
|
|
68
|
-
)
|
|
69
|
-
builder = InterfaceBuilder()
|
|
70
|
-
return builder.get_material(configuration)
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
from typing import List, Tuple, Union
|
|
2
|
-
|
|
3
|
-
import numpy as np
|
|
4
|
-
|
|
5
|
-
from mat3ra.made.material import Material
|
|
6
|
-
from .enums import StrainModes
|
|
7
|
-
from .....build_components import MaterialWithBuildMetadata
|
|
8
|
-
from .....convert.interface_parts_enum import INTERFACE_LABELS_MAP
|
|
9
|
-
from .....modify import interface_displace_part, filter_by_label
|
|
10
|
-
from .....optimize import evaluate_calculator_on_xy_grid
|
|
11
|
-
from .....third_party import PymatgenInterface
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def remove_duplicate_interfaces(
|
|
15
|
-
interfaces: List[PymatgenInterface], strain_mode: StrainModes = StrainModes.mean_abs_strain
|
|
16
|
-
):
|
|
17
|
-
def are_interfaces_duplicate(interface1: PymatgenInterface, interface2: PymatgenInterface):
|
|
18
|
-
are_sizes_equivalent = interface1.num_sites == interface2.num_sites and np.allclose(
|
|
19
|
-
interface1.interface_properties[strain_mode], interface2.interface_properties[strain_mode]
|
|
20
|
-
)
|
|
21
|
-
are_strains_equivalent = np.allclose(
|
|
22
|
-
interface1.interface_properties[strain_mode], interface2.interface_properties[strain_mode]
|
|
23
|
-
)
|
|
24
|
-
return are_sizes_equivalent and are_strains_equivalent
|
|
25
|
-
|
|
26
|
-
filtered_interfaces = [interfaces[0]] if interfaces else []
|
|
27
|
-
|
|
28
|
-
for interface in interfaces[1:]:
|
|
29
|
-
if not any(are_interfaces_duplicate(interface, unique_interface) for unique_interface in filtered_interfaces):
|
|
30
|
-
filtered_interfaces.append(interface)
|
|
31
|
-
return filtered_interfaces
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def get_slab(interface: Material, part: str = "film"):
|
|
35
|
-
try:
|
|
36
|
-
return filter_by_label(interface, INTERFACE_LABELS_MAP[part])
|
|
37
|
-
except ValueError:
|
|
38
|
-
raise ValueError(f"Material does not contain label for {part}.")
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def get_optimal_film_displacement(
|
|
42
|
-
material: Union[Material, MaterialWithBuildMetadata],
|
|
43
|
-
calculator,
|
|
44
|
-
grid_size_xy: Tuple[int, int] = (10, 10),
|
|
45
|
-
grid_offset_position: List[float] = [0, 0],
|
|
46
|
-
grid_range_x=(-0.5, 0.5),
|
|
47
|
-
grid_range_y=(-0.5, 0.5),
|
|
48
|
-
use_cartesian_coordinates=False,
|
|
49
|
-
):
|
|
50
|
-
"""
|
|
51
|
-
Calculate the optimal displacement in of the film to minimize the interaction energy
|
|
52
|
-
between the film and the substrate. The displacement is calculated on a grid.
|
|
53
|
-
|
|
54
|
-
This function evaluates the interaction energy between the film and substrate
|
|
55
|
-
over a specified grid of (x,y) displacements. It returns the displacement vector that
|
|
56
|
-
results in the minimum interaction energy.
|
|
57
|
-
|
|
58
|
-
Args:
|
|
59
|
-
material (Material): The interface Material object.
|
|
60
|
-
grid_size_xy (Tuple[int, int]): The size of the grid to search for the optimal displacement.
|
|
61
|
-
grid_offset_position (List[float]): The offset position of the grid.
|
|
62
|
-
grid_range_x (Tuple[float, float]): The range of the grid in x.
|
|
63
|
-
grid_range_y (Tuple[float, float]): The range of the grid in y.
|
|
64
|
-
use_cartesian_coordinates (bool): Whether to use Cartesian coordinates.
|
|
65
|
-
calculator: The calculator to use for the calculation of the interaction energy.
|
|
66
|
-
|
|
67
|
-
Returns:
|
|
68
|
-
List[float]: The optimal displacement vector.
|
|
69
|
-
|
|
70
|
-
"""
|
|
71
|
-
xy_matrix, results_matrix = evaluate_calculator_on_xy_grid(
|
|
72
|
-
material=material,
|
|
73
|
-
calculator_function=calculator.get_energy,
|
|
74
|
-
modifier=interface_displace_part,
|
|
75
|
-
modifier_parameters={},
|
|
76
|
-
grid_size_xy=grid_size_xy,
|
|
77
|
-
grid_offset_position=grid_offset_position,
|
|
78
|
-
grid_range_x=grid_range_x,
|
|
79
|
-
grid_range_y=grid_range_y,
|
|
80
|
-
use_cartesian_coordinates=use_cartesian_coordinates,
|
|
81
|
-
)
|
|
82
|
-
min_index = np.unravel_index(np.argmin(results_matrix), results_matrix.shape)
|
|
83
|
-
|
|
84
|
-
optimal_x = xy_matrix[0][min_index[0]]
|
|
85
|
-
optimal_y = xy_matrix[1][min_index[1]]
|
|
86
|
-
|
|
87
|
-
return [optimal_x, optimal_y, 0]
|
|
@@ -1,129 +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 ......analyze.interface import ZSLInterfaceAnalyzer
|
|
7
|
-
from ......analyze.lattice import get_material_with_conventional_lattice
|
|
8
|
-
from ......analyze.slab import SlabMaterialAnalyzer
|
|
9
|
-
from ......build.compound_pristine_structures.two_dimensional.interface import (
|
|
10
|
-
InterfaceBuilderParameters,
|
|
11
|
-
InterfaceBuilder,
|
|
12
|
-
InterfaceConfiguration,
|
|
13
|
-
)
|
|
14
|
-
from mat3ra.made.tools.build.pristine_structures.two_dimensional.slab.helpers import create_slab
|
|
15
|
-
from ......build_components import MaterialWithBuildMetadata
|
|
16
|
-
from ......build_components.entities.core.two_dimensional.vacuum.configuration import VacuumConfiguration
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def create_interface_zsl(
|
|
20
|
-
substrate_crystal: Union[Material, MaterialWithBuildMetadata],
|
|
21
|
-
film_crystal: Union[Material, MaterialWithBuildMetadata],
|
|
22
|
-
substrate_miller_indices: Tuple[int, int, int] = (0, 0, 1),
|
|
23
|
-
film_miller_indices: Tuple[int, int, int] = (0, 0, 1),
|
|
24
|
-
substrate_number_of_layers: int = 1,
|
|
25
|
-
film_number_of_layers: int = 1,
|
|
26
|
-
substrate_termination_formula: Optional[str] = None,
|
|
27
|
-
film_termination_formula: Optional[str] = None,
|
|
28
|
-
gap: Optional[float] = None,
|
|
29
|
-
vacuum: float = 10.0,
|
|
30
|
-
xy_shift: List[float] = [0, 0],
|
|
31
|
-
max_area: float = 50.0,
|
|
32
|
-
match_id: int = 0,
|
|
33
|
-
max_area_ratio_tol: float = 0.09,
|
|
34
|
-
max_length_tol: float = 0.03,
|
|
35
|
-
max_angle_tol: float = 0.01,
|
|
36
|
-
use_conventional_cell: bool = True,
|
|
37
|
-
reduce_result_cell: bool = True,
|
|
38
|
-
reduce_result_cell_to_primitive: bool = False,
|
|
39
|
-
) -> MaterialWithBuildMetadata:
|
|
40
|
-
if use_conventional_cell:
|
|
41
|
-
substrate_crystal = get_material_with_conventional_lattice(substrate_crystal)
|
|
42
|
-
film_crystal = get_material_with_conventional_lattice(film_crystal)
|
|
43
|
-
|
|
44
|
-
substrate_slab = create_slab(
|
|
45
|
-
crystal=substrate_crystal,
|
|
46
|
-
miller_indices=substrate_miller_indices,
|
|
47
|
-
number_of_layers=substrate_number_of_layers,
|
|
48
|
-
vacuum=0,
|
|
49
|
-
termination_bottom_formula=substrate_termination_formula,
|
|
50
|
-
use_conventional_cell=use_conventional_cell,
|
|
51
|
-
)
|
|
52
|
-
film_slab = create_slab(
|
|
53
|
-
crystal=film_crystal,
|
|
54
|
-
miller_indices=film_miller_indices,
|
|
55
|
-
number_of_layers=film_number_of_layers,
|
|
56
|
-
vacuum=0,
|
|
57
|
-
termination_top_formula=film_termination_formula,
|
|
58
|
-
use_conventional_cell=use_conventional_cell,
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
return create_interface_zsl_between_slabs(
|
|
62
|
-
substrate_slab=substrate_slab,
|
|
63
|
-
film_slab=film_slab,
|
|
64
|
-
gap=gap,
|
|
65
|
-
vacuum=vacuum,
|
|
66
|
-
xy_shift=xy_shift,
|
|
67
|
-
max_area=max_area,
|
|
68
|
-
max_area_ratio_tol=max_area_ratio_tol,
|
|
69
|
-
max_length_tol=max_length_tol,
|
|
70
|
-
max_angle_tol=max_angle_tol,
|
|
71
|
-
match_id=match_id,
|
|
72
|
-
reduce_result_cell=reduce_result_cell,
|
|
73
|
-
reduce_result_cell_to_primitive=reduce_result_cell_to_primitive,
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
def create_interface_zsl_between_slabs(
|
|
78
|
-
substrate_slab: MaterialWithBuildMetadata,
|
|
79
|
-
film_slab: MaterialWithBuildMetadata,
|
|
80
|
-
gap: Optional[float] = None,
|
|
81
|
-
vacuum: float = 10.0,
|
|
82
|
-
xy_shift: Optional[List[float]] = None,
|
|
83
|
-
max_area: float = 200.0,
|
|
84
|
-
max_area_ratio_tol: float = 0.1,
|
|
85
|
-
max_length_tol: float = 0.03,
|
|
86
|
-
max_angle_tol: float = 0.01,
|
|
87
|
-
match_id: int = 0,
|
|
88
|
-
reduce_result_cell: bool = True,
|
|
89
|
-
reduce_result_cell_to_primitive: bool = False,
|
|
90
|
-
) -> MaterialWithBuildMetadata:
|
|
91
|
-
if xy_shift is None:
|
|
92
|
-
xy_shift = [0, 0]
|
|
93
|
-
|
|
94
|
-
substrate_slab_config = SlabMaterialAnalyzer(material=substrate_slab).build_configuration
|
|
95
|
-
film_slab_config = SlabMaterialAnalyzer(material=film_slab).build_configuration
|
|
96
|
-
|
|
97
|
-
analyzer = ZSLInterfaceAnalyzer(
|
|
98
|
-
substrate_slab_configuration=substrate_slab_config,
|
|
99
|
-
film_slab_configuration=film_slab_config,
|
|
100
|
-
max_area=max_area,
|
|
101
|
-
max_area_ratio_tol=max_area_ratio_tol,
|
|
102
|
-
max_length_tol=max_length_tol,
|
|
103
|
-
max_angle_tol=max_angle_tol,
|
|
104
|
-
reduce_result_cell=reduce_result_cell,
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
interface_configurations = analyzer.get_strained_configurations()
|
|
108
|
-
if not interface_configurations:
|
|
109
|
-
raise ValueError("No ZSL match found for the given parameters.")
|
|
110
|
-
|
|
111
|
-
if match_id >= len(interface_configurations):
|
|
112
|
-
raise IndexError(f"match_id {match_id} is out of bounds for {len(interface_configurations)} matches found.")
|
|
113
|
-
|
|
114
|
-
selected_config = interface_configurations[match_id]
|
|
115
|
-
|
|
116
|
-
vacuum_configuration = VacuumConfiguration(size=vacuum)
|
|
117
|
-
stack_components = [
|
|
118
|
-
selected_config.substrate_configuration,
|
|
119
|
-
selected_config.film_configuration,
|
|
120
|
-
vacuum_configuration,
|
|
121
|
-
]
|
|
122
|
-
|
|
123
|
-
interface_config = InterfaceConfiguration(
|
|
124
|
-
stack_components=stack_components, gaps=ArrayWithIds.from_values([gap, gap]), xy_shift=xy_shift
|
|
125
|
-
)
|
|
126
|
-
builder = InterfaceBuilder(
|
|
127
|
-
build_parameters=InterfaceBuilderParameters(make_primitive=reduce_result_cell_to_primitive)
|
|
128
|
-
)
|
|
129
|
-
return builder.get_material(interface_config)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
from typing import Optional
|
|
2
|
-
|
|
3
|
-
from ....compound_pristine_structures.two_dimensional.interface import InterfaceBuilderParameters
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class GrainBoundaryLinearBuilderParameters(InterfaceBuilderParameters):
|
|
7
|
-
max_supercell_matrix_int: Optional[int] = None
|
|
8
|
-
limit_max_int: Optional[int] = 30
|
|
9
|
-
angle_tolerance: float = 0.1
|
|
10
|
-
return_first_match: bool = False
|
|
11
|
-
edge_inclusion_tolerance: float = 1.0
|
|
12
|
-
distance_tolerance: float = 1.0
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
from .build_parameters import GrainBoundaryLinearBuilderParameters
|
|
2
|
-
from .configuration import GrainBoundaryLinearConfiguration
|
|
3
|
-
from ....compound_pristine_structures.two_dimensional.interface import InterfaceBuilder
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class GrainBoundaryLinearBuilder(InterfaceBuilder):
|
|
7
|
-
"""
|
|
8
|
-
Creates a linear grain boundary by stacking two materials along x or y direction.
|
|
9
|
-
"""
|
|
10
|
-
|
|
11
|
-
_ConfigurationType = GrainBoundaryLinearConfiguration
|
|
12
|
-
_BuildParametersType = GrainBoundaryLinearBuilderParameters
|
|
13
|
-
_DefaultBuildParameters = GrainBoundaryLinearBuilderParameters()
|
|
14
|
-
|
|
15
|
-
def get_name_suffix(self, configuration: GrainBoundaryLinearConfiguration) -> str:
|
|
16
|
-
angle_str = f"{configuration.actual_angle:.2f} degrees" if configuration.actual_angle is not None else ""
|
|
17
|
-
return f"Linear Grain Boundary, {angle_str}"
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
from typing import Optional
|
|
2
|
-
|
|
3
|
-
from mat3ra.esse.models.core.reusable.axis_enum import AxisEnum
|
|
4
|
-
# fmt: off
|
|
5
|
-
from mat3ra.esse.models.materials_category.defective_structures.one_dimensional. \
|
|
6
|
-
grain_boundary_linear.configuration import GrainBoundaryLinearConfigurationSchema
|
|
7
|
-
|
|
8
|
-
# fmt: on
|
|
9
|
-
from ....compound_pristine_structures.two_dimensional.interface import InterfaceConfiguration
|
|
10
|
-
from mat3ra.made.tools.build.pristine_structures.two_dimensional.slab.configuration import SlabConfiguration
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class GrainBoundaryLinearConfiguration(InterfaceConfiguration, GrainBoundaryLinearConfigurationSchema):
|
|
14
|
-
"""
|
|
15
|
-
Configuration for creating a linear grain boundary.
|
|
16
|
-
|
|
17
|
-
Args:
|
|
18
|
-
stack_components (: of configuration objects for grain boundary components.
|
|
19
|
-
direction (AxisEnum): Direction along which to stack components (x or y).
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
|
-
type: str = "GrainBoundaryLinearConfiguration"
|
|
23
|
-
direction: AxisEnum = AxisEnum.x
|
|
24
|
-
actual_angle: Optional[float] = None
|
|
25
|
-
|
|
26
|
-
@property
|
|
27
|
-
def phase_1_configuration(self) -> SlabConfiguration:
|
|
28
|
-
return self.stack_components[0]
|
|
29
|
-
|
|
30
|
-
@property
|
|
31
|
-
def phase_2_configuration(self) -> SlabConfiguration:
|
|
32
|
-
return self.stack_components[1]
|
|
33
|
-
|
|
34
|
-
@property
|
|
35
|
-
def substrate_configuration(self) -> SlabConfiguration:
|
|
36
|
-
return self.phase_1_configuration
|
|
37
|
-
|
|
38
|
-
@property
|
|
39
|
-
def film_configuration(self) -> SlabConfiguration:
|
|
40
|
-
return self.phase_2_configuration
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
from typing import Optional, Tuple, Union
|
|
2
|
-
|
|
3
|
-
from mat3ra.code.array_with_ids import ArrayWithIds
|
|
4
|
-
from mat3ra.esse.models.core.reusable.axis_enum import AxisEnum
|
|
5
|
-
|
|
6
|
-
from mat3ra.made.material import Material
|
|
7
|
-
from .builder import GrainBoundaryLinearBuilder
|
|
8
|
-
from .configuration import GrainBoundaryLinearConfiguration
|
|
9
|
-
from ....compound_pristine_structures.two_dimensional.interface import get_commensurate_strained_configurations
|
|
10
|
-
from .....analyze.lattice import get_material_with_conventional_lattice
|
|
11
|
-
from .....build_components import MaterialWithBuildMetadata
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def create_grain_boundary_linear(
|
|
15
|
-
material: Union[Material, MaterialWithBuildMetadata],
|
|
16
|
-
target_angle: float = 0.0,
|
|
17
|
-
angle_tolerance: float = 0.1,
|
|
18
|
-
max_repetition_int: Optional[int] = None,
|
|
19
|
-
limit_max_int: int = 20,
|
|
20
|
-
return_first_match: bool = True,
|
|
21
|
-
direction: AxisEnum = AxisEnum.x,
|
|
22
|
-
gap: float = 3.0,
|
|
23
|
-
miller_indices: Tuple[int, int, int] = (0, 0, 1),
|
|
24
|
-
number_of_layers: int = 1,
|
|
25
|
-
vacuum: float = 0.0,
|
|
26
|
-
use_conventional_cell: bool = True,
|
|
27
|
-
) -> Material:
|
|
28
|
-
"""
|
|
29
|
-
Create a linear grain boundary from a material with specified twist angle.
|
|
30
|
-
|
|
31
|
-
This function creates a grain boundary by:
|
|
32
|
-
1. Creating a slab configuration from the material
|
|
33
|
-
2. Finding commensurate lattice matches at the target angle using CommensurateLatticeInterfaceAnalyzer
|
|
34
|
-
3. Creating strained configurations with directional gaps for both phases
|
|
35
|
-
4. Stacking them along the specified direction
|
|
36
|
-
|
|
37
|
-
Args:
|
|
38
|
-
material (Material): The material to create the grain boundary from.
|
|
39
|
-
target_angle (float): The target twist angle in degrees.
|
|
40
|
-
angle_tolerance (float): Tolerance for matching angles in degrees.
|
|
41
|
-
max_repetition_int (Optional[int]): Maximum integer for supercell matrix elements.
|
|
42
|
-
limit_max_int (int): Limit for maximum integer to search for supercell matrices.
|
|
43
|
-
return_first_match (bool): Whether to return the first match or all matches.
|
|
44
|
-
direction (AxisEnum): Direction along which to stack components (x or y).
|
|
45
|
-
gap (float): The gap between the two phases in Angstroms.
|
|
46
|
-
miller_indices (Tuple[int, int, int]): Miller indices for the slab surface.
|
|
47
|
-
number_of_layers (int): Number of atomic layers in the slab.
|
|
48
|
-
vacuum (float): Size of the vacuum layer in Angstroms.
|
|
49
|
-
|
|
50
|
-
Returns:
|
|
51
|
-
Material: The grain boundary material.
|
|
52
|
-
|
|
53
|
-
Raises:
|
|
54
|
-
ValueError: If no commensurate lattice matches are found.
|
|
55
|
-
"""
|
|
56
|
-
if use_conventional_cell:
|
|
57
|
-
material = get_material_with_conventional_lattice(material)
|
|
58
|
-
|
|
59
|
-
strained_configs, actual_angle = get_commensurate_strained_configurations(
|
|
60
|
-
material=material,
|
|
61
|
-
target_angle=target_angle,
|
|
62
|
-
angle_tolerance=angle_tolerance,
|
|
63
|
-
max_repetition_int=max_repetition_int,
|
|
64
|
-
limit_max_int=limit_max_int,
|
|
65
|
-
return_first_match=return_first_match,
|
|
66
|
-
miller_indices=miller_indices,
|
|
67
|
-
number_of_layers=number_of_layers,
|
|
68
|
-
vacuum=vacuum,
|
|
69
|
-
use_conventional_cell=use_conventional_cell,
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
grain_boundary_config = GrainBoundaryLinearConfiguration(
|
|
73
|
-
stack_components=strained_configs,
|
|
74
|
-
direction=direction,
|
|
75
|
-
gaps=ArrayWithIds.from_values([gap, gap]),
|
|
76
|
-
actual_angle=actual_angle,
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
builder = GrainBoundaryLinearBuilder()
|
|
80
|
-
grain_boundary = builder.get_material(grain_boundary_config)
|
|
81
|
-
|
|
82
|
-
return grain_boundary
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|