@mat3ra/made 2026.8.13-0 → 2026.8.26-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/package.json +9 -5
- 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/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/scripts/generate-mixins.ts +0 -28
- package/src/__init__.py +0 -0
- package/src/js/Material.ts +0 -618
- package/src/js/basis/basis.ts +0 -634
- package/src/js/basis/constrained_basis.ts +0 -115
- package/src/js/basis/coordinates.ts +0 -92
- 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 -149
- 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/generated/MaterialSchemaMixin.ts +0 -79
- package/src/js/lattice/lattice.ts +0 -308
- package/src/js/lattice/lattice_types.ts +0 -134
- package/src/js/lattice/reciprocal/lattice_reciprocal.ts +0 -206
- 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/parsers/cif.ts +0 -25
- package/src/js/parsers/errors.ts +0 -6
- package/src/js/parsers/espresso.ts +0 -29
- package/src/js/parsers/native_format_parsers.ts +0 -52
- package/src/js/parsers/parsers.ts +0 -13
- package/src/js/parsers/poscar.ts +0 -218
- package/src/js/parsers/xyz.ts +0 -190
- package/src/js/parsers/xyz_combinatorial_basis.ts +0 -268
- package/src/js/tools/basis.ts +0 -131
- package/src/js/tools/cell.ts +0 -40
- package/src/js/tools/index.ts +0 -11
- package/src/js/tools/material.ts +0 -64
- package/src/js/tools/supercell.ts +0 -89
- package/src/js/tools/surface.ts +0 -213
- 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 -135
- 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 -123
- package/tests/js/lattice/lattice.ts +0 -43
- package/tests/js/lattice/lattice_reciprocal.ts +0 -104
- package/tests/js/material/material.ts +0 -161
- package/tests/js/parsers/espresso.ts +0 -12
- 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/register-esse-schemas.cjs +0 -10
- 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 -111
- 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,64 +0,0 @@
|
|
|
1
|
-
from typing import Any, Dict
|
|
2
|
-
|
|
3
|
-
SI_SUPERCELL_FLIPPED_Z: Dict[str, Any] = {
|
|
4
|
-
"name": "Silicon FCC",
|
|
5
|
-
"basis": {
|
|
6
|
-
"constraints": [],
|
|
7
|
-
"coordinates": [{"id": 0, "value": [0.0, 0.0, 0.0]}, {"id": 1, "value": [0.25, 0.25, 0.25]}],
|
|
8
|
-
"elements": [{"id": 0, "value": "Si"}, {"id": 1, "value": "Si"}],
|
|
9
|
-
"labels": [],
|
|
10
|
-
"units": "crystal",
|
|
11
|
-
},
|
|
12
|
-
"lattice": {
|
|
13
|
-
"a": 3.867,
|
|
14
|
-
"alpha": 60.0,
|
|
15
|
-
"b": 3.867,
|
|
16
|
-
"beta": 60.0,
|
|
17
|
-
"c": 3.867,
|
|
18
|
-
"gamma": 60.0,
|
|
19
|
-
"type": "TRI",
|
|
20
|
-
"units": {"angle": "degree", "length": "angstrom"},
|
|
21
|
-
},
|
|
22
|
-
"isNonPeriodic": False,
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
SI_SUPERCELL_2X2X1: Dict[str, Any] = {
|
|
26
|
-
"name": "Silicon FCC",
|
|
27
|
-
"basis": {
|
|
28
|
-
"elements": [
|
|
29
|
-
{"id": 0, "value": "Si"},
|
|
30
|
-
{"id": 1, "value": "Si"},
|
|
31
|
-
{"id": 2, "value": "Si"},
|
|
32
|
-
{"id": 3, "value": "Si"},
|
|
33
|
-
{"id": 4, "value": "Si"},
|
|
34
|
-
{"id": 5, "value": "Si"},
|
|
35
|
-
{"id": 6, "value": "Si"},
|
|
36
|
-
{"id": 7, "value": "Si"},
|
|
37
|
-
],
|
|
38
|
-
"coordinates": [
|
|
39
|
-
{"id": 0, "value": [0.0, 0.0, 0.0]},
|
|
40
|
-
{"id": 1, "value": [0.125, 0.125, 0.25]},
|
|
41
|
-
{"id": 2, "value": [0.0, 0.5, 0.0]},
|
|
42
|
-
{"id": 3, "value": [0.125, 0.625, 0.25]},
|
|
43
|
-
{"id": 4, "value": [0.5, 0.0, 0.0]},
|
|
44
|
-
{"id": 5, "value": [0.625, 0.125, 0.25]},
|
|
45
|
-
{"id": 6, "value": [0.5, 0.5, 0.0]},
|
|
46
|
-
{"id": 7, "value": [0.625, 0.625, 0.25]},
|
|
47
|
-
],
|
|
48
|
-
"units": "crystal",
|
|
49
|
-
"constraints": [],
|
|
50
|
-
"labels": [],
|
|
51
|
-
},
|
|
52
|
-
"lattice": {
|
|
53
|
-
"a": 7.734,
|
|
54
|
-
"b": 7.734,
|
|
55
|
-
"c": 3.867,
|
|
56
|
-
"alpha": 60.0,
|
|
57
|
-
"beta": 60.0,
|
|
58
|
-
"gamma": 60.0,
|
|
59
|
-
"units": {"length": "angstrom", "angle": "degree"},
|
|
60
|
-
"type": "TRI",
|
|
61
|
-
},
|
|
62
|
-
"isNonPeriodic": False,
|
|
63
|
-
"metadata": {"boundaryConditions": {"type": "pbc", "offset": 0}},
|
|
64
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
TERRACE_SLAB_Si_001_3x3 = {
|
|
2
|
-
"name": "Si(001), termination Si_P4/mmm_2, Slab, Terrace [0, 1, 0]",
|
|
3
|
-
"basis": {
|
|
4
|
-
"elements": [
|
|
5
|
-
{"id": 0, "value": "Si"},
|
|
6
|
-
{"id": 1, "value": "Si"},
|
|
7
|
-
{"id": 2, "value": "Si"},
|
|
8
|
-
{"id": 3, "value": "Si"},
|
|
9
|
-
{"id": 4, "value": "Si"},
|
|
10
|
-
{"id": 5, "value": "Si"},
|
|
11
|
-
{"id": 6, "value": "Si"},
|
|
12
|
-
{"id": 7, "value": "Si"},
|
|
13
|
-
{"id": 8, "value": "Si"},
|
|
14
|
-
{"id": 9, "value": "Si"},
|
|
15
|
-
{"id": 10, "value": "Si"},
|
|
16
|
-
{"id": 11, "value": "Si"},
|
|
17
|
-
{"id": 12, "value": "Si"},
|
|
18
|
-
{"id": 13, "value": "Si"},
|
|
19
|
-
{"id": 14, "value": "Si"},
|
|
20
|
-
{"id": 15, "value": "Si"},
|
|
21
|
-
{"id": 16, "value": "Si"},
|
|
22
|
-
{"id": 17, "value": "Si"},
|
|
23
|
-
{"id": 18, "value": "Si"},
|
|
24
|
-
{"id": 19, "value": "Si"},
|
|
25
|
-
{"id": 20, "value": "Si"},
|
|
26
|
-
{"id": 21, "value": "Si"},
|
|
27
|
-
{"id": 22, "value": "Si"},
|
|
28
|
-
{"id": 23, "value": "Si"},
|
|
29
|
-
],
|
|
30
|
-
"coordinates": [
|
|
31
|
-
{"id": 0, "value": [0.5, 0.977786405, 0.44181159]},
|
|
32
|
-
{"id": 1, "value": [0.25, 0.127786404, 0.402285072]},
|
|
33
|
-
{"id": 2, "value": [0.5, 0.277786404, 0.362758554]},
|
|
34
|
-
{"id": 3, "value": [0.25, 0.427786405, 0.323232035]},
|
|
35
|
-
{"id": 4, "value": [0, 0.077786404, 0.283705516]},
|
|
36
|
-
{"id": 5, "value": [0.75, 0.227786404, 0.244178997]},
|
|
37
|
-
{"id": 6, "value": [0, 0.177786405, 0.520864628]},
|
|
38
|
-
{"id": 7, "value": [0.75, 0.327786405, 0.48133811]},
|
|
39
|
-
{"id": 8, "value": [0.5, 0.377786404, 0.599917665]},
|
|
40
|
-
{"id": 9, "value": [0.25, 0.527786404, 0.560391147]},
|
|
41
|
-
{"id": 10, "value": [0.5, 0.677786404, 0.520864629]},
|
|
42
|
-
{"id": 11, "value": [0.25, 0.827786404, 0.48133811]},
|
|
43
|
-
{"id": 12, "value": [0, 0.477786403, 0.441811592]},
|
|
44
|
-
{"id": 13, "value": [0.75, 0.627786404, 0.402285072]},
|
|
45
|
-
{"id": 14, "value": [0, 0.577786405, 0.678970703]},
|
|
46
|
-
{"id": 15, "value": [0.75, 0.727786404, 0.639444185]},
|
|
47
|
-
{"id": 16, "value": [0.5, 0.777786404, 0.758023741]},
|
|
48
|
-
{"id": 17, "value": [0.25, 0.927786404, 0.718497223]},
|
|
49
|
-
{"id": 18, "value": [0.5, 0.077786405, 0.678970704]},
|
|
50
|
-
{"id": 19, "value": [0.25, 0.227786404, 0.639444186]},
|
|
51
|
-
{"id": 20, "value": [0, 0.877786404, 0.599917666]},
|
|
52
|
-
{"id": 21, "value": [0.75, 0.027786404, 0.560391148]},
|
|
53
|
-
{"id": 22, "value": [0, 0.977786405, 0.837076779]},
|
|
54
|
-
{"id": 23, "value": [0.75, 0.127786405, 0.79755026]},
|
|
55
|
-
],
|
|
56
|
-
"units": "crystal",
|
|
57
|
-
"labels": [],
|
|
58
|
-
"constraints": [],
|
|
59
|
-
},
|
|
60
|
-
"lattice": {
|
|
61
|
-
"a": 5.468763846,
|
|
62
|
-
"b": 12.228527713,
|
|
63
|
-
"c": 15.468763846,
|
|
64
|
-
"alpha": 90,
|
|
65
|
-
"beta": 90,
|
|
66
|
-
"gamma": 90,
|
|
67
|
-
"units": {"length": "angstrom", "angle": "degree"},
|
|
68
|
-
"type": "TRI",
|
|
69
|
-
},
|
|
70
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
from ase.build import bulk, molecule
|
|
2
|
-
|
|
3
|
-
BULK_SI_LATTICE_A = 3.8395
|
|
4
|
-
BULK_SI_LATTICE_ALPHA = 60
|
|
5
|
-
BULK_SI_LABELS = [{"id": 0, "value": 0}, {"id": 1, "value": 1}]
|
|
6
|
-
|
|
7
|
-
atoms = bulk("Si")
|
|
8
|
-
atoms.set_tags([0, 1])
|
|
9
|
-
ASE_BULK_Si = atoms
|
|
10
|
-
|
|
11
|
-
atoms = molecule("H2O")
|
|
12
|
-
atoms.set_pbc(False)
|
|
13
|
-
ASE_MOLECULE_H2O = atoms
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
from mat3ra.made.material import Material
|
|
3
|
-
from mat3ra.made.tools.analyze.lattice_planes import CrystalLatticePlanesMaterialAnalyzer
|
|
4
|
-
from mat3ra.utils import assertion as assertion_utils
|
|
5
|
-
from unit.fixtures.bulk import BULK_SrTiO3
|
|
6
|
-
|
|
7
|
-
SLAB_SrTiO3_EXPECTED_TERMINATIONS_WITH_VACUUM = [
|
|
8
|
-
[
|
|
9
|
-
(1, 1, 0),
|
|
10
|
-
["SrTiO_Pmmm_3", "O2_Pmmm_2"],
|
|
11
|
-
]
|
|
12
|
-
]
|
|
13
|
-
|
|
14
|
-
SLAB_SrTiO3_EXPECTED_TERMINATIONS_WITHOUT_VACUUM = [
|
|
15
|
-
[
|
|
16
|
-
(1, 1, 0),
|
|
17
|
-
[
|
|
18
|
-
"None",
|
|
19
|
-
"SrTiO_P4/mmm_3",
|
|
20
|
-
],
|
|
21
|
-
]
|
|
22
|
-
]
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
@pytest.mark.parametrize(
|
|
26
|
-
"material_config, miller_indices, number_of_slabs",
|
|
27
|
-
[
|
|
28
|
-
(
|
|
29
|
-
BULK_SrTiO3,
|
|
30
|
-
(1, 1, 0),
|
|
31
|
-
2,
|
|
32
|
-
),
|
|
33
|
-
],
|
|
34
|
-
)
|
|
35
|
-
def test_all_planes_as_pymatgen_slabs_with_vacuum(material_config, miller_indices, number_of_slabs):
|
|
36
|
-
material = Material.create(material_config)
|
|
37
|
-
analyzer = CrystalLatticePlanesMaterialAnalyzer(material=material, miller_indices=miller_indices)
|
|
38
|
-
slabs_with_vacuum = analyzer.all_planes_as_pymatgen_slabs_with_vacuum
|
|
39
|
-
assert len(slabs_with_vacuum) == number_of_slabs
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
@pytest.mark.parametrize(
|
|
43
|
-
"material_config, miller_indices, number_of_slabs",
|
|
44
|
-
[
|
|
45
|
-
(BULK_SrTiO3, (1, 1, 0), 1),
|
|
46
|
-
],
|
|
47
|
-
)
|
|
48
|
-
def test_all_planes_as_pymatgen_slabs_without_vacuum(material_config, miller_indices, number_of_slabs):
|
|
49
|
-
material = Material.create(material_config)
|
|
50
|
-
analyzer = CrystalLatticePlanesMaterialAnalyzer(material=material, miller_indices=miller_indices)
|
|
51
|
-
slabs_without_vacuum = analyzer.all_planes_as_pymatgen_slabs_without_vacuum
|
|
52
|
-
assert len(slabs_without_vacuum) == number_of_slabs
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
@pytest.mark.parametrize(
|
|
56
|
-
"material_config, miller_indices, expected_shifts_with_vacuum",
|
|
57
|
-
[
|
|
58
|
-
(BULK_SrTiO3, (1, 1, 0), [0.25, 0.25]),
|
|
59
|
-
],
|
|
60
|
-
)
|
|
61
|
-
def test_termination_holders_shifts_with_vacuum(material_config, miller_indices, expected_shifts_with_vacuum):
|
|
62
|
-
material = Material.create(material_config)
|
|
63
|
-
analyzer = CrystalLatticePlanesMaterialAnalyzer(material=material, miller_indices=miller_indices)
|
|
64
|
-
shifts_with_vacuum = [h.shift_with_vacuum for h in analyzer.termination_holders]
|
|
65
|
-
assertion_utils.assert_deep_almost_equal(shifts_with_vacuum, expected_shifts_with_vacuum)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
@pytest.mark.parametrize(
|
|
69
|
-
"material_config, miller_indices, expected_shifts_without_vacuum",
|
|
70
|
-
[
|
|
71
|
-
(BULK_SrTiO3, (1, 1, 0), [0.0, 0.25]),
|
|
72
|
-
],
|
|
73
|
-
)
|
|
74
|
-
def test_termination_holders_shifts_without_vacuum(material_config, miller_indices, expected_shifts_without_vacuum):
|
|
75
|
-
material = Material.create(material_config)
|
|
76
|
-
analyzer = CrystalLatticePlanesMaterialAnalyzer(material=material, miller_indices=miller_indices)
|
|
77
|
-
shifts_without_vacuum = [
|
|
78
|
-
h.shift_without_vacuum for h in analyzer.termination_holders if h.shift_without_vacuum is not None
|
|
79
|
-
]
|
|
80
|
-
assertion_utils.assert_deep_almost_equal(shifts_without_vacuum, expected_shifts_without_vacuum)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
@pytest.mark.parametrize(
|
|
84
|
-
"material_config, miller_indices, expected_terminations_with_vacuum_str",
|
|
85
|
-
[
|
|
86
|
-
(
|
|
87
|
-
BULK_SrTiO3,
|
|
88
|
-
(1, 1, 0),
|
|
89
|
-
SLAB_SrTiO3_EXPECTED_TERMINATIONS_WITH_VACUUM[0][1],
|
|
90
|
-
)
|
|
91
|
-
],
|
|
92
|
-
)
|
|
93
|
-
def test_terminations_with_vacuum(material_config, miller_indices, expected_terminations_with_vacuum_str):
|
|
94
|
-
material = Material.create(material_config)
|
|
95
|
-
analyzer = CrystalLatticePlanesMaterialAnalyzer(material=material, miller_indices=miller_indices)
|
|
96
|
-
terminations_with_vacuum = analyzer.terminations_with_vacuum
|
|
97
|
-
terminations_with_vacuum_str_list = [str(t) for t in terminations_with_vacuum]
|
|
98
|
-
assert sorted(terminations_with_vacuum_str_list) == sorted(expected_terminations_with_vacuum_str)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
@pytest.mark.parametrize(
|
|
102
|
-
"material_config, miller_indices, expected_terminations_without_vacuum_str",
|
|
103
|
-
[
|
|
104
|
-
(
|
|
105
|
-
BULK_SrTiO3,
|
|
106
|
-
(1, 1, 0),
|
|
107
|
-
SLAB_SrTiO3_EXPECTED_TERMINATIONS_WITHOUT_VACUUM[0][1],
|
|
108
|
-
),
|
|
109
|
-
],
|
|
110
|
-
)
|
|
111
|
-
def test_terminations_without_vacuum(material_config, miller_indices, expected_terminations_without_vacuum_str):
|
|
112
|
-
material = Material.create(material_config)
|
|
113
|
-
analyzer = CrystalLatticePlanesMaterialAnalyzer(material=material, miller_indices=miller_indices)
|
|
114
|
-
terminations_without_vacuum = analyzer.terminations_without_vacuum
|
|
115
|
-
terminations_without_vacuum_str_list = [str(t) for t in terminations_without_vacuum]
|
|
116
|
-
all_materials = analyzer.get_materials_for_all_terminations_without_vacuum()
|
|
117
|
-
assert sorted(terminations_without_vacuum_str_list) == sorted(expected_terminations_without_vacuum_str)
|
|
118
|
-
assert all_materials
|
|
119
|
-
assert len(all_materials) == len([t for t in analyzer.terminations_without_vacuum if t is not None])
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
@pytest.mark.parametrize(
|
|
123
|
-
"material_config, miller_indices, expected_formulas",
|
|
124
|
-
[(BULK_SrTiO3, (1, 1, 0), ["SrTiO", "O2"])],
|
|
125
|
-
)
|
|
126
|
-
def test_terminations(material_config, miller_indices, expected_formulas):
|
|
127
|
-
material = Material.create(material_config)
|
|
128
|
-
analyzer = CrystalLatticePlanesMaterialAnalyzer(material=material, miller_indices=miller_indices)
|
|
129
|
-
terminations = analyzer.terminations
|
|
130
|
-
actual_formulas = sorted([t.formula for t in terminations])
|
|
131
|
-
assert sorted(actual_formulas) == sorted(expected_formulas)
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
from mat3ra.code.vector import RoundedVector3D
|
|
2
|
-
from mat3ra.made.cell import Cell
|
|
3
|
-
|
|
4
|
-
VECTORS = [
|
|
5
|
-
[1.0, 0.0, 0.0],
|
|
6
|
-
[0.0, 2.0, 0.0],
|
|
7
|
-
[0.0, 0.0, 3.0],
|
|
8
|
-
]
|
|
9
|
-
|
|
10
|
-
VECTORS_VOLUME = 6.0
|
|
11
|
-
|
|
12
|
-
VECTORS_EQUAL_UP_TO_PRECISION_4 = [
|
|
13
|
-
[1.00001, 0.0, 0.0],
|
|
14
|
-
[0.0, 2.00001, 0.0],
|
|
15
|
-
[0.0, 0.0, 3.00001],
|
|
16
|
-
]
|
|
17
|
-
|
|
18
|
-
VECTORS_EQUAL_UP_TO_PRECISION_4_VOLUME = 6.000110000600002
|
|
19
|
-
VECTORS_EQUAL_UP_TO_PRECISION_4_VOLUME_ROUNDED_TO_PRECISION_4 = 6.0001
|
|
20
|
-
VECTORS_EQUAL_UP_TO_PRECISION_4_VOLUME_ROUNDED_TO_PRECISION_5 = 6.00011
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def test_cell_creation():
|
|
24
|
-
cell = Cell(a=RoundedVector3D(VECTORS[0]), b=RoundedVector3D(VECTORS[1]), c=RoundedVector3D(VECTORS[2]))
|
|
25
|
-
assert cell.a.value == VECTORS[0]
|
|
26
|
-
assert cell.b.value == VECTORS[1]
|
|
27
|
-
assert cell.c.value == VECTORS[2]
|
|
28
|
-
assert cell.volume == 6.0
|
|
29
|
-
assert cell.vector_arrays == VECTORS
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
def test_cell_creation_default():
|
|
33
|
-
cell = Cell()
|
|
34
|
-
assert cell.a.value == Cell.__default_vectors__[0]
|
|
35
|
-
assert cell.b.value == Cell.__default_vectors__[1]
|
|
36
|
-
assert cell.c.value == Cell.__default_vectors__[2]
|
|
37
|
-
assert cell.volume == 1.0
|
|
38
|
-
assert cell.vector_arrays == Cell.__default_vectors__
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def test_from_vectors_array():
|
|
42
|
-
cell = Cell.from_vectors_array(vectors=VECTORS)
|
|
43
|
-
assert cell.a.value == VECTORS[0]
|
|
44
|
-
assert cell.b.value == VECTORS[1]
|
|
45
|
-
assert cell.c.value == VECTORS[2]
|
|
46
|
-
assert cell.volume == VECTORS_VOLUME
|
|
47
|
-
assert cell.vector_arrays == VECTORS
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
def test_get_vector_arrays():
|
|
51
|
-
cell = Cell.from_vectors_array(vectors=VECTORS)
|
|
52
|
-
assert cell.get_vector_arrays() == VECTORS
|
|
53
|
-
assert cell.get_vector_arrays(skip_rounding=True) == VECTORS
|
|
54
|
-
assert cell.get_vector_arrays(skip_rounding=False) == VECTORS
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
def test_vector_arrays_including_rounded():
|
|
58
|
-
class_reference = Cell
|
|
59
|
-
class_reference.__rounded_vector3d__ = RoundedVector3D
|
|
60
|
-
|
|
61
|
-
class_reference.__rounded_vector3d__.__round_precision__ = 4
|
|
62
|
-
cell = class_reference.from_vectors_array(vectors=VECTORS_EQUAL_UP_TO_PRECISION_4)
|
|
63
|
-
assert cell.vector_arrays == VECTORS_EQUAL_UP_TO_PRECISION_4
|
|
64
|
-
assert cell.vector_arrays_rounded == VECTORS
|
|
65
|
-
|
|
66
|
-
class_reference.__rounded_vector3d__.__round_precision__ = 5
|
|
67
|
-
cell = class_reference.from_vectors_array(vectors=VECTORS_EQUAL_UP_TO_PRECISION_4)
|
|
68
|
-
assert cell.vector_arrays == VECTORS_EQUAL_UP_TO_PRECISION_4
|
|
69
|
-
assert cell.vector_arrays_rounded != VECTORS
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
def test_convert_point_to_cartesian():
|
|
73
|
-
cell = Cell.from_vectors_array(vectors=VECTORS)
|
|
74
|
-
coordinate_in_crystal = [0.5, 0.5, 0.5]
|
|
75
|
-
coordinate_in_cartesian = cell.convert_point_to_cartesian(coordinate_in_crystal)
|
|
76
|
-
expected_coordinate_in_cartesian = [0.5, 1.0, 1.5]
|
|
77
|
-
assert coordinate_in_cartesian == expected_coordinate_in_cartesian
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
def test_convert_point_to_crystal():
|
|
81
|
-
cell = Cell.from_vectors_array(vectors=VECTORS)
|
|
82
|
-
coordinate_in_cartesian = [0.5, 1.0, 1.5]
|
|
83
|
-
coordinate_in_crystal = cell.convert_point_to_crystal(coordinate_in_cartesian)
|
|
84
|
-
expected_coordinate_in_crystal = [0.5, 0.5, 0.5]
|
|
85
|
-
assert coordinate_in_crystal == expected_coordinate_in_crystal
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
def test_volume():
|
|
89
|
-
cell = Cell.from_vectors_array(vectors=VECTORS)
|
|
90
|
-
assert cell.volume == VECTORS_VOLUME
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
def test_volume_rounded():
|
|
94
|
-
class_reference = Cell
|
|
95
|
-
class_reference.__round_precision__ = 4
|
|
96
|
-
cell = class_reference.from_vectors_array(vectors=VECTORS_EQUAL_UP_TO_PRECISION_4)
|
|
97
|
-
assert cell.volume == VECTORS_EQUAL_UP_TO_PRECISION_4_VOLUME
|
|
98
|
-
assert cell.volume_rounded == VECTORS_EQUAL_UP_TO_PRECISION_4_VOLUME_ROUNDED_TO_PRECISION_4
|
|
99
|
-
|
|
100
|
-
class_reference.__round_precision__ = 5
|
|
101
|
-
cell = class_reference.from_vectors_array(vectors=VECTORS_EQUAL_UP_TO_PRECISION_4)
|
|
102
|
-
assert cell.volume == VECTORS_EQUAL_UP_TO_PRECISION_4_VOLUME
|
|
103
|
-
assert cell.volume_rounded != VECTORS_EQUAL_UP_TO_PRECISION_4_VOLUME_ROUNDED_TO_PRECISION_4
|
|
104
|
-
assert cell.volume_rounded == VECTORS_EQUAL_UP_TO_PRECISION_4_VOLUME_ROUNDED_TO_PRECISION_5
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"""Tests that shared data files in data/ are accessible after package installation.
|
|
2
|
-
|
|
3
|
-
These tests verify that the JSON files can be found and loaded via the
|
|
4
|
-
path resolution logic used in production code. If they fail, the data
|
|
5
|
-
files are likely missing from the installed package distribution.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
import json
|
|
9
|
-
from pathlib import Path
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def _get_data_dir():
|
|
13
|
-
"""Resolve data/ directory the same way production code does.
|
|
14
|
-
|
|
15
|
-
Production code uses Path(__file__).parents[N] to reach the repo root.
|
|
16
|
-
This test uses the same approach from its own location to verify the
|
|
17
|
-
path resolution works in the installed environment.
|
|
18
|
-
"""
|
|
19
|
-
# tests/py/unit/test_data_files.py -> parents[3] -> repo root
|
|
20
|
-
return Path(__file__).parents[3] / "data"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def test_data_dir_exists():
|
|
24
|
-
data_dir = _get_data_dir()
|
|
25
|
-
assert data_dir.exists(), f"data/ directory not found at {data_dir}"
|
|
26
|
-
assert data_dir.is_dir(), f"{data_dir} is not a directory"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
def test_data_constants_json_loadable():
|
|
30
|
-
path = _get_data_dir() / "constants.json"
|
|
31
|
-
assert path.exists(), f"constants.json not found at {path}"
|
|
32
|
-
with open(path) as f:
|
|
33
|
-
data = json.load(f)
|
|
34
|
-
assert "molecule" in data, "constants.json missing 'molecule' key"
|
|
35
|
-
assert "precision" in data, "constants.json missing 'precision' key"
|
|
36
|
-
assert data["molecule"]["nonPeriodicMinimumLatticeSize"] == 3.0
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def test_data_reciprocal_paths_json_loadable():
|
|
40
|
-
path = _get_data_dir() / "reciprocal_paths.json"
|
|
41
|
-
assert path.exists(), f"reciprocal_paths.json not found at {path}"
|
|
42
|
-
with open(path) as f:
|
|
43
|
-
data = json.load(f)
|
|
44
|
-
assert len(data) == 22, f"Expected 22 path keys, got {len(data)}"
|
|
45
|
-
assert "CUB" in data
|
|
46
|
-
assert "FCC" in data
|
|
47
|
-
assert "TRI" in data
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
def test_data_constants_importable_from_production_code():
|
|
51
|
-
"""Verify the actual production import path works."""
|
|
52
|
-
from mat3ra.made.tools.convert.utils import (
|
|
53
|
-
DEFAULT_NON_PERIODIC_MIN_LATTICE_SIZE,
|
|
54
|
-
DIATOMIC_LATTICE_PADDING_FACTOR,
|
|
55
|
-
MOLECULAR_LATTICE_PADDING_FACTOR,
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
assert DEFAULT_NON_PERIODIC_MIN_LATTICE_SIZE == 3.0
|
|
59
|
-
assert DIATOMIC_LATTICE_PADDING_FACTOR == 3.0
|
|
60
|
-
assert MOLECULAR_LATTICE_PADDING_FACTOR == 2.0
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
def test_data_reciprocal_paths_importable_from_production_code():
|
|
64
|
-
"""Verify the actual production import path works."""
|
|
65
|
-
from mat3ra.made.reciprocal import RECIPROCAL_PATHS
|
|
66
|
-
|
|
67
|
-
assert len(RECIPROCAL_PATHS) == 22
|
|
68
|
-
assert "CUB" in RECIPROCAL_PATHS
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
from mat3ra.code.vector import RoundedVector3D
|
|
3
|
-
from mat3ra.made.lattice import Lattice
|
|
4
|
-
from mat3ra.utils import assertion as assertion_utils
|
|
5
|
-
|
|
6
|
-
DEFAULT_UNITS = Lattice.__units_default__
|
|
7
|
-
DEFAULT_TYPE = Lattice.__type_default__
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def test_lattice_creation():
|
|
11
|
-
lattice = Lattice(a=2.0, b=3.0, c=4.0)
|
|
12
|
-
assert lattice.a == 2.0
|
|
13
|
-
assert lattice.b == 3.0
|
|
14
|
-
assert lattice.c == 4.0
|
|
15
|
-
assert lattice.alpha == 90.0
|
|
16
|
-
assert lattice.beta == 90.0
|
|
17
|
-
assert lattice.gamma == 90.0
|
|
18
|
-
assert lattice.units == DEFAULT_UNITS
|
|
19
|
-
assert lattice.type == DEFAULT_TYPE
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def test_lattice_get_vectors():
|
|
23
|
-
lattice = Lattice(a=2.0, b=3.0, c=4.0)
|
|
24
|
-
expected_vectors = [[2.0, 0.0, 0.0], [0.0, 3.0, 0.0], [0.0, 0.0, 4.0]]
|
|
25
|
-
assert expected_vectors == lattice.vector_arrays_rounded
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
def test_lattice_vectors_access():
|
|
29
|
-
lattice = Lattice(a=2.0, b=3.0, c=4.0)
|
|
30
|
-
|
|
31
|
-
# Test individual vector access
|
|
32
|
-
assert isinstance(lattice.vectors.a, RoundedVector3D)
|
|
33
|
-
assert isinstance(lattice.vectors.b, RoundedVector3D)
|
|
34
|
-
assert isinstance(lattice.vectors.c, RoundedVector3D)
|
|
35
|
-
|
|
36
|
-
# Test vector arrays access
|
|
37
|
-
arrays = lattice.vector_arrays
|
|
38
|
-
assert len(arrays) == 3
|
|
39
|
-
assert arrays[0] == lattice.vectors.a
|
|
40
|
-
assert arrays[1] == lattice.vectors.b
|
|
41
|
-
assert arrays[2] == lattice.vectors.c
|
|
42
|
-
|
|
43
|
-
# Test get value of vectors, without rounding
|
|
44
|
-
assertion_utils.assert_deep_almost_equal(lattice.vectors.a.root, [2.0, 0.0, 0.0])
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
def test_lattice_from_vectors():
|
|
48
|
-
lattice = Lattice.from_vectors_array(vectors=[[2.0, 0, 0], [0, 3.0, 0], [0, 0, 4.0]])
|
|
49
|
-
assert lattice.a == 2.0
|
|
50
|
-
assert lattice.b == 3.0
|
|
51
|
-
assert lattice.c == 4.0
|
|
52
|
-
assert lattice.alpha == 90.0
|
|
53
|
-
assert lattice.beta == 90.0
|
|
54
|
-
assert lattice.gamma == 90.0
|
|
55
|
-
assert lattice.units == DEFAULT_UNITS
|
|
56
|
-
assert lattice.type.value == DEFAULT_TYPE
|
|
57
|
-
# Avoid floating point comparison issue
|
|
58
|
-
assertion_utils.assert_deep_almost_equal(lattice.cell_volume, 24.0)
|
|
59
|
-
assert lattice.cell_volume_rounded == 24.0
|
|
60
|
-
assert lattice.vector_arrays_rounded == [[2.0, 0.0, 0.0], [0.0, 3.0, 0.0], [0.0, 0.0, 4.0]]
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
def test_lattice_get_scaled_by_matrix():
|
|
64
|
-
original_lattice = Lattice(a=2.0, b=3.0, c=4.0)
|
|
65
|
-
matrix = [[1.5, 0, 0], [0, 1.5, 0], [0, 0, 0.5]]
|
|
66
|
-
expected_vector_values = [[3.0, 0.0, 0.0], [0.0, 4.5, 0.0], [0.0, 0.0, 2.0]]
|
|
67
|
-
lattice = original_lattice.get_scaled_by_matrix(matrix)
|
|
68
|
-
assert lattice.a == 3.0
|
|
69
|
-
assert lattice.b == 4.5
|
|
70
|
-
assert lattice.c == 2.0
|
|
71
|
-
assert lattice.alpha == pytest.approx(90.0)
|
|
72
|
-
assert lattice.beta == pytest.approx(90.0)
|
|
73
|
-
assert lattice.gamma == pytest.approx(90.0)
|
|
74
|
-
assert lattice.units == DEFAULT_UNITS
|
|
75
|
-
assert lattice.type.value == DEFAULT_TYPE
|
|
76
|
-
assertion_utils.assert_deep_almost_equal(lattice.vector_arrays, expected_vector_values)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
def test_reciprocal_vectors():
|
|
80
|
-
lattice = Lattice(a=2.0, b=3.0, c=4.0)
|
|
81
|
-
expected_vectors = [[0.5, 0.0, 0.0], [0.0, 1 / 3, 0.0], [0.0, 0.0, 0.25]]
|
|
82
|
-
assertion_utils.assert_deep_almost_equal(lattice.reciprocal_vectors, expected_vectors)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
def test_reciprocal_vector_norms():
|
|
86
|
-
lattice = Lattice(a=2.0, b=3.0, c=4.0)
|
|
87
|
-
expected_norms = [0.5, 1 / 3, 0.25]
|
|
88
|
-
assertion_utils.assert_deep_almost_equal(lattice.reciprocal_vector_norms, expected_norms)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
@pytest.mark.parametrize(
|
|
92
|
-
"lattice, expected",
|
|
93
|
-
[
|
|
94
|
-
(Lattice(a=2.0, b=3.0, c=4.0), [1.0, 0.667, 0.5]),
|
|
95
|
-
(Lattice(a=5.43, b=5.43, c=5.43), [1.0, 1.0, 1.0]),
|
|
96
|
-
],
|
|
97
|
-
)
|
|
98
|
-
def test_reciprocal_vector_ratios(lattice, expected):
|
|
99
|
-
assert lattice.reciprocal_vector_ratios == expected
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
# to test: create, calculate_vectors, from_vectors, get_lattice_type, clone
|
|
103
|
-
# from_vectors, to_dict, cell, cell_volume, scale_by_matrix, update_from_lattice,
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"""Tests for Lattice.type_extended property."""
|
|
2
|
-
|
|
3
|
-
import pytest
|
|
4
|
-
from mat3ra.made.lattice import Lattice
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@pytest.mark.parametrize(
|
|
8
|
-
"lattice_params, expected_type",
|
|
9
|
-
[
|
|
10
|
-
# Simple types return base type
|
|
11
|
-
({"a": 1.0, "b": 1.0, "c": 1.0, "alpha": 90, "beta": 90, "gamma": 90, "type": "CUB"}, "CUB"),
|
|
12
|
-
({"a": 1.0, "b": 1.0, "c": 1.0, "alpha": 90, "beta": 90, "gamma": 90, "type": "FCC"}, "FCC"),
|
|
13
|
-
({"a": 1.0, "b": 1.0, "c": 1.0, "alpha": 90, "beta": 90, "gamma": 90, "type": "BCC"}, "BCC"),
|
|
14
|
-
({"a": 1.0, "b": 1.0, "c": 2.0, "alpha": 90, "beta": 90, "gamma": 90, "type": "TET"}, "TET"),
|
|
15
|
-
({"a": 2.0, "b": 3.0, "c": 4.0, "alpha": 90, "beta": 90, "gamma": 90, "type": "ORC"}, "ORC"),
|
|
16
|
-
({"a": 1.0, "b": 1.0, "c": 2.0, "alpha": 90, "beta": 90, "gamma": 120, "type": "HEX"}, "HEX"),
|
|
17
|
-
# BCT subtypes
|
|
18
|
-
({"a": 2.0, "b": 2.0, "c": 1.0, "alpha": 90, "beta": 90, "gamma": 90, "type": "BCT"}, "BCT-1"), # c < a
|
|
19
|
-
({"a": 1.0, "b": 1.0, "c": 2.0, "alpha": 90, "beta": 90, "gamma": 90, "type": "BCT"}, "BCT-2"), # c >= a
|
|
20
|
-
# ORCF subtypes
|
|
21
|
-
(
|
|
22
|
-
{"a": 3.0, "b": 4.0, "c": 5.0, "alpha": 90, "beta": 90, "gamma": 90, "type": "ORCF"},
|
|
23
|
-
"ORCF-1",
|
|
24
|
-
), # 1/a^2 >= 1/b^2 + 1/c^2 for a=3,b=4,c=5: 1/9≈0.111 vs 1/16+1/25≈0.1025
|
|
25
|
-
(
|
|
26
|
-
{"a": 4.0, "b": 2.0, "c": 3.0, "alpha": 90, "beta": 90, "gamma": 90, "type": "ORCF"},
|
|
27
|
-
"ORCF-2",
|
|
28
|
-
), # 1/a^2 < 1/b^2 + 1/c^2: 1/16=0.0625 < 1/4+1/9=0.361
|
|
29
|
-
# RHL subtypes
|
|
30
|
-
({"a": 1.0, "b": 1.0, "c": 1.0, "alpha": 60, "beta": 60, "gamma": 60, "type": "RHL"}, "RHL-1"), # cos(60)>0
|
|
31
|
-
(
|
|
32
|
-
{"a": 1.0, "b": 1.0, "c": 1.0, "alpha": 120, "beta": 120, "gamma": 120, "type": "RHL"},
|
|
33
|
-
"RHL-2",
|
|
34
|
-
), # cos(120)<0
|
|
35
|
-
# MCLC subtypes
|
|
36
|
-
(
|
|
37
|
-
{"a": 1.0, "b": 2.0, "c": 3.0, "alpha": 80, "beta": 90, "gamma": 95, "type": "MCLC"},
|
|
38
|
-
"MCLC-1",
|
|
39
|
-
), # gamma >= 90
|
|
40
|
-
# TRI subtypes
|
|
41
|
-
(
|
|
42
|
-
{"a": 1.0, "b": 2.0, "c": 3.0, "alpha": 95, "beta": 100, "gamma": 110, "type": "TRI"},
|
|
43
|
-
"TRI_1a",
|
|
44
|
-
), # all > 90
|
|
45
|
-
(
|
|
46
|
-
{"a": 1.0, "b": 2.0, "c": 3.0, "alpha": 80, "beta": 85, "gamma": 75, "type": "TRI"},
|
|
47
|
-
"TRI_1b",
|
|
48
|
-
), # not all > 90
|
|
49
|
-
],
|
|
50
|
-
)
|
|
51
|
-
def test_type_extended(lattice_params, expected_type):
|
|
52
|
-
lattice = Lattice(**lattice_params)
|
|
53
|
-
assert lattice.type_extended == expected_type
|