@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,104 +0,0 @@
|
|
|
1
|
-
import "../setup";
|
|
2
|
-
|
|
3
|
-
import { LatticeSchema } from "@mat3ra/esse/dist/js/types";
|
|
4
|
-
import { Utils } from "@mat3ra/utils";
|
|
5
|
-
import { expect } from "chai";
|
|
6
|
-
|
|
7
|
-
import { ReciprocalLattice } from "../../../src/js/lattice/reciprocal/lattice_reciprocal";
|
|
8
|
-
import { Na4Cl4, Silicon, SiSlab } from "../fixtures";
|
|
9
|
-
|
|
10
|
-
const { assertDeepAlmostEqual } = Utils.assertion;
|
|
11
|
-
|
|
12
|
-
describe("Lattice Reciprocal", () => {
|
|
13
|
-
it("should extract kpoint path", () => {
|
|
14
|
-
const lattice = new ReciprocalLattice(Na4Cl4.lattice as LatticeSchema);
|
|
15
|
-
const expectedPath = [
|
|
16
|
-
{
|
|
17
|
-
point: "Γ",
|
|
18
|
-
steps: 0,
|
|
19
|
-
coordinates: [0, 0, 0],
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
point: "R",
|
|
23
|
-
steps: 1,
|
|
24
|
-
coordinates: [0.5, 0.5, 0.5],
|
|
25
|
-
},
|
|
26
|
-
];
|
|
27
|
-
const actualPath = lattice.extractKpointPath([
|
|
28
|
-
[0, 0, 0],
|
|
29
|
-
[0.5, 0.5, 0.5],
|
|
30
|
-
]);
|
|
31
|
-
assertDeepAlmostEqual(expectedPath, actualPath);
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it("should return cartesian coordinates of a point", () => {
|
|
35
|
-
const lattice = new ReciprocalLattice(Na4Cl4.lattice as LatticeSchema);
|
|
36
|
-
const expectedCoordinates = [0.5, 0.5, 0.5];
|
|
37
|
-
const actualCoordinates = lattice.getCartesianCoordinates([0.5, 0.5, 0.5]);
|
|
38
|
-
assertDeepAlmostEqual(actualCoordinates, expectedCoordinates);
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it("should return reciprocal vectors", () => {
|
|
42
|
-
const lattice = new ReciprocalLattice(Silicon.lattice as LatticeSchema);
|
|
43
|
-
const actualVectors = lattice.reciprocalVectors;
|
|
44
|
-
const expectedVectors = [
|
|
45
|
-
[1.1547005383792517, -0.40824829046386313, 0],
|
|
46
|
-
[0, 1.2247448713915892, 0],
|
|
47
|
-
[-0.5773502691896261, -0.40824829046386313, 1],
|
|
48
|
-
];
|
|
49
|
-
assertDeepAlmostEqual(actualVectors, expectedVectors);
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it("should extract symmetry points", () => {
|
|
53
|
-
const lattice = new ReciprocalLattice(Na4Cl4.lattice as LatticeSchema);
|
|
54
|
-
const actualPoints = lattice.symmetryPoints;
|
|
55
|
-
const expectedPoints = [
|
|
56
|
-
{
|
|
57
|
-
point: "Γ",
|
|
58
|
-
coordinates: [0, 0, 0],
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
point: "R",
|
|
62
|
-
coordinates: [0.5, 0.5, 0.5],
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
point: "X",
|
|
66
|
-
coordinates: [0, 0.5, 0],
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
point: "M",
|
|
70
|
-
coordinates: [0.5, 0.5, 0],
|
|
71
|
-
},
|
|
72
|
-
];
|
|
73
|
-
assertDeepAlmostEqual(actualPoints, expectedPoints);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
it("should calculate k-grid dimensions based on number of points", () => {
|
|
77
|
-
const lattice = new ReciprocalLattice(SiSlab.lattice as LatticeSchema);
|
|
78
|
-
const dimensions = lattice.getDimensionsFromPointsCount(500);
|
|
79
|
-
const expectedDimensions = [12, 12, 4];
|
|
80
|
-
assertDeepAlmostEqual(dimensions, expectedDimensions);
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
it("should calculate k-grid dimensions based on spacing in cartesian units", () => {
|
|
84
|
-
const lattice = new ReciprocalLattice(SiSlab.lattice as LatticeSchema);
|
|
85
|
-
const dimensions = lattice.getDimensionsFromSpacing(0.09);
|
|
86
|
-
const expectedDimensions = [12, 12, 4];
|
|
87
|
-
assertDeepAlmostEqual(dimensions, expectedDimensions);
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
it("should calculate k-grid dimensions based on spacing in 1/angstrom", () => {
|
|
91
|
-
const lattice = new ReciprocalLattice(SiSlab.lattice as LatticeSchema);
|
|
92
|
-
const dimensions = lattice.getDimensionsFromSpacing(0.11, "angstrom");
|
|
93
|
-
const expectedDimensions = [12, 12, 4];
|
|
94
|
-
assertDeepAlmostEqual(dimensions, expectedDimensions);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
it("should calculate average spacing in 1/angstrom based on k-grid dimensions", () => {
|
|
98
|
-
const lattice = new ReciprocalLattice(SiSlab.lattice as LatticeSchema);
|
|
99
|
-
const dimensions = [12, 12, 4];
|
|
100
|
-
const expectedSpacing = 0.1047;
|
|
101
|
-
const spacing = lattice.getSpacingFromDimensions(dimensions, "angstrom");
|
|
102
|
-
expect(spacing).to.be.almost(expectedSpacing, 1e-4);
|
|
103
|
-
});
|
|
104
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { expect } from "chai";
|
|
2
|
-
|
|
3
|
-
import { Material } from "../../src/js/material";
|
|
4
|
-
import { FeOStandata, Graphene, Na4Cl4, Silicon } from "./fixtures";
|
|
5
|
-
|
|
6
|
-
const newBasisXYZ = `Si 0.000000 0.000000 0.000000
|
|
7
|
-
Ge 0.250000 0.250000 0.250000
|
|
8
|
-
`;
|
|
9
|
-
|
|
10
|
-
describe("Material", () => {
|
|
11
|
-
it("should return unique elements", () => {
|
|
12
|
-
const material = new Material(Na4Cl4);
|
|
13
|
-
expect(material.uniqueElements).to.have.same.members(["Na", "Cl"]);
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it("should return cloned material", () => {
|
|
17
|
-
const material = new Material(Silicon);
|
|
18
|
-
const clonedMaterial = material.clone();
|
|
19
|
-
clonedMaterial.setBasis(newBasisXYZ, "xyz", clonedMaterial.Basis.units);
|
|
20
|
-
expect(clonedMaterial.Basis.elements).to.have.lengthOf(2);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
describe("calculateHash", () => {
|
|
24
|
-
[
|
|
25
|
-
{ name: "Silicon", fixture: Silicon },
|
|
26
|
-
{ name: "Graphene", fixture: Graphene },
|
|
27
|
-
].forEach(({ name, fixture }) => {
|
|
28
|
-
it(`should match expected hash for ${name}`, () => {
|
|
29
|
-
const material = new Material(fixture);
|
|
30
|
-
expect(material.calculateHash()).to.equal((fixture as any).hash);
|
|
31
|
-
expect(material.scaledHash).to.equal((fixture as any).scaledHash);
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it("should match expected hash for FeO (standata)", () => {
|
|
36
|
-
const expectedHashes = require("../../fixtures/hashes.json");
|
|
37
|
-
const material = new Material(FeOStandata);
|
|
38
|
-
expect(material.calculateHash()).to.equal(expectedHashes.FeO.hash);
|
|
39
|
-
expect(material.scaledHash).to.equal(expectedHashes.FeO.scaledHash);
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { MaterialSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
-
import { expect } from "chai";
|
|
3
|
-
|
|
4
|
-
import { Material } from "../../../src/js/material";
|
|
5
|
-
import parsers from "../../../src/js/parsers/parsers";
|
|
6
|
-
import { Silicon, SiPWSCFInput } from "../fixtures";
|
|
7
|
-
|
|
8
|
-
describe("Parsers:Espresso", () => {
|
|
9
|
-
it("should return textual representation of a material according to QE pw.x input format", () => {
|
|
10
|
-
const material = new Material(Silicon);
|
|
11
|
-
expect(parsers.espresso.toEspressoFormat(material as MaterialSchema)).to.be.equal(
|
|
12
|
-
SiPWSCFInput,
|
|
13
|
-
);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import "../setup";
|
|
2
|
-
|
|
3
|
-
import { Utils } from "@mat3ra/utils";
|
|
4
|
-
import { expect } from "chai";
|
|
5
|
-
|
|
6
|
-
import nativeFormatParsers from "../../../src/js/parsers/native_format_parsers";
|
|
7
|
-
import { Graphene, GraphenePoscar, NiHex, NiHexPoscar } from "../fixtures";
|
|
8
|
-
|
|
9
|
-
const { assertDeepAlmostEqual } = Utils.assertion;
|
|
10
|
-
|
|
11
|
-
describe("Parsers.NativeFormat", () => {
|
|
12
|
-
it("should return a material config for graphene from a json", () => {
|
|
13
|
-
const json = JSON.stringify(Graphene);
|
|
14
|
-
expect(nativeFormatParsers.convertFromNativeFormat(json)).to.deep.equal(Graphene);
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it("should return a material config for graphene from a poscar", () => {
|
|
18
|
-
const poscar = GraphenePoscar;
|
|
19
|
-
const config = nativeFormatParsers.convertFromNativeFormat(poscar);
|
|
20
|
-
assertDeepAlmostEqual(config, Graphene, ["basis.labels", "lattice"]);
|
|
21
|
-
assertDeepAlmostEqual(config.lattice, Graphene.lattice, ["type"]);
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("should return a material config for Ni hex from a poscar", () => {
|
|
25
|
-
const poscar = NiHexPoscar;
|
|
26
|
-
const config = nativeFormatParsers.convertFromNativeFormat(poscar);
|
|
27
|
-
assertDeepAlmostEqual(config, NiHex, ["lattice", "basis.labels"]);
|
|
28
|
-
assertDeepAlmostEqual(config.lattice, NiHex.lattice, ["type"]); // to omit "lattice.type" property
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it("should throw an error for unknown format", () => {
|
|
32
|
-
const text = "A\n snippet from an unknown format";
|
|
33
|
-
expect(() => nativeFormatParsers.convertFromNativeFormat(text)).to.throw("Unknown format");
|
|
34
|
-
});
|
|
35
|
-
});
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { expect } from "chai";
|
|
2
|
-
|
|
3
|
-
import { AtomicConstraints } from "../../../src/js/constraints/constraints";
|
|
4
|
-
import { Material } from "../../../src/js/material";
|
|
5
|
-
import parsers from "../../../src/js/parsers/parsers";
|
|
6
|
-
import { atomsCount } from "../../../src/js/parsers/poscar";
|
|
7
|
-
import {
|
|
8
|
-
atomicConstraints,
|
|
9
|
-
H2OPoscar,
|
|
10
|
-
Na4Cl4,
|
|
11
|
-
Na4Cl4Poscar,
|
|
12
|
-
Silicon,
|
|
13
|
-
Zr1H23Zr1H1,
|
|
14
|
-
Zr1H23Zr1H1Poscar,
|
|
15
|
-
} from "../fixtures";
|
|
16
|
-
|
|
17
|
-
const O2_POSCAR_WITH_COMMENTS = `O2 molecule in a box
|
|
18
|
-
1.0 ! universal scaling parameters
|
|
19
|
-
12.0 0.0 0.0 ! lattice vector a(1)
|
|
20
|
-
0.0 12.0 0.0 ! lattice vector a(2)
|
|
21
|
-
0.0 0.0 12.0 ! lattice vector a(3)
|
|
22
|
-
O
|
|
23
|
-
2 ! number of atoms
|
|
24
|
-
cart ! positions in cartesian coordinates
|
|
25
|
-
0 0 0 O
|
|
26
|
-
0 0 1.21 O
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
describe("Parsers.POSCAR", () => {
|
|
30
|
-
it("should return a valid poscar", () => {
|
|
31
|
-
const material = new Material(Na4Cl4);
|
|
32
|
-
expect(`${material.getAsPOSCAR()}\n`).to.be.equal(Na4Cl4Poscar);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it("should return poscar elements line according to id in basis, duplicate entries separate", () => {
|
|
36
|
-
const material = new Material(Zr1H23Zr1H1);
|
|
37
|
-
expect(`${material.getAsPOSCAR()}\n`).to.be.equal(Zr1H23Zr1H1Poscar);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it("should return the number of atoms for a molecule in a poscar file", () => {
|
|
41
|
-
expect(atomsCount(H2OPoscar)).to.be.equal(3);
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it("should detect POSCAR with VASP-style comments", () => {
|
|
45
|
-
expect(parsers.poscar.isPoscar(O2_POSCAR_WITH_COMMENTS)).to.be.equal(true);
|
|
46
|
-
expect(parsers.nativeFormatParsers.detectFormat(O2_POSCAR_WITH_COMMENTS)).to.be.equal(
|
|
47
|
-
"poscar",
|
|
48
|
-
);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it("should parse POSCAR with VASP-style comments", () => {
|
|
52
|
-
const materialConfig = parsers.poscar.fromPoscar(O2_POSCAR_WITH_COMMENTS);
|
|
53
|
-
expect(materialConfig).to.have.property("basis");
|
|
54
|
-
expect((materialConfig as { basis: { elements: object[] } }).basis.elements).to.have.length(
|
|
55
|
-
2,
|
|
56
|
-
);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
it("should return constraints as string with given map function", () => {
|
|
60
|
-
const constraints = AtomicConstraints.fromObjects(atomicConstraints);
|
|
61
|
-
expect(
|
|
62
|
-
constraints.getAsStringByIndex(0, parsers.poscar.atomicConstraintsCharFromBool),
|
|
63
|
-
).to.be.equal("T T F");
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it("should generate POSCAR with constraints if they were present", () => {
|
|
67
|
-
const newBasisXYZ = `Si 0.000000 0.000000 0.000000 0 0 0
|
|
68
|
-
Ge 0.250000 0.250000 0.250000 1 1 1
|
|
69
|
-
`;
|
|
70
|
-
const poscarConstraints = `Silicon FCC
|
|
71
|
-
1.0
|
|
72
|
-
3.348920000\t 0.000000000\t 1.933500000
|
|
73
|
-
1.116307000\t 3.157392000\t 1.933500000
|
|
74
|
-
0.000000000\t 0.000000000\t 3.867000000
|
|
75
|
-
Si Ge
|
|
76
|
-
1 1
|
|
77
|
-
Selective dynamics
|
|
78
|
-
direct
|
|
79
|
-
0.000000000 0.000000000 0.000000000 F F F Si
|
|
80
|
-
0.250000000 0.250000000 0.250000000 T T T Ge`;
|
|
81
|
-
|
|
82
|
-
const material = new Material(Silicon);
|
|
83
|
-
const clonedMaterial = material.clone();
|
|
84
|
-
clonedMaterial.setBasis(newBasisXYZ, "xyz", clonedMaterial.Basis.units);
|
|
85
|
-
|
|
86
|
-
const poscar = clonedMaterial.getAsPOSCAR(true);
|
|
87
|
-
expect(poscar).to.be.equal(poscarConstraints);
|
|
88
|
-
});
|
|
89
|
-
});
|
package/tests/js/parsers/xyz.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Utils } from "@mat3ra/utils";
|
|
2
|
-
|
|
3
|
-
import parsers from "../../../src/js/parsers/parsers";
|
|
4
|
-
import { FeO, Silicon } from "../fixtures";
|
|
5
|
-
|
|
6
|
-
const { assertDeepAlmostEqual } = Utils.assertion;
|
|
7
|
-
|
|
8
|
-
describe("Parsers:XYZ", () => {
|
|
9
|
-
it("should extract basis from XYZ text", () => {
|
|
10
|
-
const text = "Si 0 0 0 \n Si 0.25 0.25 0.25";
|
|
11
|
-
assertDeepAlmostEqual(parsers.xyz.toBasisConfig(text), Silicon.basis, [
|
|
12
|
-
"constraints",
|
|
13
|
-
"cell",
|
|
14
|
-
"units",
|
|
15
|
-
]);
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it("should extract basis from XYZ text with atomic labels", () => {
|
|
19
|
-
const text =
|
|
20
|
-
"Fe1 0.00 0.00 0.00 1 1 1\n" +
|
|
21
|
-
"Fe2 0.50 0.50 0.50 1 1 1\n" +
|
|
22
|
-
"O 0.25 0.25 0.25 1 1 1\n" +
|
|
23
|
-
"O 0.75 0.75 0.75 1 1 1";
|
|
24
|
-
assertDeepAlmostEqual(parsers.xyz.toBasisConfig(text), FeO.basis, ["cell", "units"]);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it("should return [true, true, true] as constraints for the line without any constraints", () => {
|
|
28
|
-
const text = "Si 0 0 0 0 1 1\n Si 0.25 0.25 0.25";
|
|
29
|
-
const basis = parsers.xyz.toBasisConfig(text);
|
|
30
|
-
assertDeepAlmostEqual(basis.constraints[0].value, [false, true, true]);
|
|
31
|
-
assertDeepAlmostEqual(basis.constraints[1].value, [true, true, true]);
|
|
32
|
-
});
|
|
33
|
-
});
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { expect } from "chai";
|
|
2
|
-
|
|
3
|
-
import { Basis } from "../../../src/js/basis/basis";
|
|
4
|
-
import { CombinatorialBasis } from "../../../src/js/parsers/xyz_combinatorial_basis";
|
|
5
|
-
import { AsGeBasis, FeLiSiBasis, Ge2Basis, OSiBasis, Si2Basis } from "../fixtures";
|
|
6
|
-
|
|
7
|
-
describe("Parsers:CombinatorialBasis", () => {
|
|
8
|
-
it("toBasisConfig", () => {
|
|
9
|
-
// eslint-disable-next-line new-cap
|
|
10
|
-
const basisConfig2 = CombinatorialBasis.toBasisConfigForElementsAndCoordinates([
|
|
11
|
-
{
|
|
12
|
-
element: "Si",
|
|
13
|
-
coordinate: [0, 0, 0],
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
element: "Li",
|
|
17
|
-
coordinate: [0.3, 0.3, 0.3],
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
element: "Fe",
|
|
21
|
-
coordinate: [0.5, 0.5, 0.5],
|
|
22
|
-
},
|
|
23
|
-
]);
|
|
24
|
-
const [basis1, basis2] = [
|
|
25
|
-
new Basis(FeLiSiBasis),
|
|
26
|
-
Basis.fromElementsAndCoordinates(basisConfig2),
|
|
27
|
-
];
|
|
28
|
-
|
|
29
|
-
expect(basis1.isEqualTo(basis2)).to.equal(true);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it("Regular XYZ", () => {
|
|
33
|
-
const xyz = `
|
|
34
|
-
Si 0.0 0.0 0.0
|
|
35
|
-
O 0.5 0.5 0.5
|
|
36
|
-
`;
|
|
37
|
-
const basis = new CombinatorialBasis(xyz);
|
|
38
|
-
expect(basis.uniqueElements).deep.equal(["O", "Si"]);
|
|
39
|
-
const basis1 = Basis.fromElementsAndCoordinates(basis.allBasisConfigs[0]);
|
|
40
|
-
const basis2 = new Basis(OSiBasis);
|
|
41
|
-
expect(basis1.isEqualTo(basis2)).to.equal(true);
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it("Permutation XYZ", () => {
|
|
45
|
-
const permutation = `
|
|
46
|
-
Si/Ge/As 0.0 0.0 0.0
|
|
47
|
-
Si/Ge 0.5 0.5 0.5
|
|
48
|
-
`;
|
|
49
|
-
const basis = new CombinatorialBasis(permutation);
|
|
50
|
-
expect(basis.uniqueElements).deep.equal(["As", "Ge", "Si"]);
|
|
51
|
-
const basisList1 = basis.allBasisConfigs.map((c) => Basis.fromElementsAndCoordinates(c));
|
|
52
|
-
const basisList2 = [Si2Basis, Ge2Basis, AsGeBasis].map((c) => new Basis(c));
|
|
53
|
-
|
|
54
|
-
basisList1.forEach((basis1) => {
|
|
55
|
-
const condition = basisList2
|
|
56
|
-
.map((basis2) => basis2.isEqualTo(basis1))
|
|
57
|
-
.reduce((a, b) => a || b);
|
|
58
|
-
expect(condition).to.equal(true);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it("Combination XYZ", () => {
|
|
63
|
-
const combination = `
|
|
64
|
-
Si,Ge,As 0.0 0.0 0.0
|
|
65
|
-
Si,Ge 0.5 0.5 0.5
|
|
66
|
-
`;
|
|
67
|
-
const basis = new CombinatorialBasis(combination);
|
|
68
|
-
expect(basis.uniqueElements).deep.equal(["As", "Ge", "Si"]);
|
|
69
|
-
|
|
70
|
-
const basisList1 = basis.allBasisConfigs.map((c) => Basis.fromElementsAndCoordinates(c));
|
|
71
|
-
expect(basisList1.length).to.equal(6);
|
|
72
|
-
|
|
73
|
-
const basisList2 = [
|
|
74
|
-
CombinatorialBasis.toBasisConfigForElementsAndCoordinates([
|
|
75
|
-
{
|
|
76
|
-
element: "Si",
|
|
77
|
-
coordinate: [0, 0, 0],
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
element: "Si",
|
|
81
|
-
coordinate: [0.5, 0.5, 0.5],
|
|
82
|
-
},
|
|
83
|
-
]),
|
|
84
|
-
CombinatorialBasis.toBasisConfigForElementsAndCoordinates([
|
|
85
|
-
{
|
|
86
|
-
element: "Si",
|
|
87
|
-
coordinate: [0, 0, 0],
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
element: "Ge",
|
|
91
|
-
coordinate: [0.5, 0.5, 0.5],
|
|
92
|
-
},
|
|
93
|
-
]),
|
|
94
|
-
CombinatorialBasis.toBasisConfigForElementsAndCoordinates([
|
|
95
|
-
{
|
|
96
|
-
element: "Ge",
|
|
97
|
-
coordinate: [0, 0, 0],
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
element: "Si",
|
|
101
|
-
coordinate: [0.5, 0.5, 0.5],
|
|
102
|
-
},
|
|
103
|
-
]),
|
|
104
|
-
CombinatorialBasis.toBasisConfigForElementsAndCoordinates([
|
|
105
|
-
{
|
|
106
|
-
element: "Ge",
|
|
107
|
-
coordinate: [0, 0, 0],
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
element: "Ge",
|
|
111
|
-
coordinate: [0.5, 0.5, 0.5],
|
|
112
|
-
},
|
|
113
|
-
]),
|
|
114
|
-
CombinatorialBasis.toBasisConfigForElementsAndCoordinates([
|
|
115
|
-
{
|
|
116
|
-
element: "As",
|
|
117
|
-
coordinate: [0, 0, 0],
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
element: "Si",
|
|
121
|
-
coordinate: [0.5, 0.5, 0.5],
|
|
122
|
-
},
|
|
123
|
-
]),
|
|
124
|
-
CombinatorialBasis.toBasisConfigForElementsAndCoordinates([
|
|
125
|
-
{
|
|
126
|
-
element: "As",
|
|
127
|
-
coordinate: [0, 0, 0],
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
element: "Ge",
|
|
131
|
-
coordinate: [0.5, 0.5, 0.5],
|
|
132
|
-
},
|
|
133
|
-
]),
|
|
134
|
-
].map((c) => Basis.fromElementsAndCoordinates(c));
|
|
135
|
-
|
|
136
|
-
basisList1.forEach((basis1) => {
|
|
137
|
-
const condition = basisList2
|
|
138
|
-
.map((basis2) => basis2.isEqualTo(basis1))
|
|
139
|
-
.reduce((a, b) => a || b);
|
|
140
|
-
expect(condition).to.equal(true);
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
it("Mixing combination and permutation should fail", () => {
|
|
145
|
-
const mixedInMultipleLines = `
|
|
146
|
-
Si/Ge/As 0.0 0.0 0.0\n
|
|
147
|
-
Si,Ge 0.5 0.5 0.5
|
|
148
|
-
`;
|
|
149
|
-
const mixedInOneLine = `
|
|
150
|
-
Si/Ge,As 0.0 0.0 0.0
|
|
151
|
-
`;
|
|
152
|
-
// Wrapping into function as recommended in: http://chaijs.com/api/bdd/
|
|
153
|
-
expect(() => new CombinatorialBasis(mixedInMultipleLines)).to.throw();
|
|
154
|
-
expect(() => new CombinatorialBasis(mixedInOneLine)).to.throw();
|
|
155
|
-
});
|
|
156
|
-
});
|
package/tests/js/setup.ts
DELETED
package/tests/js/tools/basis.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Utils } from "@mat3ra/utils";
|
|
2
|
-
|
|
3
|
-
import { Basis } from "../../../src/js/basis/basis";
|
|
4
|
-
import tools from "../../../src/js/tools";
|
|
5
|
-
import { H2HFinal, H2HImage, H2HInitial, Si2Basis, Si2BasisRepeated } from "../fixtures";
|
|
6
|
-
|
|
7
|
-
const { assertDeepAlmostEqual } = Utils.assertion;
|
|
8
|
-
|
|
9
|
-
describe("Tools:Basis", () => {
|
|
10
|
-
it("should return a repeated basis", () => {
|
|
11
|
-
const basis = new Basis(Si2Basis);
|
|
12
|
-
const repeatedBasis = tools.basis.repeat(basis, [2, 1, 1]);
|
|
13
|
-
assertDeepAlmostEqual(Si2BasisRepeated, repeatedBasis.toJSON());
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it("should return interpolated basises", () => {
|
|
17
|
-
const finalBasis = new Basis(H2HFinal.basis);
|
|
18
|
-
const initialBasis = new Basis(H2HInitial.basis);
|
|
19
|
-
const images = tools.basis.interpolate(initialBasis, finalBasis, 1);
|
|
20
|
-
assertDeepAlmostEqual(H2HImage.basis, images[0].toJSON());
|
|
21
|
-
});
|
|
22
|
-
});
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Matrix3X3Schema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
-
import { Utils } from "@mat3ra/utils";
|
|
3
|
-
import { expect } from "chai";
|
|
4
|
-
|
|
5
|
-
import { Basis } from "../../../src/js/basis/basis";
|
|
6
|
-
import { Made } from "../../../src/js/made";
|
|
7
|
-
import { Material } from "../../../src/js/material";
|
|
8
|
-
import { Silicon, SiSupercell } from "../fixtures";
|
|
9
|
-
|
|
10
|
-
const { assertDeepAlmostEqual } = Utils.assertion;
|
|
11
|
-
|
|
12
|
-
describe("Tools:Supercell", () => {
|
|
13
|
-
it("should generate supercell", () => {
|
|
14
|
-
const material = new Material(Silicon);
|
|
15
|
-
const supercell = Made.tools.supercell.generateConfig(material, [
|
|
16
|
-
[2, 0, 0],
|
|
17
|
-
[0, 2, 0],
|
|
18
|
-
[0, 0, 2],
|
|
19
|
-
] as Matrix3X3Schema);
|
|
20
|
-
// expect(supercell.lattice).deep.equal(SiSupercell.lattice, "lattices are not equal");
|
|
21
|
-
assertDeepAlmostEqual(supercell.lattice, SiSupercell.lattice, ["vectors"]);
|
|
22
|
-
|
|
23
|
-
const basis1 = new Basis(SiSupercell.basis);
|
|
24
|
-
const basis2 = new Basis(supercell.basis);
|
|
25
|
-
|
|
26
|
-
expect(basis1.isEqualTo(basis2)).to.be.equal(true);
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
it("should generate supercell with removed constraints", () => {
|
|
30
|
-
const newBasisXYZ = `Si 0.000000 0.000000 0.000000
|
|
31
|
-
Ge 0.250000 0.250000 0.250000
|
|
32
|
-
`;
|
|
33
|
-
const poscarNoConstraints = `Silicon FCC - supercell [[2,0,0],[0,1,0],[0,0,1]]
|
|
34
|
-
1.0
|
|
35
|
-
6.697840000\t 0.000000000\t 3.867000000
|
|
36
|
-
1.116307000\t 3.157392000\t 1.933500000
|
|
37
|
-
0.000000000\t 0.000000000\t 3.867000000
|
|
38
|
-
Si Ge
|
|
39
|
-
2 2
|
|
40
|
-
direct
|
|
41
|
-
0.000000000 0.000000000 0.000000000 Si
|
|
42
|
-
0.500000000 0.000000000 0.000000000 Si
|
|
43
|
-
0.125000000 0.250000000 0.250000000 Ge
|
|
44
|
-
0.625000000 0.250000000 0.250000000 Ge`;
|
|
45
|
-
const material = new Material(Silicon);
|
|
46
|
-
const clonedMaterial = material.clone();
|
|
47
|
-
clonedMaterial.setBasis(newBasisXYZ, "xyz", clonedMaterial.Basis.units);
|
|
48
|
-
const supercellConfig = Made.tools.supercell.generateConfig(clonedMaterial, [
|
|
49
|
-
[2, 0, 0],
|
|
50
|
-
[0, 1, 0],
|
|
51
|
-
[0, 0, 1],
|
|
52
|
-
] as Matrix3X3Schema);
|
|
53
|
-
|
|
54
|
-
const newMaterial = new Material(supercellConfig);
|
|
55
|
-
const poscar = newMaterial.getAsPOSCAR(true);
|
|
56
|
-
expect(poscar).to.be.equal(poscarNoConstraints);
|
|
57
|
-
});
|
|
58
|
-
});
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import type { MaterialSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
-
import { Utils } from "@mat3ra/utils";
|
|
3
|
-
|
|
4
|
-
import { Material } from "../../../src/js/material";
|
|
5
|
-
import tools from "../../../src/js/tools";
|
|
6
|
-
import { SlabConfigSchema } from "../../../src/js/tools/surface";
|
|
7
|
-
import { Silicon, SiSlab100, SiSlab111, SiSlab111NoVacuum } from "../fixtures";
|
|
8
|
-
|
|
9
|
-
const { assertDeepAlmostEqual } = Utils.assertion;
|
|
10
|
-
|
|
11
|
-
const generateSlabWithVacuum = (slabConfig: SlabConfigSchema, vacuumRatio: number) => {
|
|
12
|
-
const slabMaterial = new Material(slabConfig);
|
|
13
|
-
const { outOfPlaneAxisIndex } = slabConfig;
|
|
14
|
-
const AXES = ["a", "b", "c"] as const;
|
|
15
|
-
|
|
16
|
-
tools.material.scaleOneLatticeVector(
|
|
17
|
-
slabMaterial,
|
|
18
|
-
AXES[outOfPlaneAxisIndex],
|
|
19
|
-
1 / (1 - vacuumRatio),
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
return slabMaterial;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
describe("Tools:Surface", () => {
|
|
26
|
-
it("should return slab (100)", () => {
|
|
27
|
-
const material = new Material(Silicon);
|
|
28
|
-
const slabConfig = tools.surface.generateConfig(material, [1, 0, 0], 3, 1, 1);
|
|
29
|
-
assertDeepAlmostEqual(SiSlab100, slabConfig);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it("should return slab (111)", () => {
|
|
33
|
-
const material = new Material(Silicon);
|
|
34
|
-
const slabConfig = tools.surface.generateConfig(material, [1, 1, 1], 3, 1, 1);
|
|
35
|
-
assertDeepAlmostEqual(SiSlab111NoVacuum, slabConfig);
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
it("should return slab (111) even if ids shifted", () => {
|
|
39
|
-
const adjustedSilicon: MaterialSchema = {
|
|
40
|
-
...Silicon,
|
|
41
|
-
basis: {
|
|
42
|
-
elements: [
|
|
43
|
-
{
|
|
44
|
-
id: 10,
|
|
45
|
-
value: "Si",
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: 14,
|
|
49
|
-
value: "Si",
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
coordinates: [
|
|
53
|
-
{
|
|
54
|
-
id: 10,
|
|
55
|
-
value: [0.0, 0.0, 0.0],
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
id: 14,
|
|
59
|
-
value: [0.25, 0.25, 0.25],
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
const material = new Material(adjustedSilicon);
|
|
65
|
-
const slabConfig = tools.surface.generateConfig(material, [1, 1, 1], 3, 1, 1);
|
|
66
|
-
assertDeepAlmostEqual(SiSlab111NoVacuum, slabConfig);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it("should return slab (111) with vacuum", () => {
|
|
70
|
-
const material = new Material(Silicon);
|
|
71
|
-
const slabConfig = tools.surface.generateConfig(material, [1, 1, 1], 3, 1, 1);
|
|
72
|
-
const vacuumRatio = 0.5;
|
|
73
|
-
const slabMaterial = generateSlabWithVacuum(slabConfig, vacuumRatio);
|
|
74
|
-
const expectedSlabMaterial = new Material(SiSlab111);
|
|
75
|
-
const expectedMaterialJSON = expectedSlabMaterial.toJSON();
|
|
76
|
-
const slabMaterialJSON = slabMaterial.toJSON();
|
|
77
|
-
assertDeepAlmostEqual(expectedMaterialJSON, slabMaterialJSON);
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
it("should return slab (111) with vacuum for gamma = 59.999", () => {
|
|
81
|
-
const adjustedSilicon = {
|
|
82
|
-
...Silicon,
|
|
83
|
-
lattice: {
|
|
84
|
-
...Silicon.lattice,
|
|
85
|
-
gamma: 59.999,
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
const material = new Material(adjustedSilicon);
|
|
89
|
-
const slabConfig = tools.surface.generateConfig(material, [1, 1, 1], 3, 1, 1);
|
|
90
|
-
const vacuumRatio = 0.5;
|
|
91
|
-
const slabMaterial = generateSlabWithVacuum(slabConfig, vacuumRatio);
|
|
92
|
-
const expectedSlabMaterial = new Material(SiSlab111);
|
|
93
|
-
const expectedMaterialJSON = expectedSlabMaterial.toJSON();
|
|
94
|
-
const slabMaterialJSON = slabMaterial.toJSON();
|
|
95
|
-
assertDeepAlmostEqual(expectedMaterialJSON, slabMaterialJSON);
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
it("should return slab (111) with vacuum for gamma = 60.001", () => {
|
|
99
|
-
const adjustedSilicon = {
|
|
100
|
-
...Silicon,
|
|
101
|
-
lattice: {
|
|
102
|
-
...Silicon.lattice,
|
|
103
|
-
gamma: 60.001,
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
const material = new Material(adjustedSilicon);
|
|
107
|
-
const slabConfig = tools.surface.generateConfig(material, [1, 1, 1], 3, 1, 1);
|
|
108
|
-
const vacuumRatio = 0.5;
|
|
109
|
-
const slabMaterial = generateSlabWithVacuum(slabConfig, vacuumRatio);
|
|
110
|
-
const expectedSlabMaterial = new Material(SiSlab111);
|
|
111
|
-
const expectedMaterialJSON = expectedSlabMaterial.toJSON();
|
|
112
|
-
const slabMaterialJSON = slabMaterial.toJSON();
|
|
113
|
-
assertDeepAlmostEqual(expectedMaterialJSON, slabMaterialJSON);
|
|
114
|
-
});
|
|
115
|
-
});
|