@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/basis/basis.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
-
import { BasisSchema, Coordinate3DSchema, Vector3DSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import { BaseInMemoryEntitySchema, BasisSchema, Coordinate3DSchema, Vector3DSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
3
|
import { Cell } from "../cell/cell";
|
|
4
4
|
import { AtomicCoordinateValue, Coordinates } from "./coordinates";
|
|
5
5
|
import { AtomicElementValue, Elements } from "./elements";
|
|
@@ -30,7 +30,8 @@ export interface ElementsAndCoordinatesConfig {
|
|
|
30
30
|
units?: BasisSchema["units"];
|
|
31
31
|
cell?: Cell;
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
type BasisEntitySchema<S extends BasisConfig = BasisConfig> = S & BaseInMemoryEntitySchema;
|
|
34
|
+
export declare class Basis<S extends BasisConfig = BasisConfig> extends InMemoryEntity<BasisEntitySchema<S>> implements BasisSchema {
|
|
34
35
|
static defaultConfig: BasisSchema;
|
|
35
36
|
units: BasisSchema["units"];
|
|
36
37
|
cell: Cell;
|
|
@@ -39,15 +40,15 @@ export declare class Basis extends InMemoryEntity implements BasisSchema {
|
|
|
39
40
|
_labels: Labels;
|
|
40
41
|
static _convertValuesToConfig({ elements, coordinates, units, cell, labels, }: ElementsAndCoordinatesConfig): BasisConfig;
|
|
41
42
|
static fromElementsAndCoordinates({ elements, coordinates, units, cell, labels, }: ElementsAndCoordinatesConfig): Basis;
|
|
42
|
-
constructor(config?:
|
|
43
|
+
constructor(config?: NoInfer<S>);
|
|
43
44
|
get elements(): BasisSchema["elements"];
|
|
44
45
|
set elements(elements: BasisSchema["elements"]);
|
|
45
46
|
get coordinates(): BasisSchema["coordinates"];
|
|
46
47
|
set coordinates(coordinates: BasisSchema["coordinates"]);
|
|
47
48
|
get labels(): BasisSchema["labels"];
|
|
48
49
|
set labels(labels: BasisSchema["labels"]);
|
|
49
|
-
toJSON(exclude?:
|
|
50
|
-
clone():
|
|
50
|
+
toJSON(exclude?: (keyof BasisEntitySchema<S>)[]): BasisEntitySchema<S>;
|
|
51
|
+
clone(): this;
|
|
51
52
|
removeAllAtoms(): void;
|
|
52
53
|
get cellRounded(): import("@mat3ra/esse/dist/js/types").Matrix3X3Schema;
|
|
53
54
|
get elementsArray(): object[];
|
|
@@ -55,8 +56,8 @@ export declare class Basis extends InMemoryEntity implements BasisSchema {
|
|
|
55
56
|
get coordinatesAsArray(): Coordinate3DSchema[];
|
|
56
57
|
get isInCartesianUnits(): boolean;
|
|
57
58
|
get isInCrystalUnits(): boolean;
|
|
58
|
-
toCartesian():
|
|
59
|
-
toCrystal():
|
|
59
|
+
toCartesian(): this;
|
|
60
|
+
toCrystal(): this;
|
|
60
61
|
getElementByIndex(idx: number): AtomicElementValue;
|
|
61
62
|
getElementById(id: number): AtomicElementValue;
|
|
62
63
|
getCoordinateValueByIndex(idx: number): AtomicCoordinateValue;
|
|
@@ -140,12 +141,16 @@ export declare class Basis extends InMemoryEntity implements BasisSchema {
|
|
|
140
141
|
* @summary Returns true if bases are equal, otherwise - false.
|
|
141
142
|
* @param anotherBasisClsInstance {Basis} Another Basis.
|
|
142
143
|
*/
|
|
143
|
-
isEqualTo(anotherBasisClsInstance:
|
|
144
|
+
isEqualTo(anotherBasisClsInstance: {
|
|
145
|
+
hashString: string;
|
|
146
|
+
}): boolean;
|
|
144
147
|
/**
|
|
145
148
|
* @summary Returns true if basis cells are equal, otherwise - false.
|
|
146
149
|
* @param anotherBasisClsInstance {Basis} Another Basis.
|
|
147
150
|
*/
|
|
148
|
-
hasEquivalentCellTo(anotherBasisClsInstance:
|
|
151
|
+
hasEquivalentCellTo(anotherBasisClsInstance: {
|
|
152
|
+
cell: Cell;
|
|
153
|
+
}): boolean;
|
|
149
154
|
/**
|
|
150
155
|
* @summary Returns the minimum cubic lattice size for a non-periodic structure.
|
|
151
156
|
* Single-atom structures use the element atomic radius floored at defaultMinimumLatticeSize.
|
package/dist/js/basis/basis.js
CHANGED
|
@@ -35,6 +35,8 @@ const DEFAULT_BASIS_CONFIG = {
|
|
|
35
35
|
],
|
|
36
36
|
units: "crystal",
|
|
37
37
|
};
|
|
38
|
+
// Keep `{` on same line as `implements` to satisfy brace-style (conflicts with Prettier multi-line heritage).
|
|
39
|
+
// prettier-ignore
|
|
38
40
|
class Basis extends entity_1.InMemoryEntity {
|
|
39
41
|
static _convertValuesToConfig({ elements = [], coordinates = [], units = constants_1.ATOMIC_COORD_UNITS.crystal, cell = new cell_1.Cell(), labels = [], }) {
|
|
40
42
|
const elementsArrayWithIdsJSON = elements_1.Elements.fromValues(elements).toJSON();
|
|
@@ -57,6 +59,7 @@ class Basis extends entity_1.InMemoryEntity {
|
|
|
57
59
|
labels,
|
|
58
60
|
}));
|
|
59
61
|
}
|
|
62
|
+
// NoInfer: keep default S (or an explicit type arg) instead of inferring S from the config literal.
|
|
60
63
|
constructor(config = Basis.defaultConfig) {
|
|
61
64
|
super(config);
|
|
62
65
|
const { elements, coordinates, units, labels } = config;
|
|
@@ -84,8 +87,6 @@ class Basis extends entity_1.InMemoryEntity {
|
|
|
84
87
|
set labels(labels) {
|
|
85
88
|
this._labels = labels_1.Labels.fromObjects(labels || []);
|
|
86
89
|
}
|
|
87
|
-
// TODO: figure out how to override toJSON in the parent class with generic classes
|
|
88
|
-
// @ts-ignore
|
|
89
90
|
toJSON(exclude = ["cell"]) {
|
|
90
91
|
var _a;
|
|
91
92
|
return {
|
|
@@ -96,7 +97,6 @@ class Basis extends entity_1.InMemoryEntity {
|
|
|
96
97
|
...(((_a = this.labels) === null || _a === void 0 ? void 0 : _a.length) ? { labels: this.labels } : {}),
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
|
-
// @ts-ignore
|
|
100
100
|
clone() {
|
|
101
101
|
const instance = super.clone();
|
|
102
102
|
instance.cell = this.cell.clone();
|
|
@@ -127,15 +127,17 @@ class Basis extends entity_1.InMemoryEntity {
|
|
|
127
127
|
}
|
|
128
128
|
toCartesian() {
|
|
129
129
|
if (this.isInCartesianUnits)
|
|
130
|
-
return;
|
|
130
|
+
return this;
|
|
131
131
|
this._coordinates.mapArrayInPlace((point) => this.cell.convertPointToCartesian(point));
|
|
132
132
|
this.units = constants_1.ATOMIC_COORD_UNITS.cartesian;
|
|
133
|
+
return this;
|
|
133
134
|
}
|
|
134
135
|
toCrystal() {
|
|
135
136
|
if (this.isInCrystalUnits)
|
|
136
|
-
return;
|
|
137
|
+
return this;
|
|
137
138
|
this._coordinates.mapArrayInPlace((point) => this.cell.convertPointToCrystal(point));
|
|
138
139
|
this.units = constants_1.ATOMIC_COORD_UNITS.crystal;
|
|
140
|
+
return this;
|
|
139
141
|
}
|
|
140
142
|
getElementByIndex(idx) {
|
|
141
143
|
return this._elements.getElementValueByIndex(idx);
|
|
@@ -310,7 +312,7 @@ class Basis extends entity_1.InMemoryEntity {
|
|
|
310
312
|
/* Returns array of atomic labels E.g., ["1", "2", "", ""] */
|
|
311
313
|
get atomicLabelsArray() {
|
|
312
314
|
var _a;
|
|
313
|
-
const labelsArray = Array.from({ length: this.elements.length }, (
|
|
315
|
+
const labelsArray = Array.from({ length: this.elements.length }, () => "");
|
|
314
316
|
// https://dev.to/maafaishal/benchmarking-for-while-forof-and-arrayforeach-using-performancenow-1jjg
|
|
315
317
|
if ((_a = this.labels) === null || _a === void 0 ? void 0 : _a.length) {
|
|
316
318
|
for (let i = 0; i < this.labels.length; i++) {
|
|
@@ -447,13 +449,13 @@ class Basis extends entity_1.InMemoryEntity {
|
|
|
447
449
|
for (let i = 0; i < this._elements.values.length; i++) {
|
|
448
450
|
for (let j = i + 1; j < this._elements.values.length; j++) {
|
|
449
451
|
const distance = utils_1.Utils.math.vDist(this._coordinates.getElementValueByIndex(i), this._coordinates.getElementValueByIndex(j));
|
|
450
|
-
if (
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
452
|
+
if (distance) {
|
|
453
|
+
if (extremum === "max" && distance > resultDistance) {
|
|
454
|
+
resultDistance = distance;
|
|
455
|
+
}
|
|
456
|
+
if (extremum === "min" && distance < resultDistance) {
|
|
457
|
+
resultDistance = distance;
|
|
458
|
+
}
|
|
457
459
|
}
|
|
458
460
|
}
|
|
459
461
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { AtomicConstraintsSchema } from "@mat3ra/esse/dist/js/types";
|
|
1
|
+
import { AtomicConstraintsSchema, BasisConstrainedSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import { Cell } from "../cell/cell";
|
|
2
3
|
import { AtomicConstraints, AtomicConstraintValue } from "../constraints/constraints";
|
|
3
|
-
import { Basis,
|
|
4
|
+
import { Basis, ElementsAndCoordinatesConfig } from "./basis";
|
|
4
5
|
import { AtomicCoordinateValue } from "./coordinates";
|
|
5
6
|
import { AtomicElementValue } from "./elements";
|
|
6
7
|
import { AtomicLabelValue } from "./labels";
|
|
7
|
-
export interface ConstrainedBasisConfig extends
|
|
8
|
-
|
|
8
|
+
export interface ConstrainedBasisConfig extends BasisConstrainedSchema {
|
|
9
|
+
cell?: Cell;
|
|
10
|
+
isEmpty?: boolean;
|
|
9
11
|
}
|
|
10
12
|
export interface ElementsCoordinatesAndConstraintsConfig extends ElementsAndCoordinatesConfig {
|
|
11
13
|
constraints: AtomicConstraintValue[];
|
|
@@ -14,14 +16,14 @@ export interface ElementsCoordinatesAndConstraintsConfig extends ElementsAndCoor
|
|
|
14
16
|
* @summary Extension of the Basis class able to deal with atomic constraints.
|
|
15
17
|
* @extends Basis
|
|
16
18
|
*/
|
|
17
|
-
export declare class ConstrainedBasis extends Basis {
|
|
18
|
-
_constraints
|
|
19
|
+
export declare class ConstrainedBasis extends Basis<ConstrainedBasisConfig> {
|
|
20
|
+
private _constraints;
|
|
19
21
|
constructor(config: ConstrainedBasisConfig);
|
|
20
22
|
static fromElementsCoordinatesAndConstraints(config: ElementsCoordinatesAndConstraintsConfig): ConstrainedBasis;
|
|
21
23
|
get constraints(): AtomicConstraintsSchema;
|
|
22
24
|
set constraints(constraints: AtomicConstraintsSchema);
|
|
23
25
|
get AtomicConstraints(): AtomicConstraints;
|
|
24
|
-
toJSON(): ConstrainedBasisConfig;
|
|
26
|
+
toJSON(exclude?: (keyof ConstrainedBasisConfig)[]): ConstrainedBasisConfig;
|
|
25
27
|
getConstraintByIndex(idx: number): AtomicConstraintValue;
|
|
26
28
|
getConstraintById(id: number): AtomicConstraintValue;
|
|
27
29
|
/**
|
|
@@ -11,9 +11,9 @@ const helpers_1 = require("./helpers");
|
|
|
11
11
|
*/
|
|
12
12
|
class ConstrainedBasis extends basis_1.Basis {
|
|
13
13
|
constructor(config) {
|
|
14
|
+
var _a;
|
|
14
15
|
super(config);
|
|
15
|
-
|
|
16
|
-
this._constraints = constraints_1.AtomicConstraints.fromObjects(constraints || []); // `constraints` is an Array with ids
|
|
16
|
+
this._constraints = constraints_1.AtomicConstraints.fromObjects((_a = config.constraints) !== null && _a !== void 0 ? _a : []); // `constraints` is an Array with ids
|
|
17
17
|
}
|
|
18
18
|
static fromElementsCoordinatesAndConstraints(config) {
|
|
19
19
|
const basisConfig = this._convertValuesToConfig(config);
|
|
@@ -32,9 +32,9 @@ class ConstrainedBasis extends basis_1.Basis {
|
|
|
32
32
|
get AtomicConstraints() {
|
|
33
33
|
return constraints_1.AtomicConstraints.fromObjects(this.constraints);
|
|
34
34
|
}
|
|
35
|
-
toJSON() {
|
|
35
|
+
toJSON(exclude = ["cell"]) {
|
|
36
36
|
return {
|
|
37
|
-
...super.toJSON(),
|
|
37
|
+
...super.toJSON(exclude),
|
|
38
38
|
constraints: this.constraints,
|
|
39
39
|
};
|
|
40
40
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
+
import type { BaseInMemoryEntitySchema, MaterialPropertiesSchema } from "@mat3ra/esse/dist/js/types";
|
|
3
|
+
export type MaterialSchemaMixin = MaterialPropertiesSchema;
|
|
4
|
+
export type MaterialInMemoryEntity = InMemoryEntity<BaseInMemoryEntitySchema & MaterialSchemaMixin>;
|
|
5
|
+
export declare function materialSchemaMixin<T extends InMemoryEntity>(item: InMemoryEntity): asserts item is T & MaterialSchemaMixin;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.materialSchemaMixin = materialSchemaMixin;
|
|
4
|
+
function materialSchemaMixin(item) {
|
|
5
|
+
// @ts-expect-error
|
|
6
|
+
const properties = {
|
|
7
|
+
get formula() {
|
|
8
|
+
return this.prop("formula");
|
|
9
|
+
},
|
|
10
|
+
set formula(value) {
|
|
11
|
+
this.setProp("formula", value);
|
|
12
|
+
},
|
|
13
|
+
get unitCellFormula() {
|
|
14
|
+
return this.prop("unitCellFormula");
|
|
15
|
+
},
|
|
16
|
+
set unitCellFormula(value) {
|
|
17
|
+
this.setProp("unitCellFormula", value);
|
|
18
|
+
},
|
|
19
|
+
get basis() {
|
|
20
|
+
return this.requiredProp("basis");
|
|
21
|
+
},
|
|
22
|
+
set basis(value) {
|
|
23
|
+
this.setProp("basis", value);
|
|
24
|
+
},
|
|
25
|
+
get lattice() {
|
|
26
|
+
return this.requiredProp("lattice");
|
|
27
|
+
},
|
|
28
|
+
set lattice(value) {
|
|
29
|
+
this.setProp("lattice", value);
|
|
30
|
+
},
|
|
31
|
+
get derivedProperties() {
|
|
32
|
+
return this.prop("derivedProperties");
|
|
33
|
+
},
|
|
34
|
+
set derivedProperties(value) {
|
|
35
|
+
this.setProp("derivedProperties", value);
|
|
36
|
+
},
|
|
37
|
+
get external() {
|
|
38
|
+
return this.prop("external");
|
|
39
|
+
},
|
|
40
|
+
set external(value) {
|
|
41
|
+
this.setProp("external", value);
|
|
42
|
+
},
|
|
43
|
+
get src() {
|
|
44
|
+
return this.prop("src");
|
|
45
|
+
},
|
|
46
|
+
set src(value) {
|
|
47
|
+
this.setProp("src", value);
|
|
48
|
+
},
|
|
49
|
+
get icsdId() {
|
|
50
|
+
return this.prop("icsdId");
|
|
51
|
+
},
|
|
52
|
+
set icsdId(value) {
|
|
53
|
+
this.setProp("icsdId", value);
|
|
54
|
+
},
|
|
55
|
+
get isNonPeriodic() {
|
|
56
|
+
return this.prop("isNonPeriodic");
|
|
57
|
+
},
|
|
58
|
+
set isNonPeriodic(value) {
|
|
59
|
+
this.setProp("isNonPeriodic", value);
|
|
60
|
+
},
|
|
61
|
+
get consistencyChecks() {
|
|
62
|
+
return this.prop("consistencyChecks");
|
|
63
|
+
},
|
|
64
|
+
set consistencyChecks(value) {
|
|
65
|
+
this.setProp("consistencyChecks", value);
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties));
|
|
69
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InMemoryEntity } from "@mat3ra/code/dist/js/entity";
|
|
2
|
-
import { LatticeSchema, LatticeTypeEnum, LatticeTypeExtendedEnum, LatticeVectorsSchema, Matrix3X3Schema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import { BaseInMemoryEntitySchema, LatticeSchema, LatticeTypeEnum, LatticeTypeExtendedEnum, LatticeVectorsSchema, Matrix3X3Schema } from "@mat3ra/esse/dist/js/types";
|
|
3
3
|
import { Cell } from "../cell/cell";
|
|
4
4
|
import { UnitCell } from "./unit_cell";
|
|
5
5
|
/**
|
|
@@ -10,7 +10,8 @@ export { defaultNonPeriodicMinimumLatticeSize, diatomicLatticePaddingFactor, mol
|
|
|
10
10
|
export declare class LatticeVectors extends Cell implements LatticeVectorsSchema {
|
|
11
11
|
}
|
|
12
12
|
export type { LatticeVectorsSchema };
|
|
13
|
-
|
|
13
|
+
type LatticeEntitySchema = LatticeSchema & BaseInMemoryEntitySchema;
|
|
14
|
+
export declare class Lattice extends InMemoryEntity<LatticeEntitySchema> implements LatticeSchema {
|
|
14
15
|
static defaultConfig: LatticeSchema;
|
|
15
16
|
a: LatticeSchema["a"];
|
|
16
17
|
b: LatticeSchema["b"];
|
|
@@ -63,5 +64,5 @@ export declare class Lattice extends InMemoryEntity implements LatticeSchema {
|
|
|
63
64
|
* @example {a: true, b: false, c: false, alpha: true, beta: false, gamma: false}
|
|
64
65
|
*/
|
|
65
66
|
get editables(): {};
|
|
66
|
-
toJSON(exclude?:
|
|
67
|
+
toJSON(exclude?: (keyof LatticeSchema)[]): LatticeSchema;
|
|
67
68
|
}
|
package/dist/js/made.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { defaultNonPeriodicMinimumLatticeSize, diatomicLatticePaddingFactor, Lat
|
|
|
6
6
|
import { DEFAULT_LATTICE_UNITS, LATTICE_TYPE_CONFIGS } from "./lattice/lattice_types";
|
|
7
7
|
import { ReciprocalLattice } from "./lattice/reciprocal/lattice_reciprocal";
|
|
8
8
|
import { UnitCell } from "./lattice/unit_cell";
|
|
9
|
-
import { defaultMaterialConfig
|
|
9
|
+
import Material, { defaultMaterialConfig } from "./Material";
|
|
10
10
|
import parsers from "./parsers/parsers";
|
|
11
11
|
import tools from "./tools/index";
|
|
12
12
|
export declare const Made: {
|
|
@@ -33,7 +33,7 @@ export declare const Made: {
|
|
|
33
33
|
cartesian: string;
|
|
34
34
|
};
|
|
35
35
|
Material: typeof Material;
|
|
36
|
-
defaultMaterialConfig: import("@mat3ra/esse/dist/js/types").
|
|
36
|
+
defaultMaterialConfig: import("@mat3ra/esse/dist/js/types").MaterialEnhancedSchema;
|
|
37
37
|
Lattice: typeof Lattice;
|
|
38
38
|
Cell: typeof Cell;
|
|
39
39
|
UnitCell: typeof UnitCell;
|
|
@@ -46,15 +46,15 @@ export declare const Made: {
|
|
|
46
46
|
parsers: {
|
|
47
47
|
xyz: {
|
|
48
48
|
validate: typeof import("./parsers/xyz").validate;
|
|
49
|
-
fromMaterial: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema, fractional?: boolean) => string;
|
|
49
|
+
fromMaterial: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema | import("@mat3ra/esse/dist/js/types").MaterialEnhancedSchema, fractional?: boolean) => string;
|
|
50
50
|
toBasisConfig: (txt: string, units?: string, cell?: Cell) => import("./basis/constrained_basis").ConstrainedBasisConfig;
|
|
51
51
|
fromBasis: (basisClsInstance: import("./basis/constrained_basis").ConstrainedBasis, coordinatePrintFormat: string) => string;
|
|
52
52
|
CombinatorialBasis: typeof import("./parsers/xyz_combinatorial_basis").CombinatorialBasis;
|
|
53
53
|
};
|
|
54
54
|
poscar: {
|
|
55
55
|
isPoscar: (text: string) => boolean;
|
|
56
|
-
toPoscar: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema, omitConstraints?: boolean) => string;
|
|
57
|
-
fromPoscar: (fileContent: string) =>
|
|
56
|
+
toPoscar: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema | import("@mat3ra/esse/dist/js/types").MaterialEnhancedSchema, omitConstraints?: boolean) => string;
|
|
57
|
+
fromPoscar: (fileContent: string) => import("./Material").MaterialConfig;
|
|
58
58
|
atomicConstraintsCharFromBool: (bool: boolean) => string;
|
|
59
59
|
atomsCount: typeof import("./parsers/poscar").atomsCount;
|
|
60
60
|
};
|
|
@@ -62,21 +62,21 @@ export declare const Made: {
|
|
|
62
62
|
parseMeta: (txt: string) => import("./parsers/cif").Meta;
|
|
63
63
|
};
|
|
64
64
|
espresso: {
|
|
65
|
-
toEspressoFormat: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema) => string;
|
|
65
|
+
toEspressoFormat: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema | import("@mat3ra/esse/dist/js/types").MaterialEnhancedSchema) => string;
|
|
66
66
|
};
|
|
67
67
|
nativeFormatParsers: {
|
|
68
|
-
detectFormat: (text: string) =>
|
|
69
|
-
convertFromNativeFormat: (text: string) =>
|
|
68
|
+
detectFormat: (text: string) => "json" | "poscar" | "unknown";
|
|
69
|
+
convertFromNativeFormat: (text: string) => import("./Material").MaterialConfig;
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
tools: {
|
|
73
73
|
surface: {
|
|
74
|
-
generateConfig: (material: Material
|
|
74
|
+
generateConfig: <Schemas extends import("./Material").MaterialSchemaMap = import("./Material").MaterialSchemaMap>(material: Material<Schemas>, millerIndices: import("@mat3ra/esse/dist/js/types").Coordinate3DSchema, numberOfLayers?: number, vx?: number, vy?: number) => import("./tools/surface").SlabConfigSchema;
|
|
75
75
|
};
|
|
76
76
|
supercell: {
|
|
77
|
-
generateConfig: (material: Material
|
|
77
|
+
generateConfig: <Schemas extends import("./Material").MaterialSchemaMap = import("./Material").MaterialSchemaMap>(material: Material<Schemas>, supercellMatrix: import("@mat3ra/esse/dist/js/types").Matrix3X3Schema) => {
|
|
78
78
|
name: string;
|
|
79
|
-
basis: import("@mat3ra/esse/dist/js/types").
|
|
79
|
+
basis: import("./basis/basis").BasisConfig & import("@mat3ra/esse/dist/js/types").BaseInMemoryEntitySchema;
|
|
80
80
|
lattice: import("@mat3ra/esse/dist/js/types").LatticeSchema;
|
|
81
81
|
};
|
|
82
82
|
generateNewBasisWithinSupercell: (basis: Basis | import("./basis/constrained_basis").ConstrainedBasis, cell: Cell, supercell: Cell, supercellMatrix: import("@mat3ra/esse/dist/js/types").Matrix3X3Schema) => Basis;
|
|
@@ -88,7 +88,7 @@ export declare const Made: {
|
|
|
88
88
|
};
|
|
89
89
|
basis: {
|
|
90
90
|
repeat: (basis: Basis, repetitions: number[]) => Basis;
|
|
91
|
-
interpolate: (initialBasis: Basis, finalBasis: Basis, numberOfSteps?: number) => Basis[];
|
|
91
|
+
interpolate: (initialBasis: Basis, finalBasis: Basis, numberOfSteps?: number) => Basis<import("./basis/basis").BasisConfig>[];
|
|
92
92
|
};
|
|
93
93
|
};
|
|
94
94
|
LATTICE_TYPE_CONFIGS: import("./lattice/lattice_types").LatticeTypeConfig[];
|
package/dist/js/made.js
CHANGED
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
@@ -27,9 +60,9 @@ const lattice_reciprocal_1 = require("./lattice/reciprocal/lattice_reciprocal");
|
|
|
27
60
|
Object.defineProperty(exports, "ReciprocalLattice", { enumerable: true, get: function () { return lattice_reciprocal_1.ReciprocalLattice; } });
|
|
28
61
|
const unit_cell_1 = require("./lattice/unit_cell");
|
|
29
62
|
Object.defineProperty(exports, "UnitCell", { enumerable: true, get: function () { return unit_cell_1.UnitCell; } });
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
Object.defineProperty(exports, "
|
|
63
|
+
const Material_1 = __importStar(require("./Material"));
|
|
64
|
+
exports.Material = Material_1.default;
|
|
65
|
+
Object.defineProperty(exports, "defaultMaterialConfig", { enumerable: true, get: function () { return Material_1.defaultMaterialConfig; } });
|
|
33
66
|
const parsers_1 = __importDefault(require("./parsers/parsers"));
|
|
34
67
|
exports.parsers = parsers_1.default;
|
|
35
68
|
const index_1 = __importDefault(require("./tools/index"));
|
|
@@ -39,8 +72,8 @@ exports.Made = {
|
|
|
39
72
|
tolerance: constants_1.tolerance,
|
|
40
73
|
units: constants_1.units,
|
|
41
74
|
ATOMIC_COORD_UNITS: constants_1.ATOMIC_COORD_UNITS,
|
|
42
|
-
Material:
|
|
43
|
-
defaultMaterialConfig:
|
|
75
|
+
Material: Material_1.default,
|
|
76
|
+
defaultMaterialConfig: Material_1.defaultMaterialConfig,
|
|
44
77
|
Lattice: lattice_1.Lattice,
|
|
45
78
|
Cell: cell_1.Cell,
|
|
46
79
|
UnitCell: unit_cell_1.UnitCell,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { MaterialSchema } from "@mat3ra/esse/dist/js/types";
|
|
1
|
+
import { MaterialEnhancedSchema, MaterialSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
2
|
/**
|
|
3
3
|
* Construct textual representation of a materialOrConfig according to Quantum ESPRESSO pw.x input format.
|
|
4
|
-
* @param materialOrConfig - material class instance or its config object
|
|
5
4
|
*/
|
|
6
|
-
declare function toEspressoFormat(materialOrConfig: MaterialSchema): string;
|
|
5
|
+
declare function toEspressoFormat(materialOrConfig: MaterialSchema | MaterialEnhancedSchema): string;
|
|
7
6
|
declare const _default: {
|
|
8
7
|
toEspressoFormat: typeof toEspressoFormat;
|
|
9
8
|
};
|
|
@@ -9,7 +9,6 @@ const lattice_1 = require("../lattice/lattice");
|
|
|
9
9
|
const xyz_1 = __importDefault(require("./xyz"));
|
|
10
10
|
/**
|
|
11
11
|
* Construct textual representation of a materialOrConfig according to Quantum ESPRESSO pw.x input format.
|
|
12
|
-
* @param materialOrConfig - material class instance or its config object
|
|
13
12
|
*/
|
|
14
13
|
function toEspressoFormat(materialOrConfig) {
|
|
15
14
|
const l = new lattice_1.Lattice(materialOrConfig.lattice);
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import type { MaterialConfig } from "../Material";
|
|
1
2
|
/**
|
|
2
3
|
* @summary Detects the format of the input string
|
|
3
|
-
* @throws
|
|
4
|
-
* @param
|
|
5
|
-
* @returns
|
|
4
|
+
* @throws If the input string is unknown format
|
|
5
|
+
* @param text input string to detect format
|
|
6
|
+
* @returns Format of the input string
|
|
6
7
|
*/
|
|
7
|
-
declare function detectFormat(text: string):
|
|
8
|
+
declare function detectFormat(text: string): "json" | "poscar" | "unknown";
|
|
8
9
|
/**
|
|
9
10
|
* @summary Function to handle conversion from native formats
|
|
10
|
-
* @param
|
|
11
|
-
* @throws
|
|
12
|
-
* @return
|
|
11
|
+
* @param text - input string to detect format and convert
|
|
12
|
+
* @throws If the input string is of unknown format
|
|
13
|
+
* @return Material config
|
|
13
14
|
*/
|
|
14
|
-
declare function convertFromNativeFormat(text: string):
|
|
15
|
+
declare function convertFromNativeFormat(text: string): MaterialConfig;
|
|
15
16
|
declare const _default: {
|
|
16
17
|
detectFormat: typeof detectFormat;
|
|
17
18
|
convertFromNativeFormat: typeof convertFromNativeFormat;
|
|
@@ -14,9 +14,9 @@ const NATIVE_FORMAT = {
|
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
16
|
* @summary Detects the format of the input string
|
|
17
|
-
* @throws
|
|
18
|
-
* @param
|
|
19
|
-
* @returns
|
|
17
|
+
* @throws If the input string is unknown format
|
|
18
|
+
* @param text input string to detect format
|
|
19
|
+
* @returns Format of the input string
|
|
20
20
|
*/
|
|
21
21
|
function detectFormat(text) {
|
|
22
22
|
const jsonRegex = /^\s*\{/;
|
|
@@ -28,9 +28,9 @@ function detectFormat(text) {
|
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* @summary Function to handle conversion from native formats
|
|
31
|
-
* @param
|
|
32
|
-
* @throws
|
|
33
|
-
* @return
|
|
31
|
+
* @param text - input string to detect format and convert
|
|
32
|
+
* @throws If the input string is of unknown format
|
|
33
|
+
* @return Material config
|
|
34
34
|
*/
|
|
35
35
|
function convertFromNativeFormat(text) {
|
|
36
36
|
const format = detectFormat(text);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
xyz: {
|
|
3
3
|
validate: typeof import("./xyz").validate;
|
|
4
|
-
fromMaterial: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema, fractional?: boolean) => string;
|
|
4
|
+
fromMaterial: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema | import("@mat3ra/esse/dist/js/types").MaterialEnhancedSchema, fractional?: boolean) => string;
|
|
5
5
|
toBasisConfig: (txt: string, units?: string, cell?: import("../made").Cell) => import("../basis/constrained_basis").ConstrainedBasisConfig;
|
|
6
6
|
fromBasis: (basisClsInstance: import("../basis/constrained_basis").ConstrainedBasis, coordinatePrintFormat: string) => string;
|
|
7
7
|
CombinatorialBasis: typeof import("./xyz_combinatorial_basis").CombinatorialBasis;
|
|
8
8
|
};
|
|
9
9
|
poscar: {
|
|
10
10
|
isPoscar: (text: string) => boolean;
|
|
11
|
-
toPoscar: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema, omitConstraints?: boolean) => string;
|
|
12
|
-
fromPoscar: (fileContent: string) =>
|
|
11
|
+
toPoscar: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema | import("@mat3ra/esse/dist/js/types").MaterialEnhancedSchema, omitConstraints?: boolean) => string;
|
|
12
|
+
fromPoscar: (fileContent: string) => import("../Material").MaterialConfig;
|
|
13
13
|
atomicConstraintsCharFromBool: (bool: boolean) => string;
|
|
14
14
|
atomsCount: typeof import("./poscar").atomsCount;
|
|
15
15
|
};
|
|
@@ -17,11 +17,11 @@ declare const _default: {
|
|
|
17
17
|
parseMeta: (txt: string) => import("./cif").Meta;
|
|
18
18
|
};
|
|
19
19
|
espresso: {
|
|
20
|
-
toEspressoFormat: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema) => string;
|
|
20
|
+
toEspressoFormat: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema | import("@mat3ra/esse/dist/js/types").MaterialEnhancedSchema) => string;
|
|
21
21
|
};
|
|
22
22
|
nativeFormatParsers: {
|
|
23
|
-
detectFormat: (text: string) =>
|
|
24
|
-
convertFromNativeFormat: (text: string) =>
|
|
23
|
+
detectFormat: (text: string) => "json" | "poscar" | "unknown";
|
|
24
|
+
convertFromNativeFormat: (text: string) => import("../Material").MaterialConfig;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
export default _default;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { MaterialSchema } from "@mat3ra/esse/dist/js/types";
|
|
1
|
+
import { MaterialEnhancedSchema, MaterialSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import type { MaterialConfig } from "../Material";
|
|
2
3
|
/**
|
|
3
4
|
* Obtain a textual representation of a material in POSCAR format.
|
|
4
5
|
* @param materialOrConfig - material class instance or config object.
|
|
5
|
-
* @param omitConstraints - whether to discard constraints
|
|
6
|
+
* @param omitConstraints - whether to discard constraints when serializing.
|
|
6
7
|
*/
|
|
7
|
-
declare function toPoscar(materialOrConfig: MaterialSchema, omitConstraints?: boolean): string;
|
|
8
|
+
declare function toPoscar(materialOrConfig: MaterialSchema | MaterialEnhancedSchema, omitConstraints?: boolean): string;
|
|
8
9
|
/**
|
|
9
10
|
* @summary calculates the number of atoms in a poscar file based on the summation of the numbers in line 7 of the file.
|
|
10
11
|
* Poscar file formatting: https://www.vasp.at/wiki/index.php/POSCAR
|
|
@@ -15,7 +16,7 @@ export declare function atomsCount(poscarFileContent: string): number;
|
|
|
15
16
|
* @param fileContent - POSCAR file content.
|
|
16
17
|
* @return Material config.
|
|
17
18
|
*/
|
|
18
|
-
declare function fromPoscar(fileContent: string):
|
|
19
|
+
declare function fromPoscar(fileContent: string): MaterialConfig;
|
|
19
20
|
/**
|
|
20
21
|
* @summary Checks if a string has a POSCAR format (first 8 lines are read)
|
|
21
22
|
* @param text - string to check
|
|
@@ -16,15 +16,16 @@ const atomicConstraintsCharFromBool = (bool) => (bool ? "T" : "F");
|
|
|
16
16
|
/**
|
|
17
17
|
* Obtain a textual representation of a material in POSCAR format.
|
|
18
18
|
* @param materialOrConfig - material class instance or config object.
|
|
19
|
-
* @param omitConstraints - whether to discard constraints
|
|
19
|
+
* @param omitConstraints - whether to discard constraints when serializing.
|
|
20
20
|
*/
|
|
21
21
|
function toPoscar(materialOrConfig, omitConstraints = false) {
|
|
22
22
|
const lattice = new lattice_1.Lattice(materialOrConfig.lattice);
|
|
23
23
|
const vectorsAsString = _latticeVectorsToString(lattice.vectorArrays);
|
|
24
|
-
|
|
24
|
+
const constraints = "constraints" in materialOrConfig.basis ? materialOrConfig.basis.constraints : [];
|
|
25
25
|
const basis = new constrained_basis_1.ConstrainedBasis({
|
|
26
26
|
...materialOrConfig.basis,
|
|
27
27
|
cell: cell_1.Cell.fromVectorsArray(lattice.vectorArrays),
|
|
28
|
+
constraints: omitConstraints ? [] : constraints,
|
|
28
29
|
});
|
|
29
30
|
const BasisLines = [];
|
|
30
31
|
let addSelectiveDynamics = false;
|
package/dist/js/parsers/xyz.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MaterialSchema } from "@mat3ra/esse/dist/js/types";
|
|
1
|
+
import { MaterialEnhancedSchema, MaterialSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
2
|
import { ConstrainedBasis, ConstrainedBasisConfig } from "../basis/constrained_basis";
|
|
3
3
|
import { AtomicCoordinateValue } from "../basis/coordinates";
|
|
4
4
|
import { AtomicElementValue } from "../basis/elements";
|
|
@@ -32,11 +32,9 @@ declare function toBasisConfig(txt: string, units?: string, cell?: Cell): Constr
|
|
|
32
32
|
declare function fromBasis(basisClsInstance: ConstrainedBasis, coordinatePrintFormat: string): string;
|
|
33
33
|
/**
|
|
34
34
|
* Create XYZ from Material class instance (or its JSON config).
|
|
35
|
-
*
|
|
36
|
-
* @param fractional Coordinate units as fractional.
|
|
37
|
-
* @return Class Instance
|
|
35
|
+
* Prefer fromBasis when you already have a ConstrainedBasis instance.
|
|
38
36
|
*/
|
|
39
|
-
declare function fromMaterial(materialOrConfig: MaterialSchema, fractional?: boolean): string;
|
|
37
|
+
declare function fromMaterial(materialOrConfig: MaterialSchema | MaterialEnhancedSchema, fractional?: boolean): string;
|
|
40
38
|
declare const _default: {
|
|
41
39
|
validate: typeof validate;
|
|
42
40
|
fromMaterial: typeof fromMaterial;
|