@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,223 +0,0 @@
|
|
|
1
|
-
from types import SimpleNamespace
|
|
2
|
-
from typing import Final
|
|
3
|
-
|
|
4
|
-
import numpy as np
|
|
5
|
-
import pytest
|
|
6
|
-
from mat3ra.made.material import Material
|
|
7
|
-
from mat3ra.made.tools.analyze.interface import InterfaceAnalyzer
|
|
8
|
-
from mat3ra.made.tools.analyze.interface.commensurate import CommensurateLatticeInterfaceAnalyzer
|
|
9
|
-
from mat3ra.made.tools.analyze.interface.utils import calculate_interfacial_distance_from_rdf
|
|
10
|
-
from mat3ra.made.tools.build.pristine_structures.two_dimensional.slab import SlabConfiguration
|
|
11
|
-
from unit.fixtures.bulk import BULK_GRAPHENE, BULK_Ge_CONVENTIONAL, BULK_Si_CONVENTIONAL
|
|
12
|
-
|
|
13
|
-
from .fixtures.monolayer import GRAPHENE
|
|
14
|
-
from .utils import assert_two_entities_deep_almost_equal
|
|
15
|
-
|
|
16
|
-
SUBSTRATE_SI_001: Final = SimpleNamespace(
|
|
17
|
-
bulk_config=BULK_Si_CONVENTIONAL,
|
|
18
|
-
miller_indices=(0, 0, 1),
|
|
19
|
-
number_of_layers=2,
|
|
20
|
-
vacuum=0.0,
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
FILM_GE_001: Final = SimpleNamespace(
|
|
24
|
-
bulk_config=BULK_Ge_CONVENTIONAL,
|
|
25
|
-
miller_indices=(0, 0, 1),
|
|
26
|
-
number_of_layers=2,
|
|
27
|
-
vacuum=0.0,
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
EXPECTED_PROPERTIES_SI_GE_001: Final = SimpleNamespace(
|
|
31
|
-
substrate_strain_matrix=np.identity(3).tolist(),
|
|
32
|
-
substrate_supercell_matrix=[[1.0, 0.0], [0.0, 1.0]],
|
|
33
|
-
film_strain_matrix=[[0.9643, 0.0, 0.0], [0.0, 0.9643, 0.0], [0.0, 0.0, 1.0]],
|
|
34
|
-
film_supercell_matrix=[[1.0, 0.0], [0.0, 1.0]],
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
TEST_CASES = [(SUBSTRATE_SI_001, FILM_GE_001, EXPECTED_PROPERTIES_SI_GE_001)]
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
SUBSTRATE_SI_111: Final = SimpleNamespace(
|
|
41
|
-
bulk_config=BULK_Si_CONVENTIONAL,
|
|
42
|
-
miller_indices=(1, 1, 1),
|
|
43
|
-
number_of_layers=2,
|
|
44
|
-
vacuum=0.0,
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
FILM_GRAPHENE_001: Final = SimpleNamespace(
|
|
48
|
-
bulk_config=BULK_GRAPHENE,
|
|
49
|
-
miller_indices=(0, 0, 1),
|
|
50
|
-
number_of_layers=1,
|
|
51
|
-
vacuum=0.0,
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
OPTIMAL_SUPERCELL_TEST_CASES = [
|
|
55
|
-
(SUBSTRATE_SI_111, FILM_GRAPHENE_001, 4, 4), # n, m
|
|
56
|
-
]
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
@pytest.mark.parametrize("substrate, film, expected", TEST_CASES)
|
|
60
|
-
def test_interface_analyzer(substrate, film, expected):
|
|
61
|
-
substrate_slab_config = SlabConfiguration.from_parameters(
|
|
62
|
-
substrate.bulk_config,
|
|
63
|
-
substrate.miller_indices,
|
|
64
|
-
substrate.number_of_layers,
|
|
65
|
-
vacuum=substrate.vacuum,
|
|
66
|
-
termination_top_formula=None,
|
|
67
|
-
termination_bottom_formula=None,
|
|
68
|
-
)
|
|
69
|
-
film_slab_config = SlabConfiguration.from_parameters(
|
|
70
|
-
film.bulk_config,
|
|
71
|
-
film.miller_indices,
|
|
72
|
-
film.number_of_layers,
|
|
73
|
-
vacuum=film.vacuum,
|
|
74
|
-
termination_top_formula=None,
|
|
75
|
-
termination_bottom_formula=None,
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
interface_analyzer = InterfaceAnalyzer(
|
|
79
|
-
substrate_slab_configuration=substrate_slab_config,
|
|
80
|
-
film_slab_configuration=film_slab_config,
|
|
81
|
-
)
|
|
82
|
-
|
|
83
|
-
assert_two_entities_deep_almost_equal(
|
|
84
|
-
interface_analyzer.get_substrate_strain_matrix().root, expected.substrate_strain_matrix
|
|
85
|
-
)
|
|
86
|
-
assert_two_entities_deep_almost_equal(
|
|
87
|
-
interface_analyzer.film_strained_configuration.strain_matrix.root, expected.film_strain_matrix, atol=1e-4
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
# Test strain matrix calculation using vectors from substrate and film
|
|
91
|
-
substrate_vectors = np.array(interface_analyzer.substrate_material.lattice.vector_arrays)
|
|
92
|
-
film_vectors = np.array(interface_analyzer.film_material.lattice.vector_arrays)
|
|
93
|
-
|
|
94
|
-
strain_matrix_3d = interface_analyzer.get_film_strain_matrix(substrate_vectors, film_vectors)
|
|
95
|
-
|
|
96
|
-
matrix = [row.root for row in strain_matrix_3d.root]
|
|
97
|
-
strain_matrix_2d = np.array(matrix)[:2, :2]
|
|
98
|
-
|
|
99
|
-
# Verify that strain applied to film vectors yields substrate vectors
|
|
100
|
-
film_2d = film_vectors[:2, :2]
|
|
101
|
-
substrate_2d = substrate_vectors[:2, :2]
|
|
102
|
-
film_strained = film_2d @ strain_matrix_2d
|
|
103
|
-
|
|
104
|
-
assert np.allclose(film_strained, substrate_2d, atol=1e-10)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
@pytest.mark.parametrize(
|
|
108
|
-
"material_config, analyzer_params, expected_matches_len, expected_angle_range",
|
|
109
|
-
[
|
|
110
|
-
(
|
|
111
|
-
GRAPHENE,
|
|
112
|
-
{"target_angle": 13.0, "angle_tolerance": 0.5, "max_supercell_matrix_int": 5, "return_first_match": True},
|
|
113
|
-
1,
|
|
114
|
-
(12.5, 13.5),
|
|
115
|
-
)
|
|
116
|
-
],
|
|
117
|
-
)
|
|
118
|
-
def test_commensurate_analyzer_functionality(
|
|
119
|
-
material_config, analyzer_params, expected_matches_len, expected_angle_range
|
|
120
|
-
):
|
|
121
|
-
slab_config = SlabConfiguration.from_parameters(
|
|
122
|
-
material_config,
|
|
123
|
-
miller_indices=(0, 0, 1),
|
|
124
|
-
number_of_layers=1,
|
|
125
|
-
vacuum=0.0,
|
|
126
|
-
termination_top_formula=None,
|
|
127
|
-
termination_bottom_formula=None,
|
|
128
|
-
)
|
|
129
|
-
|
|
130
|
-
analyzer = CommensurateLatticeInterfaceAnalyzer(substrate_slab_configuration=slab_config, **analyzer_params)
|
|
131
|
-
|
|
132
|
-
assert analyzer.substrate_material == analyzer.film_material == analyzer.material
|
|
133
|
-
|
|
134
|
-
match_holders = analyzer.commensurate_lattice_match_holders
|
|
135
|
-
assert len(match_holders) >= expected_matches_len
|
|
136
|
-
|
|
137
|
-
for match in match_holders:
|
|
138
|
-
assert expected_angle_range[0] <= match.angle <= expected_angle_range[1]
|
|
139
|
-
assert expected_angle_range[0] <= match.actual_angle <= expected_angle_range[1]
|
|
140
|
-
assert match.angle == match.actual_angle
|
|
141
|
-
assert isinstance(match.xy_supercell_matrix_film, list)
|
|
142
|
-
assert isinstance(match.xy_supercell_matrix_substrate, list)
|
|
143
|
-
assert len(match.xy_supercell_matrix_film) == 2
|
|
144
|
-
assert len(match.xy_supercell_matrix_substrate) == 2
|
|
145
|
-
assert isinstance(match.match_id, int)
|
|
146
|
-
assert match.match_id >= 0
|
|
147
|
-
|
|
148
|
-
interface_configurations = analyzer.get_strained_configurations()
|
|
149
|
-
assert len(interface_configurations) == len(match_holders)
|
|
150
|
-
|
|
151
|
-
if len(match_holders) > 0:
|
|
152
|
-
selected_config = analyzer.get_strained_configuration_by_match_id(0)
|
|
153
|
-
assert selected_config.match_id == 0
|
|
154
|
-
assert hasattr(selected_config, "substrate_configuration")
|
|
155
|
-
assert hasattr(selected_config, "film_configuration")
|
|
156
|
-
|
|
157
|
-
assert selected_config.substrate_configuration.stack_components == slab_config.stack_components
|
|
158
|
-
assert selected_config.film_configuration.stack_components == slab_config.stack_components
|
|
159
|
-
|
|
160
|
-
# Test invalid match ID
|
|
161
|
-
with pytest.raises(ValueError, match="Match ID .* out of range"):
|
|
162
|
-
analyzer.get_strained_configuration_by_match_id(999)
|
|
163
|
-
|
|
164
|
-
# Test negative match ID
|
|
165
|
-
with pytest.raises(ValueError, match="Match ID .* out of range"):
|
|
166
|
-
analyzer.get_strained_configuration_by_match_id(-1)
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
@pytest.mark.parametrize("substrate, film, expected_n, expected_m", OPTIMAL_SUPERCELL_TEST_CASES)
|
|
170
|
-
def test_optimal_supercell_functions(substrate, film, expected_n, expected_m):
|
|
171
|
-
"""Test the optimal supercell functions with Si/Ge fixtures."""
|
|
172
|
-
substrate_slab_config = SlabConfiguration.from_parameters(
|
|
173
|
-
substrate.bulk_config,
|
|
174
|
-
substrate.miller_indices,
|
|
175
|
-
substrate.number_of_layers,
|
|
176
|
-
vacuum=substrate.vacuum,
|
|
177
|
-
termination_top_formula=None,
|
|
178
|
-
termination_bottom_formula=None,
|
|
179
|
-
)
|
|
180
|
-
film_slab_config = SlabConfiguration.from_parameters(
|
|
181
|
-
film.bulk_config,
|
|
182
|
-
film.miller_indices,
|
|
183
|
-
film.number_of_layers,
|
|
184
|
-
vacuum=film.vacuum,
|
|
185
|
-
termination_top_formula=None,
|
|
186
|
-
termination_bottom_formula=None,
|
|
187
|
-
)
|
|
188
|
-
|
|
189
|
-
analyzer = InterfaceAnalyzer(
|
|
190
|
-
substrate_slab_configuration=substrate_slab_config,
|
|
191
|
-
film_slab_configuration=film_slab_config,
|
|
192
|
-
optimize_film_supercell=True,
|
|
193
|
-
)
|
|
194
|
-
|
|
195
|
-
# Test find_optimal_film_supercell
|
|
196
|
-
optimal_n, optimal_m = analyzer.find_optimal_film_supercell()
|
|
197
|
-
|
|
198
|
-
assert optimal_n == expected_n
|
|
199
|
-
assert optimal_m == expected_m
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
@pytest.mark.parametrize(
|
|
203
|
-
"substrate_config, film_config, expected_distance_range",
|
|
204
|
-
[
|
|
205
|
-
(BULK_Si_CONVENTIONAL, BULK_Si_CONVENTIONAL, (3.8, 3.9)),
|
|
206
|
-
(BULK_Si_CONVENTIONAL, BULK_Ge_CONVENTIONAL, (3.1, 3.2)),
|
|
207
|
-
],
|
|
208
|
-
)
|
|
209
|
-
def test_calculate_interfacial_distance_from_rdf(substrate_config, film_config, expected_distance_range):
|
|
210
|
-
"""Test RDF-based interfacial distance calculation with different material types."""
|
|
211
|
-
substrate_material = Material.create(substrate_config)
|
|
212
|
-
film_material = Material.create(film_config)
|
|
213
|
-
|
|
214
|
-
distance = calculate_interfacial_distance_from_rdf(
|
|
215
|
-
substrate_material=substrate_material,
|
|
216
|
-
film_material=film_material,
|
|
217
|
-
rdf_cutoff=10.0,
|
|
218
|
-
rdf_bin_size=0.1,
|
|
219
|
-
supercell_size=(3, 3, 3),
|
|
220
|
-
)
|
|
221
|
-
|
|
222
|
-
assert isinstance(distance, float)
|
|
223
|
-
assert expected_distance_range[0] <= distance <= expected_distance_range[1]
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
from typing import Final, Type
|
|
2
|
-
|
|
3
|
-
import pytest
|
|
4
|
-
from mat3ra.made.tools.analyze.build_metadata_analyzer import BuildMetadataAnalyzer
|
|
5
|
-
from mat3ra.made.tools.analyze.build_metadata_analyzer_factory import create_build_metadata_analyzer
|
|
6
|
-
from mat3ra.made.tools.analyze.interface_material import (
|
|
7
|
-
InterfaceMaterialAnalyzer,
|
|
8
|
-
get_interface_bulk_crystal,
|
|
9
|
-
get_interface_configuration,
|
|
10
|
-
)
|
|
11
|
-
from mat3ra.made.tools.analyze.slab import SlabMaterialAnalyzer
|
|
12
|
-
from mat3ra.made.tools.build import MaterialWithBuildMetadata
|
|
13
|
-
from mat3ra.made.tools.build.compound_pristine_structures.two_dimensional.interface import InterfaceConfiguration
|
|
14
|
-
from unit.fixtures.interface.zsl import GRAPHENE_NICKEL_INTERFACE
|
|
15
|
-
from unit.fixtures.slab import SI_CONVENTIONAL_SLAB_001
|
|
16
|
-
|
|
17
|
-
INTERFACE_MATERIAL: Final = MaterialWithBuildMetadata.create(GRAPHENE_NICKEL_INTERFACE)
|
|
18
|
-
SLAB_MATERIAL: Final = MaterialWithBuildMetadata.create(SI_CONVENTIONAL_SLAB_001)
|
|
19
|
-
SUBSTRATE_CRYSTAL_NAME: Final = "Ni, Nickel, FCC (Fm-3m) 3D (Bulk), mp-23"
|
|
20
|
-
FILM_CRYSTAL_NAME: Final = "Graphene"
|
|
21
|
-
|
|
22
|
-
GET_BULK_CRYSTAL_CASES = [
|
|
23
|
-
("substrate", SUBSTRATE_CRYSTAL_NAME),
|
|
24
|
-
("film", FILM_CRYSTAL_NAME),
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
CREATE_BUILD_METADATA_ANALYZER_CASES = [
|
|
28
|
-
(INTERFACE_MATERIAL, InterfaceMaterialAnalyzer),
|
|
29
|
-
(SLAB_MATERIAL, SlabMaterialAnalyzer),
|
|
30
|
-
]
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
def test_build_configuration():
|
|
34
|
-
configuration = InterfaceMaterialAnalyzer(material=INTERFACE_MATERIAL).build_configuration
|
|
35
|
-
assert isinstance(configuration, InterfaceConfiguration)
|
|
36
|
-
assert configuration.type == "InterfaceConfiguration"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
@pytest.mark.parametrize("part,expected_name", GET_BULK_CRYSTAL_CASES)
|
|
40
|
-
def test_get_bulk_crystal(part, expected_name):
|
|
41
|
-
crystal = InterfaceMaterialAnalyzer(material=INTERFACE_MATERIAL).get_bulk_crystal(part=part)
|
|
42
|
-
assert crystal["name"] == expected_name
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
def test_get_interface_configuration():
|
|
46
|
-
configuration = get_interface_configuration(INTERFACE_MATERIAL)
|
|
47
|
-
assert isinstance(configuration, InterfaceConfiguration)
|
|
48
|
-
assert configuration.type == "InterfaceConfiguration"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
@pytest.mark.parametrize("part,expected_name", GET_BULK_CRYSTAL_CASES)
|
|
52
|
-
def test_get_interface_bulk_crystal(part, expected_name):
|
|
53
|
-
crystal = get_interface_bulk_crystal(INTERFACE_MATERIAL, part=part)
|
|
54
|
-
assert crystal["name"] == expected_name
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
@pytest.mark.parametrize("material,expected_analyzer_cls", CREATE_BUILD_METADATA_ANALYZER_CASES)
|
|
58
|
-
def test_create_build_metadata_analyzer(
|
|
59
|
-
material: MaterialWithBuildMetadata,
|
|
60
|
-
expected_analyzer_cls: Type[BuildMetadataAnalyzer],
|
|
61
|
-
):
|
|
62
|
-
analyzer = create_build_metadata_analyzer(material)
|
|
63
|
-
assert isinstance(analyzer, expected_analyzer_cls)
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
from types import SimpleNamespace
|
|
2
|
-
from typing import Final
|
|
3
|
-
|
|
4
|
-
import numpy as np
|
|
5
|
-
import pytest
|
|
6
|
-
from mat3ra.made.tools.analyze.interface.zsl import ZSLInterfaceAnalyzer
|
|
7
|
-
from mat3ra.made.tools.build.pristine_structures.two_dimensional.slab import SlabConfiguration
|
|
8
|
-
from mat3ra.made.tools.build.pristine_structures.two_dimensional.slab_strained_supercell.builder import (
|
|
9
|
-
SlabStrainedSupercellBuilder,
|
|
10
|
-
)
|
|
11
|
-
from mat3ra.made.tools.utils import supercell_matrix_2d_schema_to_list, unwrap
|
|
12
|
-
from mat3ra.utils.matrix import convert_2x2_to_3x3
|
|
13
|
-
from unit.fixtures.bulk import BULK_Ge_CONVENTIONAL, BULK_Ni_PRIMITIVE, BULK_Si_CONVENTIONAL
|
|
14
|
-
|
|
15
|
-
from .fixtures.monolayer import GRAPHENE
|
|
16
|
-
from .utils import OSPlatform, get_platform_specific_value
|
|
17
|
-
|
|
18
|
-
SUBSTRATE_SI_001: Final = SimpleNamespace(
|
|
19
|
-
bulk_config=BULK_Si_CONVENTIONAL,
|
|
20
|
-
miller_indices=(0, 0, 1),
|
|
21
|
-
number_of_layers=2,
|
|
22
|
-
vacuum=0.0,
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
FILM_GE_001: Final = SimpleNamespace(
|
|
26
|
-
bulk_config=BULK_Ge_CONVENTIONAL,
|
|
27
|
-
miller_indices=(0, 0, 1),
|
|
28
|
-
number_of_layers=2,
|
|
29
|
-
vacuum=0.0,
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
EXPECTED_PROPERTIES_SI_GE_001: Final = SimpleNamespace(
|
|
33
|
-
substrate_strain_matrix=np.identity(3).tolist(),
|
|
34
|
-
substrate_supercell_matrix=[[1.0, 0.0], [0.0, 1.0]],
|
|
35
|
-
film_strain_matrix=[[0.9643, 0.0, 0.0], [0.0, 0.9643, 0.0], [0.0, 0.0, 1.0]],
|
|
36
|
-
film_supercell_matrix=[[1.0, 0.0], [0.0, 1.0]],
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
@pytest.mark.parametrize(
|
|
41
|
-
"substrate, film, zsl_params, expected_matches_min",
|
|
42
|
-
[
|
|
43
|
-
(
|
|
44
|
-
SUBSTRATE_SI_001,
|
|
45
|
-
FILM_GE_001,
|
|
46
|
-
{"max_area": 350.0, "max_area_ratio_tol": 0.09, "max_length_tol": 0.03, "max_angle_tol": 0.01},
|
|
47
|
-
1,
|
|
48
|
-
),
|
|
49
|
-
(
|
|
50
|
-
SimpleNamespace(
|
|
51
|
-
bulk_config=BULK_Ni_PRIMITIVE,
|
|
52
|
-
miller_indices=(0, 0, 1),
|
|
53
|
-
number_of_layers=2,
|
|
54
|
-
vacuum=0.0,
|
|
55
|
-
),
|
|
56
|
-
SimpleNamespace(
|
|
57
|
-
bulk_config=GRAPHENE,
|
|
58
|
-
miller_indices=(0, 0, 1),
|
|
59
|
-
number_of_layers=1,
|
|
60
|
-
vacuum=0.0,
|
|
61
|
-
),
|
|
62
|
-
{"max_area": 120.0, "max_area_ratio_tol": 0.09, "max_length_tol": 0.03, "max_angle_tol": 0.01},
|
|
63
|
-
1,
|
|
64
|
-
),
|
|
65
|
-
],
|
|
66
|
-
)
|
|
67
|
-
def test_zsl_interface_analyzer(substrate, film, zsl_params, expected_matches_min):
|
|
68
|
-
substrate_slab_config = SlabConfiguration.from_parameters(
|
|
69
|
-
substrate.bulk_config,
|
|
70
|
-
substrate.miller_indices,
|
|
71
|
-
substrate.number_of_layers,
|
|
72
|
-
vacuum=0.0,
|
|
73
|
-
termination_top_formula=None,
|
|
74
|
-
termination_bottom_formula=None,
|
|
75
|
-
)
|
|
76
|
-
film_slab_config = SlabConfiguration.from_parameters(
|
|
77
|
-
film.bulk_config, film.miller_indices, film.number_of_layers, vacuum=0.0
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
analyzer = ZSLInterfaceAnalyzer(
|
|
81
|
-
substrate_slab_configuration=substrate_slab_config,
|
|
82
|
-
film_slab_configuration=film_slab_config,
|
|
83
|
-
**zsl_params,
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
# Test ZSL match generation
|
|
87
|
-
match_holders = analyzer.zsl_match_holders
|
|
88
|
-
assert len(match_holders) >= expected_matches_min
|
|
89
|
-
|
|
90
|
-
match = analyzer.get_strained_configuration_by_match_id(0)
|
|
91
|
-
|
|
92
|
-
sub_config = match.substrate_configuration
|
|
93
|
-
film_config = match.film_configuration
|
|
94
|
-
|
|
95
|
-
film_vectors = np.array(analyzer.film_slab.lattice.vector_arrays)
|
|
96
|
-
substrate_vectors = np.array(analyzer.substrate_slab.lattice.vector_arrays)
|
|
97
|
-
|
|
98
|
-
film_sl_vectors = (
|
|
99
|
-
np.array(unwrap(film_config.strain_matrix.root))
|
|
100
|
-
@ np.array(convert_2x2_to_3x3(supercell_matrix_2d_schema_to_list(film_config.xy_supercell_matrix)))
|
|
101
|
-
@ film_vectors
|
|
102
|
-
)
|
|
103
|
-
substrate_sl_vectors = (
|
|
104
|
-
np.array(convert_2x2_to_3x3(supercell_matrix_2d_schema_to_list(sub_config.xy_supercell_matrix)))
|
|
105
|
-
@ substrate_vectors
|
|
106
|
-
)
|
|
107
|
-
|
|
108
|
-
substrate_material = SlabStrainedSupercellBuilder().get_material(sub_config)
|
|
109
|
-
film_material = SlabStrainedSupercellBuilder().get_material(film_config)
|
|
110
|
-
|
|
111
|
-
# Check that the lattice vectors have the same magnitudes (allowing for orientation differences)
|
|
112
|
-
film_a = np.linalg.norm(film_sl_vectors[0])
|
|
113
|
-
film_b = np.linalg.norm(film_sl_vectors[1])
|
|
114
|
-
substrate_a = np.linalg.norm(substrate_sl_vectors[0])
|
|
115
|
-
substrate_b = np.linalg.norm(substrate_sl_vectors[1])
|
|
116
|
-
|
|
117
|
-
assert np.isclose(film_a, substrate_a, atol=0.1)
|
|
118
|
-
assert np.isclose(film_b, substrate_b, atol=0.1)
|
|
119
|
-
|
|
120
|
-
# Check that the unit cell areas match
|
|
121
|
-
film_area = abs(np.cross(film_sl_vectors[0][:2], film_sl_vectors[1][:2]))
|
|
122
|
-
substrate_area = abs(np.cross(substrate_sl_vectors[0][:2], substrate_sl_vectors[1][:2]))
|
|
123
|
-
assert np.isclose(film_area, substrate_area, atol=1e-4)
|
|
124
|
-
|
|
125
|
-
assert np.isclose(substrate_material.lattice.a, film_material.lattice.a, atol=1e-4)
|
|
126
|
-
assert np.isclose(substrate_material.lattice.b, film_material.lattice.b, atol=1e-4)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
@pytest.mark.parametrize(
|
|
130
|
-
"substrate, film, zsl_parameters, expected_number_of_matches, expected_properties",
|
|
131
|
-
[
|
|
132
|
-
(
|
|
133
|
-
SimpleNamespace(
|
|
134
|
-
bulk_config=BULK_Ni_PRIMITIVE,
|
|
135
|
-
miller_indices=(1, 1, 1),
|
|
136
|
-
number_of_layers=3,
|
|
137
|
-
vacuum=0.0,
|
|
138
|
-
),
|
|
139
|
-
SimpleNamespace(
|
|
140
|
-
bulk_config=GRAPHENE,
|
|
141
|
-
miller_indices=(0, 0, 1),
|
|
142
|
-
number_of_layers=1,
|
|
143
|
-
vacuum=0.0,
|
|
144
|
-
),
|
|
145
|
-
{"max_area": 90.0, "max_area_ratio_tol": 0.1, "max_length_tol": 0.1, "max_angle_tol": 0.1},
|
|
146
|
-
{OSPlatform.DARWIN: 26, OSPlatform.OTHER: 29},
|
|
147
|
-
{
|
|
148
|
-
OSPlatform.DARWIN: {"strain_percentage": 0.474, "match_id": 0},
|
|
149
|
-
OSPlatform.OTHER: {"strain_percentage": 25.629, "match_id": 0},
|
|
150
|
-
},
|
|
151
|
-
# NOTE: the following values are expected for the DARWIN platform.
|
|
152
|
-
# {"max_area": 90.0, "max_area_ratio_tol": 0.09, "max_length_tol": 0.03, "max_angle_tol": 0.01},
|
|
153
|
-
# 31,
|
|
154
|
-
# {"strain_percentage": 25.122, "match_id": 0},
|
|
155
|
-
),
|
|
156
|
-
],
|
|
157
|
-
)
|
|
158
|
-
def test_zsl_interface_analyzer_sort_by_strain_then_area(
|
|
159
|
-
substrate, film, zsl_parameters, expected_number_of_matches, expected_properties
|
|
160
|
-
):
|
|
161
|
-
expected_number_of_matches = get_platform_specific_value(expected_number_of_matches)
|
|
162
|
-
expected_properties = get_platform_specific_value(expected_properties)
|
|
163
|
-
|
|
164
|
-
analyzer = ZSLInterfaceAnalyzer(
|
|
165
|
-
substrate_slab_configuration=SlabConfiguration.from_parameters(
|
|
166
|
-
substrate.bulk_config,
|
|
167
|
-
substrate.miller_indices,
|
|
168
|
-
substrate.number_of_layers,
|
|
169
|
-
vacuum=0.0,
|
|
170
|
-
termination_top_formula=None,
|
|
171
|
-
termination_bottom_formula=None,
|
|
172
|
-
),
|
|
173
|
-
film_slab_configuration=SlabConfiguration.from_parameters(
|
|
174
|
-
film.bulk_config, film.miller_indices, film.number_of_layers, vacuum=0.0
|
|
175
|
-
),
|
|
176
|
-
**zsl_parameters,
|
|
177
|
-
)
|
|
178
|
-
|
|
179
|
-
sorted_match_holders = analyzer.zsl_match_holders
|
|
180
|
-
|
|
181
|
-
assert len(sorted_match_holders) == expected_number_of_matches
|
|
182
|
-
|
|
183
|
-
index_to_check = expected_properties["match_id"]
|
|
184
|
-
match_to_check = sorted_match_holders[index_to_check]
|
|
185
|
-
expected_strain_percentage = expected_properties["strain_percentage"]
|
|
186
|
-
|
|
187
|
-
assert np.isclose(match_to_check.total_strain_percentage, expected_strain_percentage, atol=1e-3)
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
from mat3ra.made.material import Material
|
|
3
|
-
from mat3ra.made.tools.analyze.lattice import LatticeMaterialAnalyzer, get_lattice_type
|
|
4
|
-
|
|
5
|
-
from .fixtures.bulk import BULK_GRAPHITE, BULK_Hf2O_MCL, BULK_Si_CONVENTIONAL, BULK_Si_PRIMITIVE, BULK_Si_PRIMITIVIZED
|
|
6
|
-
from .fixtures.interface.gaas_dia import (
|
|
7
|
-
GALLIUM_ARSENIDE_DIAMOND_INTERFACE,
|
|
8
|
-
GALLIUM_ARSENIDE_DIAMOND_INTERFACE_PRIMITIVE,
|
|
9
|
-
GALLIUM_ARSENIDE_DIAMOND_INTERFACE_PRIMITIVE_GH_WF,
|
|
10
|
-
)
|
|
11
|
-
from .fixtures.interface.gr_ni_111_top_hcp import GRAPHENE_NICKEL_INTERFACE_TOP_HCP
|
|
12
|
-
from .utils import (
|
|
13
|
-
OSPlatform,
|
|
14
|
-
assert_interfaces_almost_equal,
|
|
15
|
-
assert_two_entities_deep_almost_equal,
|
|
16
|
-
get_platform_specific_value,
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
@pytest.mark.parametrize(
|
|
21
|
-
"material_config, expected_conventional_material_config, expected_primitive_material_config",
|
|
22
|
-
[
|
|
23
|
-
(BULK_Si_PRIMITIVE, BULK_Si_CONVENTIONAL, BULK_Si_PRIMITIVIZED),
|
|
24
|
-
(BULK_Si_CONVENTIONAL, BULK_Si_CONVENTIONAL, BULK_Si_PRIMITIVIZED),
|
|
25
|
-
],
|
|
26
|
-
)
|
|
27
|
-
def test_get_primitive_lattice(
|
|
28
|
-
material_config, expected_conventional_material_config, expected_primitive_material_config
|
|
29
|
-
):
|
|
30
|
-
material = Material.create(material_config)
|
|
31
|
-
lattice_material_analyzer = LatticeMaterialAnalyzer(material=material)
|
|
32
|
-
conventional_cell = lattice_material_analyzer.material_with_conventional_lattice
|
|
33
|
-
assert_two_entities_deep_almost_equal(conventional_cell, expected_conventional_material_config)
|
|
34
|
-
|
|
35
|
-
primitive_cell_generated = lattice_material_analyzer.material_with_primitive_lattice
|
|
36
|
-
assert_two_entities_deep_almost_equal(primitive_cell_generated, expected_primitive_material_config)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
@pytest.mark.parametrize(
|
|
40
|
-
"material_config, keep_orientation, expected_primitive",
|
|
41
|
-
[
|
|
42
|
-
(
|
|
43
|
-
GALLIUM_ARSENIDE_DIAMOND_INTERFACE,
|
|
44
|
-
True,
|
|
45
|
-
{
|
|
46
|
-
OSPlatform.DARWIN: GALLIUM_ARSENIDE_DIAMOND_INTERFACE_PRIMITIVE,
|
|
47
|
-
OSPlatform.OTHER: GALLIUM_ARSENIDE_DIAMOND_INTERFACE_PRIMITIVE_GH_WF,
|
|
48
|
-
},
|
|
49
|
-
),
|
|
50
|
-
],
|
|
51
|
-
)
|
|
52
|
-
def test_get_primitive_lattice_standard(material_config, keep_orientation, expected_primitive):
|
|
53
|
-
original_material = Material.create(material_config)
|
|
54
|
-
analyzer = LatticeMaterialAnalyzer(material=original_material)
|
|
55
|
-
corrected_primitive_material = analyzer.get_material_with_primitive_lattice_standard(
|
|
56
|
-
keep_orientation=keep_orientation
|
|
57
|
-
)
|
|
58
|
-
expected_primitive_material = get_platform_specific_value(expected_primitive)
|
|
59
|
-
assert_interfaces_almost_equal(corrected_primitive_material, expected_primitive_material)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
@pytest.mark.parametrize(
|
|
63
|
-
"material, expected_lattice_type",
|
|
64
|
-
[
|
|
65
|
-
(BULK_Si_PRIMITIVE, "FCC"),
|
|
66
|
-
(BULK_Si_CONVENTIONAL, "FCC"),
|
|
67
|
-
(GRAPHENE_NICKEL_INTERFACE_TOP_HCP, "HEX"),
|
|
68
|
-
(BULK_Hf2O_MCL, "MCL"),
|
|
69
|
-
(BULK_GRAPHITE, "HEX"),
|
|
70
|
-
],
|
|
71
|
-
)
|
|
72
|
-
def test_analyze_lattice_type(material, expected_lattice_type):
|
|
73
|
-
result = get_lattice_type(material)
|
|
74
|
-
assert result.value == expected_lattice_type
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
from mat3ra.made.material import Material
|
|
3
|
-
from mat3ra.made.tools.analyze.lattice import LatticeMaterialAnalyzer
|
|
4
|
-
from mat3ra.made.tools.analyze.lattice_swap_analyzer import MaterialLatticeSwapAnalyzer
|
|
5
|
-
|
|
6
|
-
from .fixtures.interface.gaas_dia import (
|
|
7
|
-
GALLIUM_ARSENIDE_DIAMOND_INTERFACE,
|
|
8
|
-
GALLIUM_ARSENIDE_DIAMOND_INTERFACE_PRIMITIVE,
|
|
9
|
-
GALLIUM_ARSENIDE_DIAMOND_INTERFACE_PRIMITIVE_GH_WF,
|
|
10
|
-
)
|
|
11
|
-
from .fixtures.interface.gr_ni_111_top_hcp import GRAPHENE_NICKEL_INTERFACE_TOP_HCP_GH_WF
|
|
12
|
-
from .fixtures.slab import SLAB_SrTiO3_011_TERMINATION_O2, SLAB_SrTiO3_011_TERMINATION_SrTiO
|
|
13
|
-
from .utils import (
|
|
14
|
-
OSPlatform,
|
|
15
|
-
assert_interfaces_almost_equal,
|
|
16
|
-
assert_two_entities_deep_almost_equal,
|
|
17
|
-
get_platform_specific_value,
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@pytest.mark.parametrize(
|
|
22
|
-
"original_material_config, another_material_config, is_swapped",
|
|
23
|
-
[
|
|
24
|
-
(SLAB_SrTiO3_011_TERMINATION_O2, SLAB_SrTiO3_011_TERMINATION_O2, False),
|
|
25
|
-
(SLAB_SrTiO3_011_TERMINATION_O2, SLAB_SrTiO3_011_TERMINATION_SrTiO, True),
|
|
26
|
-
],
|
|
27
|
-
)
|
|
28
|
-
def test_flip_detection_between_materials(original_material_config, another_material_config, is_swapped):
|
|
29
|
-
original_material = Material.create(original_material_config)
|
|
30
|
-
another_material = Material.create(another_material_config)
|
|
31
|
-
|
|
32
|
-
rotation_analyzer = MaterialLatticeSwapAnalyzer(material=another_material)
|
|
33
|
-
swap_info = rotation_analyzer.detect_swap_from_original(original_material)
|
|
34
|
-
|
|
35
|
-
new_lattice = rotation_analyzer.get_corrected_material(another_material).lattice
|
|
36
|
-
|
|
37
|
-
assert swap_info.is_swapped == is_swapped
|
|
38
|
-
assert_two_entities_deep_almost_equal(new_lattice, another_material.lattice)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@pytest.mark.parametrize(
|
|
42
|
-
"original_material_config, expected_swapped, expected_primitive, clear_labels",
|
|
43
|
-
[
|
|
44
|
-
(
|
|
45
|
-
GALLIUM_ARSENIDE_DIAMOND_INTERFACE,
|
|
46
|
-
{OSPlatform.DARWIN: True, OSPlatform.OTHER: True},
|
|
47
|
-
{
|
|
48
|
-
OSPlatform.DARWIN: GALLIUM_ARSENIDE_DIAMOND_INTERFACE_PRIMITIVE,
|
|
49
|
-
OSPlatform.OTHER: GALLIUM_ARSENIDE_DIAMOND_INTERFACE_PRIMITIVE_GH_WF,
|
|
50
|
-
},
|
|
51
|
-
False,
|
|
52
|
-
),
|
|
53
|
-
(
|
|
54
|
-
GRAPHENE_NICKEL_INTERFACE_TOP_HCP_GH_WF,
|
|
55
|
-
{OSPlatform.DARWIN: True, OSPlatform.OTHER: False},
|
|
56
|
-
None,
|
|
57
|
-
True,
|
|
58
|
-
),
|
|
59
|
-
],
|
|
60
|
-
)
|
|
61
|
-
def test_swap_detection(original_material_config, expected_swapped, expected_primitive, clear_labels):
|
|
62
|
-
original_material = Material.create(original_material_config)
|
|
63
|
-
primitive_material = LatticeMaterialAnalyzer(material=original_material).material_with_primitive_lattice
|
|
64
|
-
|
|
65
|
-
analyzer = MaterialLatticeSwapAnalyzer(material=primitive_material)
|
|
66
|
-
swap_info = analyzer.detect_swap_from_original(original_material)
|
|
67
|
-
|
|
68
|
-
expected_is_swapped = get_platform_specific_value(expected_swapped)
|
|
69
|
-
assert swap_info.is_swapped is expected_is_swapped
|
|
70
|
-
|
|
71
|
-
if clear_labels:
|
|
72
|
-
original_material.basis.set_labels_from_list([])
|
|
73
|
-
|
|
74
|
-
corrected_primitive_material = analyzer.get_corrected_material(original_material)
|
|
75
|
-
|
|
76
|
-
if expected_primitive is not None:
|
|
77
|
-
expected_primitive_material = get_platform_specific_value(expected_primitive)
|
|
78
|
-
assert_interfaces_almost_equal(corrected_primitive_material, expected_primitive_material)
|
|
79
|
-
else:
|
|
80
|
-
assert_interfaces_almost_equal(corrected_primitive_material, original_material)
|