@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/parsers/xyz.js
CHANGED
|
@@ -132,16 +132,15 @@ function fromBasis(basisClsInstance, coordinatePrintFormat) {
|
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
134
|
* Create XYZ from Material class instance (or its JSON config).
|
|
135
|
-
*
|
|
136
|
-
* @param fractional Coordinate units as fractional.
|
|
137
|
-
* @return Class Instance
|
|
135
|
+
* Prefer fromBasis when you already have a ConstrainedBasis instance.
|
|
138
136
|
*/
|
|
139
137
|
function fromMaterial(materialOrConfig, fractional = false) {
|
|
140
138
|
const lattice = new lattice_1.Lattice(materialOrConfig.lattice);
|
|
141
|
-
|
|
139
|
+
const constraints = "constraints" in materialOrConfig.basis ? materialOrConfig.basis.constraints : [];
|
|
142
140
|
const basis = new constrained_basis_1.ConstrainedBasis({
|
|
143
141
|
...materialOrConfig.basis,
|
|
144
142
|
cell: cell_1.Cell.fromVectorsArray(lattice.vectorArrays),
|
|
143
|
+
constraints,
|
|
145
144
|
});
|
|
146
145
|
if (fractional) {
|
|
147
146
|
basis.toCrystal();
|
|
@@ -209,7 +209,9 @@ class CombinatorialBasis {
|
|
|
209
209
|
dimensions.push(itemsSet);
|
|
210
210
|
});
|
|
211
211
|
// @ts-ignore // We're multiplying objects with math, not numbers. No type casting will help.
|
|
212
|
-
const basisSet = utils_1.Utils.math.cartesianProduct.apply(null,
|
|
212
|
+
const basisSet = utils_1.Utils.math.cartesianProduct.apply(null,
|
|
213
|
+
// @ts-ignore
|
|
214
|
+
dimensions);
|
|
213
215
|
return basisSet.map((basis) => basis.filter((entry) => entry.element !== VACANCY_CHARACTER));
|
|
214
216
|
}
|
|
215
217
|
/**
|
package/dist/js/tools/basis.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare function repeat(basis: Basis, repetitions: number[]): Basis;
|
|
|
14
14
|
* @param numberOfSteps{Number} Number of intermediate steps.
|
|
15
15
|
* @return {Basis[]} List of all bases.
|
|
16
16
|
*/
|
|
17
|
-
declare function interpolate(initialBasis: Basis, finalBasis: Basis, numberOfSteps?: number): Basis[];
|
|
17
|
+
declare function interpolate(initialBasis: Basis, finalBasis: Basis, numberOfSteps?: number): Basis<import("../basis/basis").BasisConfig>[];
|
|
18
18
|
declare const _default: {
|
|
19
19
|
repeat: typeof repeat;
|
|
20
20
|
interpolate: typeof interpolate;
|
package/dist/js/tools/index.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
surface: {
|
|
3
|
-
generateConfig: (material: import("../
|
|
3
|
+
generateConfig: <Schemas extends import("../Material").MaterialSchemaMap = import("../Material").MaterialSchemaMap>(material: import("../Material").default<Schemas>, millerIndices: import("@mat3ra/esse/dist/js/types").Coordinate3DSchema, numberOfLayers?: number, vx?: number, vy?: number) => import("./surface").SlabConfigSchema;
|
|
4
4
|
};
|
|
5
5
|
supercell: {
|
|
6
|
-
generateConfig: (material: import("../
|
|
6
|
+
generateConfig: <Schemas extends import("../Material").MaterialSchemaMap = import("../Material").MaterialSchemaMap>(material: import("../Material").default<Schemas>, supercellMatrix: import("@mat3ra/esse/dist/js/types").Matrix3X3Schema) => {
|
|
7
7
|
name: string;
|
|
8
|
-
basis: import("@mat3ra/esse/dist/js/types").
|
|
8
|
+
basis: import("../basis/basis").BasisConfig & import("@mat3ra/esse/dist/js/types").BaseInMemoryEntitySchema;
|
|
9
9
|
lattice: import("@mat3ra/esse/dist/js/types").LatticeSchema;
|
|
10
10
|
};
|
|
11
11
|
generateNewBasisWithinSupercell: (basis: import("../made").Basis | import("../basis/constrained_basis").ConstrainedBasis, cell: import("../made").Cell, supercell: import("../made").Cell, supercellMatrix: import("@mat3ra/esse/dist/js/types").Matrix3X3Schema) => import("../made").Basis;
|
|
12
12
|
};
|
|
13
13
|
material: {
|
|
14
|
-
scaleOneLatticeVector: (material: import("../
|
|
15
|
-
scaleLatticeToMakeNonPeriodic: (material: import("../
|
|
16
|
-
translateAtomsToCenter: (material: import("../
|
|
14
|
+
scaleOneLatticeVector: (material: import("../Material").default, key?: "a" | "b" | "c", factor?: number) => void;
|
|
15
|
+
scaleLatticeToMakeNonPeriodic: (material: import("../Material").default) => void;
|
|
16
|
+
translateAtomsToCenter: (material: import("../Material").default) => void;
|
|
17
17
|
};
|
|
18
18
|
basis: {
|
|
19
19
|
repeat: (basis: import("../made").Basis, repetitions: number[]) => import("../made").Basis;
|
|
20
|
-
interpolate: (initialBasis: import("../made").Basis, finalBasis: import("../made").Basis, numberOfSteps?: number) => import("../made").Basis[];
|
|
20
|
+
interpolate: (initialBasis: import("../made").Basis, finalBasis: import("../made").Basis, numberOfSteps?: number) => import("../made").Basis<import("../basis/basis").BasisConfig>[];
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export default _default;
|
|
@@ -15,7 +15,7 @@ function scaleOneLatticeVector(material, key = "a", factor = 1.0) {
|
|
|
15
15
|
throw new Error("Lattice vectors are undefined");
|
|
16
16
|
}
|
|
17
17
|
lattice.vectors[key] = lattice.vectors[key].map((v) => v * factor);
|
|
18
|
-
material.
|
|
18
|
+
material.setLattice(lattice_1.Lattice.fromVectors(lattice.vectors).toJSON());
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Updates the size of a materials lattice using the minimumLatticeSize function.
|
|
@@ -23,10 +23,10 @@ function scaleOneLatticeVector(material, key = "a", factor = 1.0) {
|
|
|
23
23
|
* @param material {Material}
|
|
24
24
|
*/
|
|
25
25
|
function scaleLatticeToMakeNonPeriodic(material) {
|
|
26
|
-
material.
|
|
27
|
-
a: material.
|
|
26
|
+
material.setLattice(lattice_1.Lattice.fromConfigPartial({
|
|
27
|
+
a: material.getBasis().getMinimumLatticeSize(),
|
|
28
28
|
type: "CUB",
|
|
29
|
-
}).toJSON();
|
|
29
|
+
}).toJSON());
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Updates the basis of a material by translating the coordinates
|
|
@@ -34,11 +34,12 @@ function scaleLatticeToMakeNonPeriodic(material) {
|
|
|
34
34
|
* @param material {Material}
|
|
35
35
|
* */
|
|
36
36
|
function translateAtomsToCenter(material) {
|
|
37
|
-
const
|
|
37
|
+
const basis = material.getBasis();
|
|
38
|
+
const originalUnits = basis.units;
|
|
38
39
|
material.toCartesian();
|
|
39
|
-
const updatedBasis =
|
|
40
|
+
const updatedBasis = basis.toCartesian();
|
|
40
41
|
const centerOfCoordinates = updatedBasis.centerOfCoordinatesPoint;
|
|
41
|
-
const centerOfLattice = utils_1.Utils.math.multiply(0.5, material.
|
|
42
|
+
const centerOfLattice = utils_1.Utils.math.multiply(0.5, material.getLattice().vectorArrays.reduce((a, b) => utils_1.Utils.math.add(a, b)));
|
|
42
43
|
const translationVector = utils_1.Utils.math.subtract(centerOfLattice, centerOfCoordinates);
|
|
43
44
|
updatedBasis.translateByVector(translationVector);
|
|
44
45
|
material.setBasis(updatedBasis.toJSON());
|
|
@@ -2,19 +2,18 @@ import { Matrix3X3Schema } from "@mat3ra/esse/dist/js/types";
|
|
|
2
2
|
import { Basis } from "../basis/basis";
|
|
3
3
|
import { ConstrainedBasis } from "../basis/constrained_basis";
|
|
4
4
|
import { Cell } from "../cell/cell";
|
|
5
|
-
import type {
|
|
5
|
+
import type { MaterialSchemaMap } from "../Material";
|
|
6
|
+
import type Material from "../Material";
|
|
6
7
|
/**
|
|
7
8
|
* @summary Generates new basis for a supercell. For each site from basis generates shifts that are within supercell.
|
|
8
9
|
*/
|
|
9
10
|
declare function generateNewBasisWithinSupercell(basis: Basis | ConstrainedBasis, cell: Cell, supercell: Cell, supercellMatrix: Matrix3X3Schema): Basis;
|
|
10
11
|
/**
|
|
11
12
|
* @summary Generates supercell config for the specified material.
|
|
12
|
-
* @param material
|
|
13
|
-
* @param supercellMatrix {Number[][]}
|
|
14
13
|
*/
|
|
15
|
-
declare function generateConfig(material: Material
|
|
14
|
+
declare function generateConfig<Schemas extends MaterialSchemaMap = MaterialSchemaMap>(material: Material<Schemas>, supercellMatrix: Matrix3X3Schema): {
|
|
16
15
|
name: string;
|
|
17
|
-
basis: import("@mat3ra/esse/dist/js/types").
|
|
16
|
+
basis: import("../basis/basis").BasisConfig & import("@mat3ra/esse/dist/js/types").BaseInMemoryEntitySchema;
|
|
18
17
|
lattice: import("@mat3ra/esse/dist/js/types").LatticeSchema;
|
|
19
18
|
};
|
|
20
19
|
declare const _default: {
|
|
@@ -35,17 +35,15 @@ function generateNewBasisWithinSupercell(basis, cell, supercell, supercellMatrix
|
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* @summary Generates supercell config for the specified material.
|
|
38
|
-
* @param material
|
|
39
|
-
* @param supercellMatrix {Number[][]}
|
|
40
38
|
*/
|
|
41
39
|
function generateConfig(material, supercellMatrix) {
|
|
42
40
|
const det = utils_1.Utils.math.det(supercellMatrix);
|
|
43
41
|
if (det === 0) {
|
|
44
42
|
throw new Error("Scaling matrix is degenerate.");
|
|
45
43
|
}
|
|
46
|
-
const cell = material.
|
|
44
|
+
const cell = material.getLattice().vectors;
|
|
47
45
|
const supercell = cell.cloneAndScaleByMatrix(supercellMatrix);
|
|
48
|
-
const newBasis = generateNewBasisWithinSupercell(material.
|
|
46
|
+
const newBasis = generateNewBasisWithinSupercell(material.getBasis(), cell, supercell, supercellMatrix);
|
|
49
47
|
const newLattice = lattice_1.Lattice.fromVectors({
|
|
50
48
|
a: supercell.a,
|
|
51
49
|
b: supercell.b,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Coordinate3DSchema
|
|
2
|
-
import {
|
|
3
|
-
export type SlabConfigSchema =
|
|
1
|
+
import { Coordinate3DSchema } from "@mat3ra/esse/dist/js/types";
|
|
2
|
+
import Material, { type MaterialConfig, type MaterialSchemaMap } from "../Material";
|
|
3
|
+
export type SlabConfigSchema = MaterialConfig & {
|
|
4
4
|
outOfPlaneAxisIndex: number;
|
|
5
5
|
};
|
|
6
|
-
declare function generateConfig(material: Material
|
|
6
|
+
declare function generateConfig<Schemas extends MaterialSchemaMap = MaterialSchemaMap>(material: Material<Schemas>, millerIndices: Coordinate3DSchema, numberOfLayers?: number, vx?: number, vy?: number): SlabConfigSchema;
|
|
7
7
|
declare const _default: {
|
|
8
8
|
generateConfig: typeof generateConfig;
|
|
9
9
|
};
|
package/dist/js/tools/surface.js
CHANGED
|
@@ -30,10 +30,6 @@ function extGCD(a, b) {
|
|
|
30
30
|
/**
|
|
31
31
|
* Generates a slab scaling matrix for the specified cell based on miller indices.
|
|
32
32
|
* Inspired by from https://gitlab.com/ase/ase/blob/master/ase/build/general_surface.py.
|
|
33
|
-
* @param cell {Cell}
|
|
34
|
-
* @param millerIndices {Number[]}
|
|
35
|
-
* @param tol {Number} Zero-value tolerance
|
|
36
|
-
* @return {Number[][]}
|
|
37
33
|
*/
|
|
38
34
|
function getMillerScalingMatrix(cell, millerIndices, tol = 1e-8) {
|
|
39
35
|
if (!millerIndices.reduce((a, b) => utils_1.Utils.math.abs(a) + utils_1.Utils.math.abs(b)))
|
|
@@ -108,7 +104,6 @@ function getMillerScalingMatrix(cell, millerIndices, tol = 1e-8) {
|
|
|
108
104
|
* @param thickness {Number} Surface (Slab) thickness in layers (Positive Integer).
|
|
109
105
|
* @param vx {Number} Size of lateral supercell along the direction of the first (x) cell vector (Positive Integer).
|
|
110
106
|
* @param vy {Number} Size of lateral supercell along the direction of the second (y) cell vector (Positive Integer).
|
|
111
|
-
* @return {Number[][]}
|
|
112
107
|
*/
|
|
113
108
|
function getDimensionsScalingMatrix(outOfPlaneAxisIndex, thickness, vx, vy) {
|
|
114
109
|
const transformationMatrix = [
|
|
@@ -135,7 +130,7 @@ function getDimensionsScalingMatrix(outOfPlaneAxisIndex, thickness, vx, vy) {
|
|
|
135
130
|
function generateConfig(material, millerIndices, numberOfLayers = 1, vx = 1, vy = 1) {
|
|
136
131
|
if (numberOfLayers < 1)
|
|
137
132
|
throw new Error("Made.tools.surface.generateConfig: number of layers < 1.");
|
|
138
|
-
const cell = material.
|
|
133
|
+
const cell = material.getLattice().vectors;
|
|
139
134
|
const millerScalingMatrix = getMillerScalingMatrix(cell, millerIndices);
|
|
140
135
|
const millerSupercell = cell.cloneAndScaleByMatrix(millerScalingMatrix);
|
|
141
136
|
const millerPlanePseudoNormal = cell.convertPointToCartesian(millerIndices);
|
|
@@ -143,7 +138,7 @@ function generateConfig(material, millerIndices, numberOfLayers = 1, vx = 1, vy
|
|
|
143
138
|
const dimensionsScalingMatrix = getDimensionsScalingMatrix(outOfPlaneAxisIndex, numberOfLayers, vx, vy);
|
|
144
139
|
const supercellMatrix = MULT(dimensionsScalingMatrix, millerScalingMatrix);
|
|
145
140
|
const supercell = millerSupercell.cloneAndScaleByMatrix(dimensionsScalingMatrix);
|
|
146
|
-
const tempBasis = material.
|
|
141
|
+
const tempBasis = material.getBasis().clone();
|
|
147
142
|
const newBasis = supercell_1.default.generateNewBasisWithinSupercell(tempBasis, cell, supercell, supercellMatrix);
|
|
148
143
|
const newLattice = lattice_1.Lattice.fromVectors({
|
|
149
144
|
a: supercell.vectorArrays[0],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mat3ra/made",
|
|
3
|
-
"version": "2026.8.
|
|
3
|
+
"version": "2026.8.18-0",
|
|
4
4
|
"description": "MAterials DEsign library",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"lint": "eslint --cache src/js tests/js && prettier --write src/js tests/js",
|
|
@@ -10,13 +10,17 @@
|
|
|
10
10
|
"prettier": "prettier --check src/js tests/js",
|
|
11
11
|
"test": "nyc --reporter=text mocha --recursive --bail tests/js/**/*.ts",
|
|
12
12
|
"generate-mixins": "ts-node scripts/generate-mixins.ts",
|
|
13
|
-
"transpile": "tsc -p tsconfig-transpile.json"
|
|
13
|
+
"transpile": "tsc -p tsconfig-transpile.json",
|
|
14
|
+
"prepublishOnly": "npm run transpile"
|
|
14
15
|
},
|
|
15
16
|
"repository": {
|
|
16
17
|
"type": "git",
|
|
17
18
|
"url": "https://github.com/mat3ra/made.git"
|
|
18
19
|
},
|
|
19
20
|
"main": "dist/js/made.js",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
20
24
|
"author": "Exabyte Inc.",
|
|
21
25
|
"bugs": {
|
|
22
26
|
"url": "https://github.com/mat3ra/made/issues"
|
|
@@ -34,11 +38,11 @@
|
|
|
34
38
|
"@babel/register": "^7.29.7",
|
|
35
39
|
"@babel/runtime-corejs3": "^7.29.7",
|
|
36
40
|
"@exabyte-io/eslint-config": "^2026.7.3-0",
|
|
37
|
-
"@mat3ra/code": "
|
|
38
|
-
"@mat3ra/esse": "
|
|
39
|
-
"@mat3ra/tsconfig": "^2024.6.3-0",
|
|
40
|
-
"@mat3ra/utils": "^2026.7.8-0",
|
|
41
|
+
"@mat3ra/code": "2026.8.18-0",
|
|
42
|
+
"@mat3ra/esse": "2026.8.18-2",
|
|
41
43
|
"@mat3ra/standata": "2026.6.30-0",
|
|
44
|
+
"@mat3ra/tsconfig": "^2024.6.3-0",
|
|
45
|
+
"@mat3ra/utils": "2026.8.18-1",
|
|
42
46
|
"@types/crypto-js": "^4.2.2",
|
|
43
47
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
44
48
|
"@typescript-eslint/parser": "^5.62.0",
|
|
@@ -60,8 +64,8 @@
|
|
|
60
64
|
"husky": "^7.0.4",
|
|
61
65
|
"lint-staged": "^12.5.0",
|
|
62
66
|
"mocha": "10.8.2",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
67
|
+
"nyc": "^15.1.0",
|
|
68
|
+
"prettier": "^2.8.8"
|
|
65
69
|
},
|
|
66
70
|
"dependencies": {
|
|
67
71
|
"@babel/core": "^7.29.7",
|
package/.babelrc
DELETED
package/.eslintrc.json
DELETED
package/.gitattributes
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*.png filter=lfs diff=lfs merge=lfs -text
|
package/.husky/post-checkout
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-checkout' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; }
|
|
3
|
-
git lfs post-checkout "$@"
|
package/.husky/post-commit
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-commit' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; }
|
|
3
|
-
git lfs post-commit "$@"
|
package/.husky/post-merge
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-merge' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; }
|
|
3
|
-
git lfs post-merge "$@"
|
package/.husky/pre-commit
DELETED
package/.husky/pre-push
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; }
|
|
3
|
-
git lfs pre-push "$@"
|
package/.mocharc.json
DELETED
package/.pre-commit-config.yaml
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
repos:
|
|
2
|
-
- repo: https://github.com/Exabyte-io/pre-commit-hooks
|
|
3
|
-
rev: 2023.6.28
|
|
4
|
-
hooks:
|
|
5
|
-
- id: ruff
|
|
6
|
-
exclude: ^tests/fixtures*
|
|
7
|
-
- id: black
|
|
8
|
-
exclude: ^tests/fixtures*
|
|
9
|
-
- id: isort
|
|
10
|
-
exclude: ^tests/fixtures*
|
|
11
|
-
- id: mypy
|
|
12
|
-
exclude: ^tests/fixtures*
|
|
13
|
-
- id: check-yaml
|
|
14
|
-
exclude: ^tests/fixtures*
|
|
15
|
-
- id: end-of-file-fixer
|
|
16
|
-
exclude: ^tests/fixtures*|^dist*
|
|
17
|
-
- id: trailing-whitespace
|
|
18
|
-
exclude: ^tests/fixtures*|^dist*
|
|
19
|
-
- repo: local
|
|
20
|
-
hooks:
|
|
21
|
-
- id: lint-staged
|
|
22
|
-
name: lint-staged
|
|
23
|
-
language: node
|
|
24
|
-
entry: npx lint-staged
|
|
25
|
-
verbose: true # to see familiar lint-staged output
|
|
26
|
-
pass_filenames: false # lint-staged has its own glob expression
|
package/.prettierignore
DELETED
package/.prettierrc
DELETED
package/AGENTS.md
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
# AGENTS.md
|
|
2
|
-
|
|
3
|
-
This document describes generic architecture and conventions for AI coding agents.
|
|
4
|
-
|
|
5
|
-
## Conventions
|
|
6
|
-
|
|
7
|
-
### Design Patterns
|
|
8
|
-
|
|
9
|
-
- **Factory**: when multiple implementations are possible - e.g. multiple exchange-correlation functionals, or multiple k-point samplers.
|
|
10
|
-
- **Object-oriented design**: define abstract interfaces for components that have multiple implementations - e.g. Method → PseudopotentialMethod, PlaneWaveMethod, Model → DFTModel, HFModel, etc.
|
|
11
|
-
|
|
12
|
-
### OOP Guidelines & Antipatterns
|
|
13
|
-
|
|
14
|
-
**Prefer polymorphism over type-checking chains.** Instead of:
|
|
15
|
-
|
|
16
|
-
```cpp
|
|
17
|
-
// ❌ ANTIPATTERN: long if-chain checking object type
|
|
18
|
-
if (functional.is_lda()) {
|
|
19
|
-
compute_lda_energy(...);
|
|
20
|
-
} else if (functional.is_gga()) {
|
|
21
|
-
compute_gga_energy(...);
|
|
22
|
-
} else if (functional.is_meta_gga()) {
|
|
23
|
-
compute_meta_gga_energy(...);
|
|
24
|
-
}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Use:
|
|
28
|
-
|
|
29
|
-
```cpp
|
|
30
|
-
// ✅ CORRECT: polymorphic dispatch via virtual method
|
|
31
|
-
Real energy = functional.compute_energy(density);
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
**Key principles:**
|
|
35
|
-
|
|
36
|
-
- **Single Responsibility**: each class does one thing. If a class has methods for reading, computing, and writing, split it.
|
|
37
|
-
- **Open/Closed**: add new behavior by adding new classes, not by adding `if` branches to existing code.
|
|
38
|
-
- **Interface Segregation**: keep interfaces small. Don't force implementors to provide methods they don't need.
|
|
39
|
-
- **No `is_xxx()` type queries**: if you need `is_ultrasoft()`, `is_paw()`, `is_norm_conserving()`, your design likely needs a virtual method instead.
|
|
40
|
-
- **Favor composition over inheritance** for combining behaviors: use mixins (e.g., `BinarySerializableMixin`) rather than deep inheritance hierarchies.
|
|
41
|
-
- **Use factories** to create the right subclass from runtime configuration (e.g., `create_diagonalizer("davidson")`).
|
|
42
|
-
|
|
43
|
-
**Python Coding Guidelines & Antipatterns:**
|
|
44
|
-
|
|
45
|
-
- **No Function-Local Imports**: Do not put `import` statements inside functions or methods. Place all imports at the top level of the module to maintain visibility, clean dependencies, and prevent runtime cyclic/late failures.
|
|
46
|
-
- **No Nested Functions (Functions Inside Functions)**: Defining a helper function inside another function or method is an antipattern. Define helper functions at the module level or class level instead.
|
|
47
|
-
- **Cap Function Length at 20-25 lines**: Keep Python functions and methods short (capped at 20-25 lines max, excluding docstrings and comments). If a function grows longer, refactor and delegate its sub-tasks to smaller, well-isolated helper functions.
|
|
48
|
-
|
|
49
|
-
### Logging
|
|
50
|
-
|
|
51
|
-
- All output via logger
|
|
52
|
-
- Allow log level to be set via command line argument (critical, error, warn, info, debug, trace). Default is error.
|
|
53
|
-
- Only rank 0 outputs (MPI-aware initialization)
|
|
54
|
-
- No print statement in the log
|
|
55
|
-
|
|
56
|
-
### Testing
|
|
57
|
-
|
|
58
|
-
- Unit tests: `tests/unit/` (GTest)
|
|
59
|
-
- Integration tests: `tests/integration/`
|
|
60
|
-
|
|
61
|
-
### Comment Style
|
|
62
|
-
|
|
63
|
-
- **Multiline docstrings** must have `/**` on its own line followed by the comment body:
|
|
64
|
-
|
|
65
|
-
```cpp
|
|
66
|
-
// ✅ CORRECT
|
|
67
|
-
/**
|
|
68
|
-
* Compute the angular phase factor (-i)^l.
|
|
69
|
-
*/
|
|
70
|
-
|
|
71
|
-
// ❌ INCORRECT
|
|
72
|
-
/** Compute the angular phase factor (-i)^l.
|
|
73
|
-
*/
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
- Use `///` for single-line doc comments.
|
|
77
|
-
- Use `//` for inline implementation comments.
|
|
78
|
-
- Never use bare `/* ... */` for documentation; use `/** ... */`.
|
|
79
|
-
|
|
80
|
-
### Linter
|
|
81
|
-
|
|
82
|
-
Use linting for autoformatting the codebase. Consider language-specific tools and/or prettier.
|
|
83
|
-
|
|
84
|
-
### Pre-commit
|
|
85
|
-
|
|
86
|
-
Use pre-commit to run linters and formatters automatically.
|
|
87
|
-
|
|
88
|
-
### GitHub Actions
|
|
89
|
-
|
|
90
|
-
Use GitHub Actions to run tests and linters automatically.
|
|
91
|
-
|
|
92
|
-
## !!! IMPORTANT !!!: Code Editing & Development HARD RULES
|
|
93
|
-
|
|
94
|
-
### HARD RULE 1: Never commit without explicit ask from user
|
|
95
|
-
|
|
96
|
-
NEVER commit changes using `git commit` without the user's explicit ask. Leave files in the working directory for the user to review.
|
|
97
|
-
|
|
98
|
-
### HARD RULE 2: use `<PROJECT_DIRECTORY>/agents/workdir/` for ALL scratch files.
|
|
99
|
-
|
|
100
|
-
NEVER create any throwaway files at the top level of the project directory (`<PROJECT_DIRECTORY>`). The top level of `<PROJECT_DIRECTORY>` must remain clean and contain only tracked project files. All throw-away scripts — debug helpers, patch scripts, test snippets, one-off analysis scripts — MUST go in `<PROJECT_DIRECTORY>/agents/workdir/tmp/`. Create that directory if it does not exist. Examples of files that belong in `<PROJECT_DIRECTORY>/agents/workdir/tmp/`: `debug_*.py`, `fix_*.py`, `patch_*.py`, `print_*.py`, `test_*.py` / `test_*.cpp` that are not formal tests in `tests/`, any other ephemeral script written to inspect or patch source code. Any potentially reusable agent artifacts should be either in `<PROJECT_DIRECTORY>/agents/workdir/reusable` (if they're intended to be used in the current project only) or in `<PROJECT_DIRECTORY>/agents/plan` (if they're intended to be used in multiple projects). NO EXCEPTIONS.
|
|
101
|
-
|
|
102
|
-
### HARD RULE 3: Always setup and use a virtual environment
|
|
103
|
-
|
|
104
|
-
(`venv`) when working with Python. Do NOT install Python packages globally. Use pyenv to select python version(s). Create venv in the agents workdir directory as explained in the next item
|
|
105
|
-
|
|
106
|
-
## HARD RULE 4: names with no abbreviations, Snake for Py, Camel for JS/TS, classnames
|
|
107
|
-
|
|
108
|
-
Variables, functions, methods, field names, class names, type names, file names. Always use full, descriptive names. For example:
|
|
109
|
-
|
|
110
|
-
- ❌ `nkp`, `nbnd`, `nspin`, `npw`, `ik`, `ib`, `ig`, `ia`, `et`, `pw`, `ppset`
|
|
111
|
-
- ✅ `number_of_kpoints`, `number_of_bands`, `number_of_spin_components`, `number_of_plane_waves`, `kpoint_index`, `band_index`, `g_index`, `atom_index`, `eigenvalues`, `planewave_basis`, `pseudopotential_set`
|
|
112
|
-
- ❌ `Vec3`, `Mat3`, `IVec3`
|
|
113
|
-
- ✅ `Vector3D`, `Matrix3x3`, `IntegerVector3D`
|
|
114
|
-
|
|
115
|
-
Also:
|
|
116
|
-
|
|
117
|
-
- Use **snake_case** for variables, functions, and file names.
|
|
118
|
-
- Use **PascalCase** for classes and structs.
|
|
119
|
-
- Member variables use trailing underscore: `planewave_basis_`, `number_of_bands_`.
|
|
120
|
-
- General rule: if a name looks abbreviated, spell it out. Exceptions could be made for complex physical and mathematical extpressions where the abbreviation is widely know and used for compacting the representation. However, even in these cases, try to spell it out. Make sure to make it obvious from the context what the abbreviation means.
|
|
121
|
-
|
|
122
|
-
## Other
|
|
123
|
-
|
|
124
|
-
### JSON Formatting
|
|
125
|
-
|
|
126
|
-
- **HARD RULE**: JSON schemas MUST follow ESSE formatting conventions:
|
|
127
|
-
- **4-space indentation** (matching ESSE `.prettierrc`)
|
|
128
|
-
- **100 character print width**
|
|
129
|
-
- **Double quotes** only (standard JSON)
|
|
130
|
-
- **Trailing newline** at end of file
|
|
131
|
-
- **Bracket spacing** enabled (e.g., `{ "key": "value" }`)
|
|
132
|
-
- Q3 postprocessing/result schemas use ESSE-native names (e.g., `density_of_states`, not `dos_result`)
|
|
133
|
-
- All Q3 result schemas must `$ref` their corresponding ESSE schema in `schemas/esse/schema/`
|
package/MANIFEST.in
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exclude src/py/mat3ra/made/data
|
package/data/constants.json
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"molecule": {
|
|
3
|
-
"nonPeriodicMinimumLatticeSize": 3.0,
|
|
4
|
-
"diatomicLatticePaddingFactor": 3.0,
|
|
5
|
-
"molecularLatticePaddingFactor": 2.0
|
|
6
|
-
},
|
|
7
|
-
"precision": {
|
|
8
|
-
"coordinatesCrystal": 9,
|
|
9
|
-
"coordinatesCartesian": 6,
|
|
10
|
-
"latticeLengths": 6,
|
|
11
|
-
"latticeAngles": 4
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"CUB": [
|
|
3
|
-
["Γ", "X", "M", "Γ", "R", "X"],
|
|
4
|
-
["M", "R"]
|
|
5
|
-
],
|
|
6
|
-
"BCC": [
|
|
7
|
-
["Γ", "H", "N", "Γ", "P", "H"],
|
|
8
|
-
["P", "N"]
|
|
9
|
-
],
|
|
10
|
-
"FCC": [
|
|
11
|
-
["Γ", "X", "W", "K", "Γ", "L", "U", "W", "L"],
|
|
12
|
-
["U", "X"]
|
|
13
|
-
],
|
|
14
|
-
"TET": [
|
|
15
|
-
["Γ", "X", "M", "Γ", "Z", "R", "A", "Z"],
|
|
16
|
-
["X", "R"],
|
|
17
|
-
["M", "A"]
|
|
18
|
-
],
|
|
19
|
-
"BCT-1": [
|
|
20
|
-
["Γ", "X", "M", "Γ", "Z", "P", "N", "Z1", "M"],
|
|
21
|
-
["X", "P"]
|
|
22
|
-
],
|
|
23
|
-
"BCT-2": [
|
|
24
|
-
["Γ", "X", "Y", "∑", "Γ", "Z", "∑1", "N", "P", "Y1", "Z"],
|
|
25
|
-
["X", "P"]
|
|
26
|
-
],
|
|
27
|
-
"ORC": [
|
|
28
|
-
["Γ", "X", "S", "Y", "Γ", "Z", "U", "R", "T", "Z"],
|
|
29
|
-
["Y", "T"],
|
|
30
|
-
["U", "X"],
|
|
31
|
-
["S", "R"]
|
|
32
|
-
],
|
|
33
|
-
"ORCF-1": [
|
|
34
|
-
["Γ", "Y", "T", "Z", "Γ", "X", "A1", "Y"],
|
|
35
|
-
["T", "X1"],
|
|
36
|
-
["X", "A", "Z"],
|
|
37
|
-
["L", "Γ"]
|
|
38
|
-
],
|
|
39
|
-
"ORCF-2": [
|
|
40
|
-
["Γ", "Y", "C", "D", "X", "Γ", "Z", "D1", "H", "C"],
|
|
41
|
-
["C1", "Z"],
|
|
42
|
-
["X", "H1"],
|
|
43
|
-
["H", "Y"],
|
|
44
|
-
["L", "Γ"]
|
|
45
|
-
],
|
|
46
|
-
"ORCF-3": [
|
|
47
|
-
["Γ", "Y", "T", "Z", "Γ", "X", "A1", "Y"],
|
|
48
|
-
["X", "A", "Z"],
|
|
49
|
-
["L", "Γ"]
|
|
50
|
-
],
|
|
51
|
-
"ORCI": [
|
|
52
|
-
["Γ", "X", "L", "T", "W", "R", "X1", "Z", "Γ", "Y", "S", "W"],
|
|
53
|
-
["L1", "Y"],
|
|
54
|
-
["Y1", "Z"]
|
|
55
|
-
],
|
|
56
|
-
"ORCC": [
|
|
57
|
-
["Γ", "X", "S", "R", "A", "Z", "Γ", "Y", "X1", "A1", "T", "Y"],
|
|
58
|
-
["Z", "T"]
|
|
59
|
-
],
|
|
60
|
-
"HEX": [
|
|
61
|
-
["Γ", "M", "K", "Γ", "A", "L", "H", "A"],
|
|
62
|
-
["L", "M"],
|
|
63
|
-
["K", "H"]
|
|
64
|
-
],
|
|
65
|
-
"RHL-1": [
|
|
66
|
-
["Γ", "L", "B1"],
|
|
67
|
-
["B", "Z", "Γ", "X"],
|
|
68
|
-
["Q", "F", "P1", "Z"],
|
|
69
|
-
["L", "P"]
|
|
70
|
-
],
|
|
71
|
-
"RHL-2": [["Γ", "P", "Z", "Q", "Γ", "F", "P1", "Q1", "L", "Z"]],
|
|
72
|
-
"MCL": [
|
|
73
|
-
["Γ", "Y", "H", "C", "E", "M1", "A", "X", "H1"],
|
|
74
|
-
["M", "D", "Z"],
|
|
75
|
-
["Y", "D"]
|
|
76
|
-
],
|
|
77
|
-
"MCLC-1": [
|
|
78
|
-
["Γ", "Y", "Γ", "L", "I"],
|
|
79
|
-
["I1", "Z", "F1"],
|
|
80
|
-
["Y", "X1"],
|
|
81
|
-
["X", "Γ", "N"],
|
|
82
|
-
["M", "Γ"]
|
|
83
|
-
],
|
|
84
|
-
"MCLC-2": [
|
|
85
|
-
["Γ", "Y", "F", "L", "I"],
|
|
86
|
-
["I1", "Z", "F1"],
|
|
87
|
-
["N", "Γ", "M"]
|
|
88
|
-
],
|
|
89
|
-
"MCLC-3": [
|
|
90
|
-
["Γ", "Y", "F", "H", "Z", "I", "F1"],
|
|
91
|
-
["H1", "Y1", "X", "Γ", "N"],
|
|
92
|
-
["M", "Γ"]
|
|
93
|
-
],
|
|
94
|
-
"MCLC-4": [
|
|
95
|
-
["Γ", "Y", "F", "H", "Z", "I"],
|
|
96
|
-
["H1", "Y1", "X", "Γ", "N"],
|
|
97
|
-
["M", "Γ"]
|
|
98
|
-
],
|
|
99
|
-
"MCLC-5": [
|
|
100
|
-
["Γ", "Y", "F", "L", "I"],
|
|
101
|
-
["I1", "Z", "H", "F1"],
|
|
102
|
-
["H1", "Y1", "X", "Γ", "N"],
|
|
103
|
-
["M", "Γ"]
|
|
104
|
-
],
|
|
105
|
-
"TRI": [
|
|
106
|
-
["X", "Γ", "Y"],
|
|
107
|
-
["L", "Γ", "Z"],
|
|
108
|
-
["N", "Γ", "M"],
|
|
109
|
-
["R", "Γ"]
|
|
110
|
-
]
|
|
111
|
-
}
|