@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
package/dist/js/material.d.ts
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { type DefaultableInMemoryEntity, InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
-
import { type HasConsistencyChecks } from "@mat3ra/code/dist/js/entity/mixins/HasConsistencyChecksMixin";
|
|
3
|
-
import { type HasMetadata } from "@mat3ra/code/dist/js/entity/mixins/HasMetadataMixin";
|
|
4
|
-
import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types";
|
|
5
|
-
import type { AtomicConstraintsSchema, ConsistencyCheck, DerivedPropertiesSchema, FileSourceSchema, LatticeSchema, MaterialSchema } from "@mat3ra/esse/dist/js/types";
|
|
6
|
-
import type { BasisConfig } from "./basis/basis";
|
|
7
|
-
import { type ConstrainedBasisConfig, ConstrainedBasis } from "./basis/constrained_basis";
|
|
8
|
-
import { Constraint } from "./constraints/constraints";
|
|
9
|
-
import { Lattice } from "./lattice/lattice";
|
|
10
|
-
interface Material extends HasConsistencyChecks, DefaultableInMemoryEntity, Required<HasMetadata<MaterialSchema["metadata"]>> {
|
|
11
|
-
}
|
|
12
|
-
type MaterialSchemaWithConsistencyChecksAsString = Omit<MaterialSchema, "consistencyChecks"> & {
|
|
13
|
-
consistencyChecks?: ConsistencyCheck[];
|
|
14
|
-
};
|
|
15
|
-
type OptionallyConstrainedBasisConfig = BasisConfig & Partial<Pick<ConstrainedBasisConfig, "constraints">>;
|
|
16
|
-
type Schema = MaterialSchemaWithConsistencyChecksAsString;
|
|
17
|
-
export declare const defaultMaterialConfig: MaterialSchema;
|
|
18
|
-
declare class Material extends InMemoryEntity implements Schema {
|
|
19
|
-
static createDefault: () => Material;
|
|
20
|
-
static get defaultConfig(): MaterialSchema;
|
|
21
|
-
static constructMaterialFileSource(fileName: string, fileContent: string, fileExtension: string): FileSourceSchema;
|
|
22
|
-
get name(): string;
|
|
23
|
-
set name(name: string);
|
|
24
|
-
get src(): FileSourceSchema | undefined;
|
|
25
|
-
set src(src: FileSourceSchema | undefined);
|
|
26
|
-
updateFormula(): void;
|
|
27
|
-
/**
|
|
28
|
-
* Gets Bolean value for whether or not a material is non-periodic vs periodic.
|
|
29
|
-
* False = periodic, True = non-periodic
|
|
30
|
-
*/
|
|
31
|
-
get isNonPeriodic(): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* @summary Sets the value of isNonPeriodic based on Boolean value passed as an argument.
|
|
34
|
-
*/
|
|
35
|
-
set isNonPeriodic(bool: boolean);
|
|
36
|
-
/**
|
|
37
|
-
* @summary Returns the specific derived property (as specified by name) for a material.
|
|
38
|
-
*/
|
|
39
|
-
getDerivedPropertyByName(name: string): {
|
|
40
|
-
name?: "volume";
|
|
41
|
-
units?: "angstrom^3";
|
|
42
|
-
value: number;
|
|
43
|
-
} | {
|
|
44
|
-
name?: "density";
|
|
45
|
-
units?: "g/cm^3";
|
|
46
|
-
value: number;
|
|
47
|
-
} | {
|
|
48
|
-
pointGroupSymbol?: string;
|
|
49
|
-
spaceGroupSymbol?: string;
|
|
50
|
-
tolerance?: {
|
|
51
|
-
units?: "angstrom";
|
|
52
|
-
value: number;
|
|
53
|
-
};
|
|
54
|
-
name?: "symmetry";
|
|
55
|
-
} | {
|
|
56
|
-
name?: "elemental_ratio";
|
|
57
|
-
value: number;
|
|
58
|
-
element?: string;
|
|
59
|
-
} | {
|
|
60
|
-
name?: "p-norm";
|
|
61
|
-
degree?: number;
|
|
62
|
-
value: number;
|
|
63
|
-
} | {
|
|
64
|
-
name?: "inchi";
|
|
65
|
-
value: string;
|
|
66
|
-
} | {
|
|
67
|
-
name?: "inchi_key";
|
|
68
|
-
value: string;
|
|
69
|
-
} | undefined;
|
|
70
|
-
/**
|
|
71
|
-
* @summary Returns the derived properties array for a material.
|
|
72
|
-
*/
|
|
73
|
-
getDerivedProperties(): DerivedPropertiesSchema;
|
|
74
|
-
/**
|
|
75
|
-
* Gets material's formula
|
|
76
|
-
*/
|
|
77
|
-
get formula(): string;
|
|
78
|
-
get unitCellFormula(): string;
|
|
79
|
-
unsetFileProps(): void;
|
|
80
|
-
/**
|
|
81
|
-
* @param textOrObject Basis text or JSON object.
|
|
82
|
-
* @param format Format (xyz, etc.)
|
|
83
|
-
* @param unitz crystal/cartesian
|
|
84
|
-
*/
|
|
85
|
-
setBasis(textOrObject: string | BasisConfig, format?: string, unitz?: string): void;
|
|
86
|
-
setBasisConstraints(constraints: Constraint[]): void;
|
|
87
|
-
setBasisConstraintsFromArrayOfObjects(constraints: AtomicConstraintsSchema): void;
|
|
88
|
-
get basis(): OptionallyConstrainedBasisConfig;
|
|
89
|
-
get Basis(): ConstrainedBasis;
|
|
90
|
-
/**
|
|
91
|
-
* High-level access to unique elements from material instead of basis.
|
|
92
|
-
*/
|
|
93
|
-
get uniqueElements(): ("H" | "He" | "Li" | "Be" | "B" | "C" | "N" | "O" | "F" | "Ne" | "Na" | "Mg" | "Al" | "Si" | "P" | "S" | "Cl" | "Ar" | "K" | "Ca" | "Sc" | "Ti" | "V" | "Cr" | "Mn" | "Fe" | "Co" | "Ni" | "Cu" | "Zn" | "Ga" | "Ge" | "As" | "Se" | "Br" | "Kr" | "Rb" | "Sr" | "Y" | "Zr" | "Nb" | "Mo" | "Tc" | "Ru" | "Rh" | "Pd" | "Ag" | "Cd" | "In" | "Sn" | "Sb" | "Te" | "I" | "Xe" | "Cs" | "Ba" | "La" | "Ce" | "Pr" | "Nd" | "Pm" | "Sm" | "Eu" | "Gd" | "Tb" | "Dy" | "Ho" | "Er" | "Tm" | "Yb" | "Lu" | "Hf" | "Ta" | "W" | "Re" | "Os" | "Ir" | "Pt" | "Au" | "Hg" | "Tl" | "Pb" | "Bi" | "Po" | "At" | "Rn" | "Fr" | "Ra" | "Ac" | "Th" | "Pa" | "U" | "Np" | "Pu" | "Am" | "Cm" | "Bk" | "Cf" | "Es" | "Fm" | "Md" | "No" | "Lr" | "Rf" | "Db" | "Sg" | "Bh" | "Hs" | "Mt" | "Ds" | "Rg" | "Cn" | "Nh" | "Fl" | "Mc" | "Lv" | "Ts" | "Og" | "X" | "Vac")[];
|
|
94
|
-
get lattice(): LatticeSchema;
|
|
95
|
-
set lattice(config: LatticeSchema);
|
|
96
|
-
get Lattice(): Lattice;
|
|
97
|
-
/**
|
|
98
|
-
* Returns the inchi string from the derivedProperties for a non-periodic material, or throws an error if the
|
|
99
|
-
* inchi cannot be found.
|
|
100
|
-
* @returns {String}
|
|
101
|
-
*/
|
|
102
|
-
getInchiStringForHash(): string;
|
|
103
|
-
/**
|
|
104
|
-
* Calculates hash from basis and lattice. Algorithm expects the following:
|
|
105
|
-
* - asserts lattice units to be angstrom
|
|
106
|
-
* - asserts basis units to be crystal
|
|
107
|
-
* - asserts basis coordinates and lattice measurements are rounded to hash precision
|
|
108
|
-
* - forms strings for lattice and basis
|
|
109
|
-
* - creates MD5 hash from basisStr + latticeStr + salt
|
|
110
|
-
* @param salt Salt for hashing, empty string by default.
|
|
111
|
-
* @param isScaled Whether to scale the lattice parameter 'a' to 1.
|
|
112
|
-
*/
|
|
113
|
-
calculateHash(salt?: string, isScaled?: boolean, bypassNonPeriodicCheck?: boolean): string;
|
|
114
|
-
set hash(hash: string);
|
|
115
|
-
get hash(): string;
|
|
116
|
-
/**
|
|
117
|
-
* Calculates hash from basis and lattice as above + scales lattice properties to make lattice.a = 1
|
|
118
|
-
*/
|
|
119
|
-
get scaledHash(): string;
|
|
120
|
-
get external(): MaterialSchema["external"];
|
|
121
|
-
set external(external: MaterialSchema["external"]);
|
|
122
|
-
/**
|
|
123
|
-
* Converts basis to crystal/fractional coordinates.
|
|
124
|
-
*/
|
|
125
|
-
toCrystal(): void;
|
|
126
|
-
/**
|
|
127
|
-
* Converts current material's basis coordinates to cartesian.
|
|
128
|
-
* No changes if coordinates already cartesian.
|
|
129
|
-
*/
|
|
130
|
-
toCartesian(): void;
|
|
131
|
-
/**
|
|
132
|
-
* Returns material's basis in XYZ format.
|
|
133
|
-
*/
|
|
134
|
-
getBasisAsXyz(fractional?: boolean): string;
|
|
135
|
-
/**
|
|
136
|
-
* Returns material in Quantum Espresso output format:
|
|
137
|
-
* ```
|
|
138
|
-
* CELL_PARAMETERS (angstroms)
|
|
139
|
-
* -0.543131284 -0.000000000 0.543131284
|
|
140
|
-
* -0.000000000 0.543131284 0.543131284
|
|
141
|
-
* -0.543131284 0.543131284 0.000000000
|
|
142
|
-
*
|
|
143
|
-
* ATOMIC_POSITIONS (crystal)
|
|
144
|
-
* Si 0.000000000 0.000000000 -0.000000000
|
|
145
|
-
* Si 0.250000000 0.250000000 0.250000000
|
|
146
|
-
* ```
|
|
147
|
-
*/
|
|
148
|
-
getAsQEFormat(): string;
|
|
149
|
-
/**
|
|
150
|
-
* Returns material in POSCAR format. Pass `true` to ignore original poscar source and re-serialize.
|
|
151
|
-
*/
|
|
152
|
-
getAsPOSCAR(ignoreOriginal?: boolean, omitConstraints?: boolean): string;
|
|
153
|
-
/**
|
|
154
|
-
* Returns a copy of the material with conventional cell constructed instead of primitive.
|
|
155
|
-
*/
|
|
156
|
-
getACopyWithConventionalCell(): this;
|
|
157
|
-
/**
|
|
158
|
-
* @summary a series of checks for the material and returns an array of results in ConsistencyChecks format.
|
|
159
|
-
* @returns Array of checks results
|
|
160
|
-
*/
|
|
161
|
-
getConsistencyChecks(): ConsistencyCheck[];
|
|
162
|
-
/**
|
|
163
|
-
* @summary a series of checks for the material's basis and returns an array of results in ConsistencyChecks format.
|
|
164
|
-
* @returns Array of checks results
|
|
165
|
-
*/
|
|
166
|
-
getBasisConsistencyChecks(): ConsistencyCheck[];
|
|
167
|
-
toJSON(): MaterialSchema & AnyObject;
|
|
168
|
-
}
|
|
169
|
-
export { Material };
|
package/dist/js/material.js
DELETED
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Material = exports.defaultMaterialConfig = void 0;
|
|
7
|
-
const entity_1 = require("@mat3ra/code/dist/js/entity");
|
|
8
|
-
const DefaultableMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/DefaultableMixin");
|
|
9
|
-
const HasConsistencyChecksMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/HasConsistencyChecksMixin");
|
|
10
|
-
const HasMetadataMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/HasMetadataMixin");
|
|
11
|
-
const crypto_js_1 = __importDefault(require("crypto-js"));
|
|
12
|
-
const constrained_basis_1 = require("./basis/constrained_basis");
|
|
13
|
-
const conventional_cell_1 = require("./cell/conventional_cell");
|
|
14
|
-
const constraints_1 = require("./constraints/constraints");
|
|
15
|
-
const lattice_1 = require("./lattice/lattice");
|
|
16
|
-
const parsers_1 = __importDefault(require("./parsers/parsers"));
|
|
17
|
-
const supercell_1 = __importDefault(require("./tools/supercell"));
|
|
18
|
-
exports.defaultMaterialConfig = {
|
|
19
|
-
name: "Silicon FCC",
|
|
20
|
-
basis: {
|
|
21
|
-
elements: [
|
|
22
|
-
{
|
|
23
|
-
id: 0,
|
|
24
|
-
value: "Si",
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: 1,
|
|
28
|
-
value: "Si",
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
coordinates: [
|
|
32
|
-
{
|
|
33
|
-
id: 0,
|
|
34
|
-
value: [0.0, 0.0, 0.0],
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: 1,
|
|
38
|
-
value: [0.25, 0.25, 0.25],
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
units: "crystal",
|
|
42
|
-
},
|
|
43
|
-
lattice: {
|
|
44
|
-
// Primitive cell for Diamond FCC Silicon at ambient conditions
|
|
45
|
-
type: "FCC",
|
|
46
|
-
a: 3.867,
|
|
47
|
-
b: 3.867,
|
|
48
|
-
c: 3.867,
|
|
49
|
-
alpha: 60,
|
|
50
|
-
beta: 60,
|
|
51
|
-
gamma: 60,
|
|
52
|
-
units: {
|
|
53
|
-
length: "angstrom",
|
|
54
|
-
angle: "degree",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
metadata: {},
|
|
58
|
-
};
|
|
59
|
-
class Material extends entity_1.InMemoryEntity {
|
|
60
|
-
static get defaultConfig() {
|
|
61
|
-
return exports.defaultMaterialConfig;
|
|
62
|
-
}
|
|
63
|
-
static constructMaterialFileSource(fileName, fileContent, fileExtension) {
|
|
64
|
-
return {
|
|
65
|
-
extension: fileExtension,
|
|
66
|
-
filename: fileName,
|
|
67
|
-
text: fileContent,
|
|
68
|
-
hash: crypto_js_1.default.MD5(fileContent).toString(),
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
get name() {
|
|
72
|
-
var _a;
|
|
73
|
-
return (_a = this.prop("name")) !== null && _a !== void 0 ? _a : this.formula; // if name is not set, use formula, but keep empty string
|
|
74
|
-
}
|
|
75
|
-
set name(name) {
|
|
76
|
-
this.setProp("name", name);
|
|
77
|
-
}
|
|
78
|
-
get src() {
|
|
79
|
-
return this.prop("src");
|
|
80
|
-
}
|
|
81
|
-
set src(src) {
|
|
82
|
-
this.setProp("src", src);
|
|
83
|
-
}
|
|
84
|
-
updateFormula() {
|
|
85
|
-
this.setProp("formula", this.Basis.formula);
|
|
86
|
-
this.setProp("unitCellFormula", this.Basis.unitCellFormula);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Gets Bolean value for whether or not a material is non-periodic vs periodic.
|
|
90
|
-
* False = periodic, True = non-periodic
|
|
91
|
-
*/
|
|
92
|
-
get isNonPeriodic() {
|
|
93
|
-
return this.prop("isNonPeriodic", false);
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* @summary Sets the value of isNonPeriodic based on Boolean value passed as an argument.
|
|
97
|
-
*/
|
|
98
|
-
set isNonPeriodic(bool) {
|
|
99
|
-
this.setProp("isNonPeriodic", bool);
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* @summary Returns the specific derived property (as specified by name) for a material.
|
|
103
|
-
*/
|
|
104
|
-
getDerivedPropertyByName(name) {
|
|
105
|
-
return this.getDerivedProperties().find((x) => x.name === name);
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* @summary Returns the derived properties array for a material.
|
|
109
|
-
*/
|
|
110
|
-
getDerivedProperties() {
|
|
111
|
-
return this.prop("derivedProperties", []);
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Gets material's formula
|
|
115
|
-
*/
|
|
116
|
-
get formula() {
|
|
117
|
-
return this.prop("formula") || this.Basis.formula;
|
|
118
|
-
}
|
|
119
|
-
get unitCellFormula() {
|
|
120
|
-
return this.prop("unitCellFormula") || this.Basis.unitCellFormula;
|
|
121
|
-
}
|
|
122
|
-
unsetFileProps() {
|
|
123
|
-
this.unsetProp("src");
|
|
124
|
-
this.unsetProp("icsdId");
|
|
125
|
-
this.unsetProp("external");
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* @param textOrObject Basis text or JSON object.
|
|
129
|
-
* @param format Format (xyz, etc.)
|
|
130
|
-
* @param unitz crystal/cartesian
|
|
131
|
-
*/
|
|
132
|
-
setBasis(textOrObject, format, unitz) {
|
|
133
|
-
let basis;
|
|
134
|
-
if (typeof textOrObject === "string" && format === "xyz") {
|
|
135
|
-
basis = parsers_1.default.xyz.toBasisConfig(textOrObject, unitz);
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
basis = textOrObject;
|
|
139
|
-
}
|
|
140
|
-
this.setProp("basis", basis);
|
|
141
|
-
this.unsetFileProps();
|
|
142
|
-
this.updateFormula();
|
|
143
|
-
}
|
|
144
|
-
setBasisConstraints(constraints) {
|
|
145
|
-
const basisWithConstraints = {
|
|
146
|
-
...this.basis,
|
|
147
|
-
constraints: constraints.map((c) => c.toJSON()),
|
|
148
|
-
};
|
|
149
|
-
this.setBasis(basisWithConstraints);
|
|
150
|
-
}
|
|
151
|
-
setBasisConstraintsFromArrayOfObjects(constraints) {
|
|
152
|
-
const constraintsInstances = constraints.map((c) => {
|
|
153
|
-
return constraints_1.Constraint.fromValueAndId(c.value, c.id);
|
|
154
|
-
});
|
|
155
|
-
this.setBasisConstraints(constraintsInstances);
|
|
156
|
-
}
|
|
157
|
-
get basis() {
|
|
158
|
-
return this.requiredProp("basis");
|
|
159
|
-
}
|
|
160
|
-
// returns the instance of {ConstrainedBasis} class
|
|
161
|
-
get Basis() {
|
|
162
|
-
const basisData = this.basis;
|
|
163
|
-
return new constrained_basis_1.ConstrainedBasis({
|
|
164
|
-
...basisData,
|
|
165
|
-
cell: this.Lattice.vectors,
|
|
166
|
-
constraints: basisData.constraints || [],
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* High-level access to unique elements from material instead of basis.
|
|
171
|
-
*/
|
|
172
|
-
get uniqueElements() {
|
|
173
|
-
return this.Basis.uniqueElements;
|
|
174
|
-
}
|
|
175
|
-
get lattice() {
|
|
176
|
-
return this.prop("lattice");
|
|
177
|
-
}
|
|
178
|
-
set lattice(config) {
|
|
179
|
-
const originalIsInCrystalUnits = this.Basis.isInCrystalUnits;
|
|
180
|
-
const basis = this.Basis;
|
|
181
|
-
basis.toCartesian();
|
|
182
|
-
const newLattice = new lattice_1.Lattice(config);
|
|
183
|
-
basis.cell = newLattice.vectors;
|
|
184
|
-
if (originalIsInCrystalUnits)
|
|
185
|
-
basis.toCrystal();
|
|
186
|
-
// Preserve all properties from the original basis to ensure constraints are included
|
|
187
|
-
const newBasisConfig = basis.toJSON();
|
|
188
|
-
this.setProp("basis", newBasisConfig);
|
|
189
|
-
this.setProp("lattice", config);
|
|
190
|
-
this.unsetFileProps();
|
|
191
|
-
}
|
|
192
|
-
get Lattice() {
|
|
193
|
-
return new lattice_1.Lattice(this.lattice);
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Returns the inchi string from the derivedProperties for a non-periodic material, or throws an error if the
|
|
197
|
-
* inchi cannot be found.
|
|
198
|
-
* @returns {String}
|
|
199
|
-
*/
|
|
200
|
-
getInchiStringForHash() {
|
|
201
|
-
const inchi = this.getDerivedPropertyByName("inchi");
|
|
202
|
-
if (inchi) {
|
|
203
|
-
return inchi.value;
|
|
204
|
-
}
|
|
205
|
-
throw new Error("Hash cannot be created. Missing InChI string in derivedProperties");
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Calculates hash from basis and lattice. Algorithm expects the following:
|
|
209
|
-
* - asserts lattice units to be angstrom
|
|
210
|
-
* - asserts basis units to be crystal
|
|
211
|
-
* - asserts basis coordinates and lattice measurements are rounded to hash precision
|
|
212
|
-
* - forms strings for lattice and basis
|
|
213
|
-
* - creates MD5 hash from basisStr + latticeStr + salt
|
|
214
|
-
* @param salt Salt for hashing, empty string by default.
|
|
215
|
-
* @param isScaled Whether to scale the lattice parameter 'a' to 1.
|
|
216
|
-
*/
|
|
217
|
-
calculateHash(salt = "", isScaled = false, bypassNonPeriodicCheck = false) {
|
|
218
|
-
let message;
|
|
219
|
-
if (!this.isNonPeriodic || bypassNonPeriodicCheck) {
|
|
220
|
-
message =
|
|
221
|
-
this.Basis.hashString + "#" + this.Lattice.getHashString(isScaled) + "#" + salt;
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
message = this.getInchiStringForHash();
|
|
225
|
-
}
|
|
226
|
-
return crypto_js_1.default.MD5(message).toString();
|
|
227
|
-
}
|
|
228
|
-
set hash(hash) {
|
|
229
|
-
this.setProp("hash", hash);
|
|
230
|
-
}
|
|
231
|
-
get hash() {
|
|
232
|
-
return this.prop("hash");
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Calculates hash from basis and lattice as above + scales lattice properties to make lattice.a = 1
|
|
236
|
-
*/
|
|
237
|
-
get scaledHash() {
|
|
238
|
-
return this.calculateHash("", true);
|
|
239
|
-
}
|
|
240
|
-
get external() {
|
|
241
|
-
return this.prop("external");
|
|
242
|
-
}
|
|
243
|
-
set external(external) {
|
|
244
|
-
this.setProp("external", external);
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Converts basis to crystal/fractional coordinates.
|
|
248
|
-
*/
|
|
249
|
-
toCrystal() {
|
|
250
|
-
const basis = this.Basis;
|
|
251
|
-
basis.toCrystal();
|
|
252
|
-
this.setProp("basis", basis.toJSON());
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Converts current material's basis coordinates to cartesian.
|
|
256
|
-
* No changes if coordinates already cartesian.
|
|
257
|
-
*/
|
|
258
|
-
toCartesian() {
|
|
259
|
-
const basis = this.Basis;
|
|
260
|
-
basis.toCartesian();
|
|
261
|
-
this.setProp("basis", basis.toJSON());
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Returns material's basis in XYZ format.
|
|
265
|
-
*/
|
|
266
|
-
getBasisAsXyz(fractional = false) {
|
|
267
|
-
return parsers_1.default.xyz.fromMaterial(this.toJSON(), fractional);
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Returns material in Quantum Espresso output format:
|
|
271
|
-
* ```
|
|
272
|
-
* CELL_PARAMETERS (angstroms)
|
|
273
|
-
* -0.543131284 -0.000000000 0.543131284
|
|
274
|
-
* -0.000000000 0.543131284 0.543131284
|
|
275
|
-
* -0.543131284 0.543131284 0.000000000
|
|
276
|
-
*
|
|
277
|
-
* ATOMIC_POSITIONS (crystal)
|
|
278
|
-
* Si 0.000000000 0.000000000 -0.000000000
|
|
279
|
-
* Si 0.250000000 0.250000000 0.250000000
|
|
280
|
-
* ```
|
|
281
|
-
*/
|
|
282
|
-
getAsQEFormat() {
|
|
283
|
-
return parsers_1.default.espresso.toEspressoFormat(this.toJSON());
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* Returns material in POSCAR format. Pass `true` to ignore original poscar source and re-serialize.
|
|
287
|
-
*/
|
|
288
|
-
getAsPOSCAR(ignoreOriginal = false, omitConstraints = false) {
|
|
289
|
-
var _a;
|
|
290
|
-
// By default return original source if exists
|
|
291
|
-
if (((_a = this.src) === null || _a === void 0 ? void 0 : _a.extension) === "poscar" && !ignoreOriginal) {
|
|
292
|
-
return this.src.text;
|
|
293
|
-
}
|
|
294
|
-
return parsers_1.default.poscar.toPoscar(this.toJSON(), omitConstraints);
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Returns a copy of the material with conventional cell constructed instead of primitive.
|
|
298
|
-
*/
|
|
299
|
-
getACopyWithConventionalCell() {
|
|
300
|
-
const material = this.clone();
|
|
301
|
-
// if conventional and primitive cells are the same => return a copy.
|
|
302
|
-
if ((0, conventional_cell_1.isConventionalCellSameAsPrimitiveForLatticeType)(this.Lattice.type)) {
|
|
303
|
-
return material;
|
|
304
|
-
}
|
|
305
|
-
const conventionalSupercellMatrix = conventional_cell_1.PRIMITIVE_TO_CONVENTIONAL_CELL_MULTIPLIERS[this.Lattice.type];
|
|
306
|
-
const conventionalLatticeType = conventional_cell_1.PRIMITIVE_TO_CONVENTIONAL_CELL_LATTICE_TYPES[this.Lattice.type];
|
|
307
|
-
const config = supercell_1.default.generateConfig(this, conventionalSupercellMatrix);
|
|
308
|
-
config.lattice.type = conventionalLatticeType;
|
|
309
|
-
config.name = `${this.name} - conventional cell`;
|
|
310
|
-
// @ts-expect-error
|
|
311
|
-
return new this.constructor(config);
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* @summary a series of checks for the material and returns an array of results in ConsistencyChecks format.
|
|
315
|
-
* @returns Array of checks results
|
|
316
|
-
*/
|
|
317
|
-
getConsistencyChecks() {
|
|
318
|
-
const basisChecks = this.getBasisConsistencyChecks();
|
|
319
|
-
// any other Material checks can be added here
|
|
320
|
-
return basisChecks;
|
|
321
|
-
}
|
|
322
|
-
/**
|
|
323
|
-
* @summary a series of checks for the material's basis and returns an array of results in ConsistencyChecks format.
|
|
324
|
-
* @returns Array of checks results
|
|
325
|
-
*/
|
|
326
|
-
getBasisConsistencyChecks() {
|
|
327
|
-
const checks = [];
|
|
328
|
-
const limit = 1000;
|
|
329
|
-
const basis = this.Basis;
|
|
330
|
-
if (this.Basis.elements.length < limit) {
|
|
331
|
-
const overlappingAtomsGroups = basis.getOverlappingAtoms();
|
|
332
|
-
overlappingAtomsGroups.forEach(({ id1, id2, element1, element2 }) => {
|
|
333
|
-
checks.push({
|
|
334
|
-
key: `basis.coordinates.${id1}`,
|
|
335
|
-
name: "atomsOverlap",
|
|
336
|
-
severity: "warning",
|
|
337
|
-
message: `Atom ${element1} is too close to ${element2} at position ${id2 + 1}`,
|
|
338
|
-
}, {
|
|
339
|
-
key: `basis.coordinates.${id2}`,
|
|
340
|
-
name: "atomsOverlap",
|
|
341
|
-
severity: "warning",
|
|
342
|
-
message: `Atom ${element2} is too close to ${element1} at position ${id1 + 1}`,
|
|
343
|
-
});
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
return checks;
|
|
347
|
-
}
|
|
348
|
-
toJSON() {
|
|
349
|
-
// validation intoJSON() method will fail if name is not set in _json
|
|
350
|
-
this.name = this.name || this.formula;
|
|
351
|
-
return {
|
|
352
|
-
...super.toJSON(),
|
|
353
|
-
lattice: this.Lattice.toJSON(),
|
|
354
|
-
basis: this.Basis.toJSON(),
|
|
355
|
-
isNonPeriodic: this.isNonPeriodic,
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
exports.Material = Material;
|
|
360
|
-
(0, DefaultableMixin_1.defaultableEntityMixin)(Material);
|
|
361
|
-
(0, HasConsistencyChecksMixin_1.hasConsistencyChecksMixin)(Material.prototype);
|
|
362
|
-
(0, HasMetadataMixin_1.hasMetadataMixin)(Material.prototype);
|
package/pyproject.toml
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "mat3ra-made"
|
|
3
|
-
dynamic = ["version"]
|
|
4
|
-
description = "MAterials DEfinitions and/or MAterials DEsign library."
|
|
5
|
-
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.10"
|
|
7
|
-
license = {file = "LICENSE.md"}
|
|
8
|
-
authors = [
|
|
9
|
-
{ name = "Exabyte Inc.", email = "info@mat3ra.com" }
|
|
10
|
-
]
|
|
11
|
-
classifiers = [
|
|
12
|
-
"Programming Language :: Python",
|
|
13
|
-
"Programming Language :: Python :: 3",
|
|
14
|
-
"Development Status :: 3 - Alpha",
|
|
15
|
-
"Topic :: Software Development",
|
|
16
|
-
]
|
|
17
|
-
dependencies = [
|
|
18
|
-
"mat3ra-code",
|
|
19
|
-
"mat3ra-esse",
|
|
20
|
-
"mat3ra-utils>=2026.7.3.post0",
|
|
21
|
-
# new verison of numpy==2.0.0 is not handled by pymatgen yet
|
|
22
|
-
"numpy<=1.26.4",
|
|
23
|
-
]
|
|
24
|
-
|
|
25
|
-
[project.optional-dependencies]
|
|
26
|
-
# tracking separately the deps required to use the tools module
|
|
27
|
-
tools = [
|
|
28
|
-
"scipy",
|
|
29
|
-
"pymatgen==2024.4.13",
|
|
30
|
-
"ase",
|
|
31
|
-
"pymatgen-analysis-defects==2024.4.23",
|
|
32
|
-
"mat3ra-periodic-table>=2025.12.26",
|
|
33
|
-
]
|
|
34
|
-
dev = [
|
|
35
|
-
"pre-commit",
|
|
36
|
-
"black",
|
|
37
|
-
"ruff",
|
|
38
|
-
"isort",
|
|
39
|
-
"mypy",
|
|
40
|
-
"pip-tools",
|
|
41
|
-
]
|
|
42
|
-
tests = [
|
|
43
|
-
"coverage[toml]>=5.3",
|
|
44
|
-
"pytest",
|
|
45
|
-
"pytest-cov",
|
|
46
|
-
# B/c of https://github.com/binary-husky/gpt_academic/issues/1237
|
|
47
|
-
"gradio",
|
|
48
|
-
"pydantic",
|
|
49
|
-
"spglib==2.6.0",
|
|
50
|
-
"mat3ra-made[tools]",
|
|
51
|
-
"mat3ra-standata",
|
|
52
|
-
]
|
|
53
|
-
all = [
|
|
54
|
-
"mat3ra-made[tests]",
|
|
55
|
-
"mat3ra-made[dev]",
|
|
56
|
-
]
|
|
57
|
-
|
|
58
|
-
# Entrypoint scripts can be defined here, see examples below.
|
|
59
|
-
[project.scripts]
|
|
60
|
-
# To proxy the wheel_server script from mat3ra-utils for development purposes
|
|
61
|
-
wheel_server = "mat3ra.utils.wheel_server:main"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
[build-system]
|
|
65
|
-
requires = [
|
|
66
|
-
"setuptools>=42",
|
|
67
|
-
"setuptools-scm[toml]>=3.4"
|
|
68
|
-
]
|
|
69
|
-
build-backend = "setuptools.build_meta"
|
|
70
|
-
|
|
71
|
-
[tool.setuptools_scm]
|
|
72
|
-
git_describe_command = "git describe --tags --long"
|
|
73
|
-
|
|
74
|
-
[tool.setuptools.packages.find]
|
|
75
|
-
where = ["src/py"]
|
|
76
|
-
|
|
77
|
-
[tool.setuptools.package-data]
|
|
78
|
-
"mat3ra.made" = ["data/*.json"]
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
[tool.black]
|
|
82
|
-
line-length = 120
|
|
83
|
-
target-version = ['py310']
|
|
84
|
-
# 'extend-exclude' excludes files or directories in addition to the defaults
|
|
85
|
-
extend-exclude = '''
|
|
86
|
-
(
|
|
87
|
-
tests\/fixtures*,
|
|
88
|
-
examples\/.*\/.*\.py
|
|
89
|
-
| other\/.*\/.*\.(py|ipynb)
|
|
90
|
-
)
|
|
91
|
-
'''
|
|
92
|
-
|
|
93
|
-
[tool.ruff]
|
|
94
|
-
# Exclude a variety of commonly ignored directories.
|
|
95
|
-
extend-exclude = [
|
|
96
|
-
"src/js",
|
|
97
|
-
"tests/fixtures",
|
|
98
|
-
"tests/py/unit/fixtures"
|
|
99
|
-
]
|
|
100
|
-
line-length = 120
|
|
101
|
-
target-version = "py310"
|
|
102
|
-
|
|
103
|
-
[tool.ruff.per-file-ignores]
|
|
104
|
-
"__init__.py" = ["F401"]
|
|
105
|
-
|
|
106
|
-
[tool.isort]
|
|
107
|
-
profile = "black"
|
|
108
|
-
multi_line_output = 3
|
|
109
|
-
include_trailing_comma = true
|
|
110
|
-
|
|
111
|
-
[tool.pytest.ini_options]
|
|
112
|
-
pythonpath = [
|
|
113
|
-
"src/py",
|
|
114
|
-
]
|
|
115
|
-
testpaths = [
|
|
116
|
-
"tests/py"
|
|
117
|
-
]
|
|
118
|
-
filterwarnings = [
|
|
119
|
-
"ignore:.*:DeprecationWarning:typing_extensions",
|
|
120
|
-
"ignore:.*:UserWarning:pydantic",
|
|
121
|
-
"ignore:.*:RuntimeWarning:mat3ra.made",
|
|
122
|
-
"ignore::pydantic.warnings.PydanticDeprecatedSince20",
|
|
123
|
-
]
|
package/src/__init__.py
DELETED
|
File without changes
|