@mat3ra/made 2026.6.11-1 → 2026.6.27-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/.pre-commit-config.yaml +1 -1
- package/.prettierignore +1 -0
- package/AGENTS.md +133 -0
- package/data/constants.json +13 -0
- package/data/reciprocal_paths.json +111 -0
- package/dist/js/data/reciprocal_paths.json +111 -0
- package/dist/js/lattice/reciprocal/paths.js +8 -113
- package/dist/js/made.d.ts +2 -1
- package/dist/js/made.js +1 -1
- package/dist/js/parsers/parsers.d.ts +1 -0
- package/dist/js/parsers/poscar.d.ts +1 -0
- package/dist/js/parsers/poscar.js +1 -0
- package/package.json +1 -1
- package/pyproject.toml +4 -3
- package/src/js/constants/molecule.ts +1 -1
- package/src/js/lattice/reciprocal/paths.ts +10 -118
- package/src/js/made.ts +1 -1
- package/src/js/parsers/poscar.ts +1 -0
- package/src/py/mat3ra/made/data_helper.py +6 -0
- package/src/py/mat3ra/made/lattice.py +34 -0
- package/src/py/mat3ra/made/material.py +1 -2
- package/src/py/mat3ra/made/reciprocal/__init__.py +5 -0
- package/src/py/mat3ra/made/reciprocal/lattice_reciprocal.py +147 -0
- package/src/py/mat3ra/made/reciprocal/paths.py +30 -0
- package/src/py/mat3ra/made/reciprocal/symmetry_points.py +385 -0
- package/src/py/mat3ra/made/tools/analyze/fingerprint/__init__.py +1 -1
- package/src/py/mat3ra/made/tools/analyze/fingerprint/layers/layered_fingerprint_along_axis.py +2 -3
- package/src/py/mat3ra/made/tools/analyze/interface/__init__.py +1 -1
- package/src/py/mat3ra/made/tools/analyze/lattice/analyzer.py +7 -5
- package/src/py/mat3ra/made/tools/analyze/lattice_planes.py +10 -9
- package/src/py/mat3ra/made/tools/analyze/lattice_swap_analyzer.py +3 -3
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/heterostructure/helpers.py +0 -1
- package/src/py/mat3ra/made/tools/build/compound_pristine_structures/two_dimensional/heterostructure/utils.py +10 -11
- package/src/py/mat3ra/made/tools/build_components/operations/core/combinations/stack/builder.py +26 -13
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/perturb/helpers.py +2 -2
- package/src/py/mat3ra/made/tools/build_components/operations/core/modifications/strain/builder.py +1 -1
- package/src/py/mat3ra/made/tools/convert/__init__.py +8 -11
- package/src/py/mat3ra/made/tools/convert/utils.py +9 -5
- package/src/py/mat3ra/made/tools/operations/reusable/unary.py +2 -2
- package/tests/js/parsers/poscar.ts +9 -9
- package/tests/py/unit/fixtures/interface/zsl.py +64 -64
- package/tests/py/unit/fixtures/thrid_party/ase_atoms.py +0 -1
- package/tests/py/unit/test_data_files.py +68 -0
- package/tests/py/unit/test_lattice.py +3 -4
- package/tests/py/unit/test_lattice_type_extended.py +53 -0
- package/tests/py/unit/test_reciprocal_lattice.py +86 -0
- package/tests/py/unit/test_reciprocal_paths.py +64 -0
- package/tests/py/unit/test_symmetry_points.py +151 -0
- package/tests/py/unit/test_tools_analyze.py +7 -1
- package/tests/py/unit/test_tools_analyze_basis.py +1 -1
- package/tests/py/unit/test_tools_analyze_lattice.py +9 -4
- package/tests/py/unit/test_tools_analyze_swap.py +15 -9
- package/tests/py/unit/test_tools_build_defect/test_point_defect.py +24 -3
- package/tests/py/unit/test_tools_build_interface.py +1 -2
- package/tests/py/unit/test_tools_build_interface_zsl.py +72 -4
- package/tests/py/unit/test_tools_build_metadata.py +0 -1
- package/tests/py/unit/test_tools_calculate.py +1 -0
- package/tests/py/unit/test_tools_convert.py +1 -4
- package/tests/py/unit/utils.py +29 -0
- package/constants.json +0 -13
- package/src/py/mat3ra/made/constants.py +0 -11
package/.pre-commit-config.yaml
CHANGED
package/.prettierignore
CHANGED
package/AGENTS.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
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/`
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
}
|
|
@@ -1,126 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.paths = void 0;
|
|
4
7
|
/**
|
|
5
|
-
* Default
|
|
8
|
+
* Default k-point paths according to:
|
|
6
9
|
* [AFLOW](https://arxiv.org/abs/1004.2974) methodology.
|
|
7
10
|
* Paths are split in parts for clarity.
|
|
11
|
+
*
|
|
12
|
+
* Raw segment data is stored in data/reciprocal_paths.json (shared with Python).
|
|
8
13
|
*/
|
|
9
|
-
const
|
|
10
|
-
CUB: [
|
|
11
|
-
["Г", "X", "M", "Г", "R", "X"],
|
|
12
|
-
["M", "R"],
|
|
13
|
-
],
|
|
14
|
-
BCC: [
|
|
15
|
-
["Г", "H", "N", "Г", "P", "H"],
|
|
16
|
-
["P", "N"],
|
|
17
|
-
],
|
|
18
|
-
FCC: [
|
|
19
|
-
["Г", "X", "W", "K", "Г", "L", "U", "W", "L"],
|
|
20
|
-
["U", "X"],
|
|
21
|
-
],
|
|
22
|
-
TET: [
|
|
23
|
-
["Г", "X", "M", "Г", "Z", "R", "A", "Z"],
|
|
24
|
-
["X", "R"],
|
|
25
|
-
["M", "A"],
|
|
26
|
-
],
|
|
27
|
-
"BCT-1": [
|
|
28
|
-
["Г", "X", "M", "Г", "Z", "P", "N", "Z1", "M"],
|
|
29
|
-
["X", "P"],
|
|
30
|
-
],
|
|
31
|
-
"BCT-2": [
|
|
32
|
-
["Г", "X", "Y", "∑", "Г", "Z", "∑1", "N", "P", "Y1", "Z"],
|
|
33
|
-
["X", "P"],
|
|
34
|
-
],
|
|
35
|
-
ORC: [
|
|
36
|
-
["Г", "X", "S", "Y", "Г", "Z", "U", "R", "T", "Z"],
|
|
37
|
-
["Y", "T"],
|
|
38
|
-
["U", "X"],
|
|
39
|
-
["S", "R"],
|
|
40
|
-
],
|
|
41
|
-
"ORCF-1": [
|
|
42
|
-
["Г", "Y", "T", "Z", "Г", "X", "A1", "Y"],
|
|
43
|
-
["T", "X1"],
|
|
44
|
-
["X", "A", "Z"],
|
|
45
|
-
["L", "Г"],
|
|
46
|
-
],
|
|
47
|
-
"ORCF-2": [
|
|
48
|
-
["Г", "Y", "C", "D", "X", "Г", "Z", "D1", "H", "C"],
|
|
49
|
-
["C1", "Z"],
|
|
50
|
-
["X", "H1"],
|
|
51
|
-
["H", "Y"],
|
|
52
|
-
["L", "Г"],
|
|
53
|
-
],
|
|
54
|
-
"ORCF-3": [
|
|
55
|
-
["Г", "Y", "T", "Z", "Г", "X", "A1", "Y"],
|
|
56
|
-
["X", "A", "Z"],
|
|
57
|
-
["L", "Г"],
|
|
58
|
-
],
|
|
59
|
-
ORCI: [
|
|
60
|
-
["Г", "X", "L", "T", "W", "R", "X1", "Z", "Г", "Y", "S", "W"],
|
|
61
|
-
["L1", "Y"],
|
|
62
|
-
["Y1", "Z"],
|
|
63
|
-
],
|
|
64
|
-
ORCC: [
|
|
65
|
-
["Г", "X", "S", "R", "A", "Z", "Г", "Y", "X1", "A1", "T", "Y"],
|
|
66
|
-
["Z", "T"],
|
|
67
|
-
],
|
|
68
|
-
HEX: [
|
|
69
|
-
["Г", "M", "K", "Г", "A", "L", "H", "A"],
|
|
70
|
-
["L", "M"],
|
|
71
|
-
["K", "H"],
|
|
72
|
-
],
|
|
73
|
-
"RHL-1": [
|
|
74
|
-
["Г", "L", "B1"],
|
|
75
|
-
["B", "Z", "Г", "X"],
|
|
76
|
-
["Q", "F", "P1", "Z"],
|
|
77
|
-
["L", "P"],
|
|
78
|
-
],
|
|
79
|
-
"RHL-2": [["Г", "P", "Z", "Q", "Г", "F", "P1", "Q1", "L", "Z"]],
|
|
80
|
-
MCL: [
|
|
81
|
-
["Г", "Y", "H", "C", "E", "M1", "A", "X", "H1"],
|
|
82
|
-
["M", "D", "Z"],
|
|
83
|
-
["Y", "D"],
|
|
84
|
-
],
|
|
85
|
-
"MCLC-1": [
|
|
86
|
-
["Г", "Y", "Г", "L", "I"],
|
|
87
|
-
["I1", "Z", "F1"],
|
|
88
|
-
["Y", "X1"],
|
|
89
|
-
["X", "Г", "N"],
|
|
90
|
-
["M", "Г"],
|
|
91
|
-
],
|
|
92
|
-
"MCLC-2": [
|
|
93
|
-
["Г", "Y", "F", "L", "I"],
|
|
94
|
-
["I1", "Z", "F1"],
|
|
95
|
-
["N", "Г", "M"],
|
|
96
|
-
],
|
|
97
|
-
"MCLC-3": [
|
|
98
|
-
["Г", "Y", "F", "H", "Z", "I", "F1"],
|
|
99
|
-
["H1", "Y1", "X", "Г", "N"],
|
|
100
|
-
["M", "Г"],
|
|
101
|
-
],
|
|
102
|
-
"MCLC-4": [
|
|
103
|
-
["Г", "Y", "F", "H", "Z", "I"],
|
|
104
|
-
["H1", "Y1", "X", "Г", "N"],
|
|
105
|
-
["M", "Г"],
|
|
106
|
-
],
|
|
107
|
-
"MCLC-5": [
|
|
108
|
-
["Г", "Y", "F", "L", "I"],
|
|
109
|
-
["I1", "Z", "H", "F1"],
|
|
110
|
-
["H1", "Y1", "X", "Г", "N"],
|
|
111
|
-
["M", "Г"],
|
|
112
|
-
],
|
|
113
|
-
TRI: [
|
|
114
|
-
["X", "Г", "Y"],
|
|
115
|
-
["L", "Г", "Z"],
|
|
116
|
-
["N", "Г", "M"],
|
|
117
|
-
["R", "Г"],
|
|
118
|
-
],
|
|
119
|
-
};
|
|
14
|
+
const reciprocal_paths_json_1 = __importDefault(require("../../data/reciprocal_paths.json"));
|
|
120
15
|
// Export a processed version of the paths
|
|
121
16
|
exports.paths = (() => {
|
|
122
17
|
const result = {};
|
|
123
|
-
Object.entries(
|
|
18
|
+
Object.entries(reciprocal_paths_json_1.default).forEach(([key, pathSegments]) => {
|
|
124
19
|
// Flatten arrays of path segments into a single array
|
|
125
20
|
const flattenedPath = pathSegments.reduce((acc, segment) => [...acc, ...segment], []);
|
|
126
21
|
// Convert to KPointStep array
|
package/dist/js/made.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Basis } from "./basis/basis";
|
|
|
2
2
|
import { Cell } from "./cell/cell";
|
|
3
3
|
import { ATOMIC_COORD_UNITS, coefficients, tolerance, units } from "./constants";
|
|
4
4
|
import { AtomicConstraints } from "./constraints/constraints";
|
|
5
|
-
import {
|
|
5
|
+
import { defaultNonPeriodicMinimumLatticeSize, diatomicLatticePaddingFactor, Lattice, molecularLatticePaddingFactor } from "./lattice/lattice";
|
|
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";
|
|
@@ -56,6 +56,7 @@ export declare const Made: {
|
|
|
56
56
|
toPoscar: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema, omitConstraints?: boolean) => string;
|
|
57
57
|
fromPoscar: (fileContent: string) => object;
|
|
58
58
|
atomicConstraintsCharFromBool: (bool: boolean) => string;
|
|
59
|
+
atomsCount: typeof import("./parsers/poscar").atomsCount;
|
|
59
60
|
};
|
|
60
61
|
cif: {
|
|
61
62
|
parseMeta: (txt: string) => import("./parsers/cif").Meta;
|
package/dist/js/made.js
CHANGED
|
@@ -16,9 +16,9 @@ Object.defineProperty(exports, "units", { enumerable: true, get: function () { r
|
|
|
16
16
|
const constraints_1 = require("./constraints/constraints");
|
|
17
17
|
Object.defineProperty(exports, "AtomicConstraints", { enumerable: true, get: function () { return constraints_1.AtomicConstraints; } });
|
|
18
18
|
const lattice_1 = require("./lattice/lattice");
|
|
19
|
-
Object.defineProperty(exports, "Lattice", { enumerable: true, get: function () { return lattice_1.Lattice; } });
|
|
20
19
|
Object.defineProperty(exports, "defaultNonPeriodicMinimumLatticeSize", { enumerable: true, get: function () { return lattice_1.defaultNonPeriodicMinimumLatticeSize; } });
|
|
21
20
|
Object.defineProperty(exports, "diatomicLatticePaddingFactor", { enumerable: true, get: function () { return lattice_1.diatomicLatticePaddingFactor; } });
|
|
21
|
+
Object.defineProperty(exports, "Lattice", { enumerable: true, get: function () { return lattice_1.Lattice; } });
|
|
22
22
|
Object.defineProperty(exports, "molecularLatticePaddingFactor", { enumerable: true, get: function () { return lattice_1.molecularLatticePaddingFactor; } });
|
|
23
23
|
const lattice_types_1 = require("./lattice/lattice_types");
|
|
24
24
|
Object.defineProperty(exports, "DEFAULT_LATTICE_UNITS", { enumerable: true, get: function () { return lattice_types_1.DEFAULT_LATTICE_UNITS; } });
|
|
@@ -11,6 +11,7 @@ declare const _default: {
|
|
|
11
11
|
toPoscar: (materialOrConfig: import("@mat3ra/esse/dist/js/types").MaterialSchema, omitConstraints?: boolean) => string;
|
|
12
12
|
fromPoscar: (fileContent: string) => object;
|
|
13
13
|
atomicConstraintsCharFromBool: (bool: boolean) => string;
|
|
14
|
+
atomsCount: typeof import("./poscar").atomsCount;
|
|
14
15
|
};
|
|
15
16
|
cif: {
|
|
16
17
|
parseMeta: (txt: string) => import("./cif").Meta;
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED
|
@@ -47,8 +47,9 @@ tests = [
|
|
|
47
47
|
# B/c of https://github.com/binary-husky/gpt_academic/issues/1237
|
|
48
48
|
"gradio",
|
|
49
49
|
"pydantic",
|
|
50
|
+
"spglib==2.6.0",
|
|
50
51
|
"mat3ra-made[tools]",
|
|
51
|
-
"mat3ra-standata"
|
|
52
|
+
"mat3ra-standata",
|
|
52
53
|
]
|
|
53
54
|
all = [
|
|
54
55
|
"mat3ra-made[tests]",
|
|
@@ -74,8 +75,8 @@ git_describe_command = "git describe --tags --long"
|
|
|
74
75
|
[tool.setuptools.packages.find]
|
|
75
76
|
where = ["src/py"]
|
|
76
77
|
|
|
77
|
-
[tool.setuptools.
|
|
78
|
-
"
|
|
78
|
+
[tool.setuptools.data-files]
|
|
79
|
+
"data" = ["data/constants.json", "data/reciprocal_paths.json"]
|
|
79
80
|
|
|
80
81
|
|
|
81
82
|
[tool.black]
|