mat3ra-esse 2025.5.17.post1__py3-none-any.whl → 2025.6.5.post0__py3-none-any.whl

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.

Potentially problematic release.


This version of mat3ra-esse might be problematic. Click here for more details.

Files changed (125) hide show
  1. mat3ra/esse/data/examples.py +1 -1
  2. mat3ra/esse/data/schemas.py +1 -1
  3. mat3ra/esse/models/apse/file/applications/espresso/7.2/pw_x.py +6 -6
  4. mat3ra/esse/models/apse/materials/builders/slab/pymatgen/parameters.py +3 -3
  5. mat3ra/esse/models/coordinates_shape_enum.py +15 -0
  6. mat3ra/esse/models/core/primitive/array_of_3_integers.py +13 -0
  7. mat3ra/esse/models/core/reusable/axis_enum.py +13 -0
  8. mat3ra/esse/models/core/reusable/coordinate_conditions/__init__.py +31 -0
  9. mat3ra/esse/models/core/reusable/coordinate_conditions/base.py +21 -0
  10. mat3ra/esse/models/core/reusable/coordinate_conditions/box.py +24 -0
  11. mat3ra/esse/models/core/reusable/coordinate_conditions/cylinder.py +26 -0
  12. mat3ra/esse/models/core/reusable/coordinate_conditions/enum.py +15 -0
  13. mat3ra/esse/models/core/reusable/coordinate_conditions/plane.py +24 -0
  14. mat3ra/esse/models/core/reusable/coordinate_conditions/sphere.py +24 -0
  15. mat3ra/esse/models/core/reusable/coordinate_conditions/triangular_prism.py +27 -0
  16. mat3ra/esse/models/core/reusable/energy.py +2 -2
  17. mat3ra/esse/models/element.py +6 -6
  18. mat3ra/esse/models/material/__init__.py +14 -14
  19. mat3ra/esse/models/material/reusable/coordinate_conditions/base.py +21 -0
  20. mat3ra/esse/models/material/reusable/coordinate_conditions/box.py +24 -0
  21. mat3ra/esse/models/material/reusable/coordinate_conditions/cylinder.py +26 -0
  22. mat3ra/esse/models/material/reusable/coordinate_conditions/plane.py +24 -0
  23. mat3ra/esse/models/material/reusable/coordinate_conditions/sphere.py +24 -0
  24. mat3ra/esse/models/material/reusable/coordinate_conditions/triangular_prism.py +27 -0
  25. mat3ra/esse/models/material/reusable/slab/slab_configuration_with_termination.py +589 -0
  26. mat3ra/esse/models/material/reusable/slab/slab_with_termination.py +593 -0
  27. mat3ra/esse/models/material/reusable/slab/two_slabs_stack.py +618 -0
  28. mat3ra/esse/models/material/reusable/slab_configuration_with_termination.py +712 -0
  29. mat3ra/esse/models/material/reusable/stack/slab_configuration_with_termination.py +593 -0
  30. mat3ra/esse/models/material/reusable/stack/slab_in_stack.py +720 -0
  31. mat3ra/esse/models/material/reusable/stack/stack_of_slabs.py +737 -0
  32. mat3ra/esse/models/material/reusable/stack/stack_of_two_slabs.py +737 -0
  33. mat3ra/esse/models/material/reusable/supercell/supercell_matrix_2d.py +25 -0
  34. mat3ra/esse/models/material/reusable/supercell/supercell_matrix_3d.py +27 -0
  35. mat3ra/esse/models/materials_category/defects/by_host/two_dimensional/adatom/configuration.py +14 -14
  36. mat3ra/esse/models/materials_category/defects/by_host/two_dimensional/layered/configuration.py +14 -14
  37. mat3ra/esse/models/materials_category/defects/by_host/two_dimensional/point/configuration.py +14 -14
  38. mat3ra/esse/models/materials_category/defects/configuration.py +14 -14
  39. mat3ra/esse/models/materials_category/defects/one_dimensional/terrace/configuration.py +14 -14
  40. mat3ra/esse/models/materials_category/defects/{zero_dimensional/complex/pair.py → two_dimensional/grain_boundary_plane/configuration.py} +163 -497
  41. mat3ra/esse/models/materials_category/defects/two_dimensional/island/condition_json.py +28 -0
  42. mat3ra/esse/models/materials_category/defects/two_dimensional/island/configuration.py +163 -48
  43. mat3ra/esse/models/materials_category/defects/zero_dimensional/complex/pair/configuration.py +130 -130
  44. mat3ra/esse/models/materials_category/defects/zero_dimensional/point/configuration.py +14 -14
  45. mat3ra/esse/models/materials_category/defects/zero_dimensional/point/interstitial/configuration.py +14 -14
  46. mat3ra/esse/models/materials_category/defects/zero_dimensional/point/substitution/configuration.py +14 -14
  47. mat3ra/esse/models/materials_category/defects/zero_dimensional/point/vacancy/configuration.py +14 -14
  48. mat3ra/esse/models/materials_category/multi_material/interfaces/configuration.py +737 -0
  49. mat3ra/esse/models/materials_category/{defects/slab/configuration.py → pristine_structures/three_dimensional/ideal_crystal.py} +142 -24
  50. mat3ra/esse/models/materials_category/pristine_structures/two_dimensional/slab.py +730 -0
  51. mat3ra/esse/models/materials_category/single_material/two_dimensional/slab/configuration.py +17 -21
  52. mat3ra/esse/models/materials_category_components/entities/auxiliary/three_dimensional/__init__.py +3 -0
  53. mat3ra/esse/models/materials_category_components/entities/auxiliary/three_dimensional/supercell_matrix_3d.py +27 -0
  54. mat3ra/esse/models/materials_category_components/entities/auxiliary/two_dimensional/__init__.py +3 -0
  55. mat3ra/esse/models/materials_category_components/entities/auxiliary/two_dimensional/miller_indices.py +16 -0
  56. mat3ra/esse/models/materials_category_components/entities/auxiliary/two_dimensional/supercell_matrix_2d.py +25 -0
  57. mat3ra/esse/models/materials_category_components/entities/auxiliary/two_dimensional/termination.py +144 -0
  58. mat3ra/esse/models/materials_category_components/entities/auxiliary/zero_dimensional/__init__.py +3 -0
  59. mat3ra/esse/models/materials_category_components/entities/auxiliary/zero_dimensional/crystal_site.py +13 -0
  60. mat3ra/esse/models/materials_category_components/entities/core/three_dimensional/__init__.py +3 -0
  61. mat3ra/esse/models/{materials_category/defects/zero_dimensional/slab/configuration.py → materials_category_components/entities/core/three_dimensional/crystal.py} +142 -46
  62. mat3ra/esse/models/materials_category_components/entities/core/three_dimensional/void.py +32 -0
  63. mat3ra/esse/models/materials_category_components/entities/core/two_dimensional/__init__.py +3 -0
  64. mat3ra/esse/models/materials_category_components/entities/core/two_dimensional/vacuum.py +27 -0
  65. mat3ra/esse/models/materials_category_components/entities/core/zero_dimensional/__init__.py +3 -0
  66. mat3ra/esse/models/materials_category_components/entities/core/zero_dimensional/atom.py +134 -0
  67. mat3ra/esse/models/materials_category_components/entities/reusable/__init__.py +3 -0
  68. mat3ra/esse/models/materials_category_components/entities/reusable/repetitions.py +25 -0
  69. mat3ra/esse/models/materials_category_components/entities/reusable/three_dimensional/__init__.py +3 -0
  70. mat3ra/esse/models/materials_category_components/entities/reusable/three_dimensional/strained_non_uniform.py +544 -0
  71. mat3ra/esse/models/{materials_category/defects/zero_dimensional/adatom/base_configuration.py → materials_category_components/entities/reusable/three_dimensional/strained_uniform.py} +147 -24
  72. mat3ra/esse/models/{materials_category/defects/zero_dimensional/adatom/configuration.py → materials_category_components/entities/reusable/three_dimensional/supercell.py} +150 -26
  73. mat3ra/esse/models/materials_category_components/entities/reusable/two_dimensional/__init__.py +3 -0
  74. mat3ra/esse/models/materials_category_components/entities/reusable/two_dimensional/atomic_layers.py +683 -0
  75. mat3ra/esse/models/materials_category_components/entities/reusable/two_dimensional/atomic_layers_unique.py +683 -0
  76. mat3ra/esse/models/materials_category_components/entities/reusable/two_dimensional/atomic_layers_unique_repeated.py +687 -0
  77. mat3ra/esse/models/{materials_category/defects/by_host/two_dimensional/configuration.py → materials_category_components/entities/reusable/two_dimensional/crystal_lattice_planes.py} +23 -28
  78. mat3ra/esse/models/materials_category_components/entities/reusable/two_dimensional/slab_unit_cell.py +717 -0
  79. mat3ra/esse/models/materials_category_components/operations/core/combinations/__init__.py +3 -0
  80. mat3ra/esse/models/materials_category_components/operations/core/combinations/merge.py +583 -0
  81. mat3ra/esse/models/materials_category_components/operations/core/combinations/stack.py +555 -0
  82. mat3ra/esse/models/materials_category_components/operations/core/combinations/stack_component.py +554 -0
  83. mat3ra/esse/models/materials_category_components/operations/core/modifications/__init__.py +3 -0
  84. mat3ra/esse/models/materials_category_components/operations/core/modifications/repeat.py +27 -0
  85. mat3ra/esse/models/materials_category_components/operations/core/modifications/strain.py +19 -0
  86. mat3ra/esse/models/properties_directory/derived_properties.py +11 -11
  87. mat3ra/esse/models/properties_directory/non_scalar/average_potential_profile.py +2 -2
  88. mat3ra/esse/models/properties_directory/non_scalar/band_structure.py +2 -2
  89. mat3ra/esse/models/properties_directory/non_scalar/density_of_states.py +2 -2
  90. mat3ra/esse/models/properties_directory/non_scalar/phonon_dispersions.py +2 -2
  91. mat3ra/esse/models/properties_directory/non_scalar/phonon_dos.py +2 -2
  92. mat3ra/esse/models/properties_directory/non_scalar/total_energy_contributions.py +50 -50
  93. mat3ra/esse/models/properties_directory/non_scalar/vibrational_spectrum.py +2 -2
  94. mat3ra/esse/models/properties_directory/scalar/electron_affinity.py +2 -2
  95. mat3ra/esse/models/properties_directory/scalar/fermi_energy.py +2 -2
  96. mat3ra/esse/models/properties_directory/scalar/formation_energy.py +2 -2
  97. mat3ra/esse/models/properties_directory/scalar/ionization_potential.py +2 -2
  98. mat3ra/esse/models/properties_directory/scalar/reaction_energy_barrier.py +2 -2
  99. mat3ra/esse/models/properties_directory/scalar/surface_energy.py +2 -2
  100. mat3ra/esse/models/properties_directory/scalar/total_energy.py +2 -2
  101. mat3ra/esse/models/properties_directory/scalar/valence_band_offset.py +2 -2
  102. mat3ra/esse/models/properties_directory/scalar/zero_point_energy.py +2 -2
  103. mat3ra/esse/models/properties_directory/structural/basis/__init__.py +2 -2
  104. mat3ra/esse/models/properties_directory/structural/molecular_pattern.py +4 -4
  105. mat3ra/esse/models/properties_directory/workflow/convergence/ionic.py +2 -2
  106. {mat3ra_esse-2025.5.17.post1.dist-info → mat3ra_esse-2025.6.5.post0.dist-info}/METADATA +1 -1
  107. {mat3ra_esse-2025.5.17.post1.dist-info → mat3ra_esse-2025.6.5.post0.dist-info}/RECORD +117 -65
  108. {mat3ra_esse-2025.5.17.post1.dist-info → mat3ra_esse-2025.6.5.post0.dist-info}/WHEEL +1 -1
  109. mat3ra/esse/models/materials_category/defects/enums/atom_placement_method.py +0 -22
  110. mat3ra/esse/models/materials_category/defects/enums/complex_defect_type.py +0 -18
  111. mat3ra/esse/models/materials_category/defects/enums/coordinates_shape.py +0 -21
  112. mat3ra/esse/models/materials_category/defects/enums/slab_defect_type.py +0 -19
  113. mat3ra/esse/models/materials_category/defects/enums.py +0 -13
  114. mat3ra/esse/models/materials_category/defects/two_dimensional/slab_grain_boundary/configuration.py +0 -1105
  115. mat3ra/esse/models/materials_category/defects/zero_dimensional/defect_pair/configuration.py +0 -1026
  116. mat3ra/esse/models/materials_category/defects/zero_dimensional/point/base_configuration.py +0 -30
  117. /mat3ra/esse/models/{materials_category/defects/by_host/two_dimensional → material/reusable/coordinate_conditions}/__init__.py +0 -0
  118. /mat3ra/esse/models/{materials_category/defects/slab → material/reusable/stack}/__init__.py +0 -0
  119. /mat3ra/esse/models/{materials_category/defects/two_dimensional/slab_grain_boundary → material/reusable/supercell}/__init__.py +0 -0
  120. /mat3ra/esse/models/materials_category/defects/{zero_dimensional/adatom → two_dimensional/grain_boundary_plane}/__init__.py +0 -0
  121. /mat3ra/esse/models/materials_category/{defects/zero_dimensional/complex → multi_material/interfaces}/__init__.py +0 -0
  122. /mat3ra/esse/models/materials_category/{defects/zero_dimensional/defect_pair → pristine_structures/three_dimensional}/__init__.py +0 -0
  123. /mat3ra/esse/models/materials_category/{defects/zero_dimensional/slab → pristine_structures/two_dimensional}/__init__.py +0 -0
  124. {mat3ra_esse-2025.5.17.post1.dist-info → mat3ra_esse-2025.6.5.post0.dist-info}/licenses/LICENSE.md +0 -0
  125. {mat3ra_esse-2025.5.17.post1.dist-info → mat3ra_esse-2025.6.5.post0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,730 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: materials_category/pristine_structures/two_dimensional/slab.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import Any, Dict, List, Literal, Optional, Union
9
+
10
+ from pydantic import BaseModel, Field, RootModel, confloat, conint, constr
11
+
12
+
13
+ class SupercellMatrix2DSchemaItem(RootModel[List[int]]):
14
+ root: List[int]
15
+
16
+
17
+ class ChemicalElements(Enum):
18
+ H = "H"
19
+ He = "He"
20
+ Li = "Li"
21
+ Be = "Be"
22
+ B = "B"
23
+ C = "C"
24
+ N = "N"
25
+ O = "O"
26
+ F = "F"
27
+ Ne = "Ne"
28
+ Na = "Na"
29
+ Mg = "Mg"
30
+ Al = "Al"
31
+ Si = "Si"
32
+ P = "P"
33
+ S = "S"
34
+ Cl = "Cl"
35
+ Ar = "Ar"
36
+ K = "K"
37
+ Ca = "Ca"
38
+ Sc = "Sc"
39
+ Ti = "Ti"
40
+ V = "V"
41
+ Cr = "Cr"
42
+ Mn = "Mn"
43
+ Fe = "Fe"
44
+ Co = "Co"
45
+ Ni = "Ni"
46
+ Cu = "Cu"
47
+ Zn = "Zn"
48
+ Ga = "Ga"
49
+ Ge = "Ge"
50
+ As = "As"
51
+ Se = "Se"
52
+ Br = "Br"
53
+ Kr = "Kr"
54
+ Rb = "Rb"
55
+ Sr = "Sr"
56
+ Y = "Y"
57
+ Zr = "Zr"
58
+ Nb = "Nb"
59
+ Mo = "Mo"
60
+ Tc = "Tc"
61
+ Ru = "Ru"
62
+ Rh = "Rh"
63
+ Pd = "Pd"
64
+ Ag = "Ag"
65
+ Cd = "Cd"
66
+ In = "In"
67
+ Sn = "Sn"
68
+ Sb = "Sb"
69
+ Te = "Te"
70
+ I = "I"
71
+ Xe = "Xe"
72
+ Cs = "Cs"
73
+ Ba = "Ba"
74
+ La = "La"
75
+ Ce = "Ce"
76
+ Pr = "Pr"
77
+ Nd = "Nd"
78
+ Pm = "Pm"
79
+ Sm = "Sm"
80
+ Eu = "Eu"
81
+ Gd = "Gd"
82
+ Tb = "Tb"
83
+ Dy = "Dy"
84
+ Ho = "Ho"
85
+ Er = "Er"
86
+ Tm = "Tm"
87
+ Yb = "Yb"
88
+ Lu = "Lu"
89
+ Hf = "Hf"
90
+ Ta = "Ta"
91
+ W = "W"
92
+ Re = "Re"
93
+ Os = "Os"
94
+ Ir = "Ir"
95
+ Pt = "Pt"
96
+ Au = "Au"
97
+ Hg = "Hg"
98
+ Tl = "Tl"
99
+ Pb = "Pb"
100
+ Bi = "Bi"
101
+ Po = "Po"
102
+ At = "At"
103
+ Rn = "Rn"
104
+ Fr = "Fr"
105
+ Ra = "Ra"
106
+ Ac = "Ac"
107
+ Th = "Th"
108
+ Pa = "Pa"
109
+ U = "U"
110
+ Np = "Np"
111
+ Pu = "Pu"
112
+ Am = "Am"
113
+ Cm = "Cm"
114
+ Bk = "Bk"
115
+ Cf = "Cf"
116
+ Es = "Es"
117
+ Fm = "Fm"
118
+ Md = "Md"
119
+ No = "No"
120
+ Lr = "Lr"
121
+ Rf = "Rf"
122
+ Db = "Db"
123
+ Sg = "Sg"
124
+ Bh = "Bh"
125
+ Hs = "Hs"
126
+ Mt = "Mt"
127
+ Ds = "Ds"
128
+ Rg = "Rg"
129
+ Cn = "Cn"
130
+ Nh = "Nh"
131
+ Fl = "Fl"
132
+ Mc = "Mc"
133
+ Lv = "Lv"
134
+ Ts = "Ts"
135
+ Og = "Og"
136
+
137
+
138
+ class TerminationSchema(BaseModel):
139
+ chemical_elements: Union[ChemicalElements, constr(pattern=r"^[A-Z][a-z]?([A-Z][a-z]?)*$")] = Field(
140
+ ..., title="Chemical Elements"
141
+ )
142
+ """
143
+ Chemical elements at the termination. Can be a single element (e.g. 'Si') or a compound (e.g. 'SiO')
144
+ """
145
+ space_group_symmetry_label: str = Field(..., title="Space Group Symmetry Label")
146
+ """
147
+ Space group symmetry designation for the termination
148
+ """
149
+
150
+
151
+ class Value(Enum):
152
+ H = "H"
153
+ He = "He"
154
+ Li = "Li"
155
+ Be = "Be"
156
+ B = "B"
157
+ C = "C"
158
+ N = "N"
159
+ O = "O"
160
+ F = "F"
161
+ Ne = "Ne"
162
+ Na = "Na"
163
+ Mg = "Mg"
164
+ Al = "Al"
165
+ Si = "Si"
166
+ P = "P"
167
+ S = "S"
168
+ Cl = "Cl"
169
+ Ar = "Ar"
170
+ K = "K"
171
+ Ca = "Ca"
172
+ Sc = "Sc"
173
+ Ti = "Ti"
174
+ V = "V"
175
+ Cr = "Cr"
176
+ Mn = "Mn"
177
+ Fe = "Fe"
178
+ Co = "Co"
179
+ Ni = "Ni"
180
+ Cu = "Cu"
181
+ Zn = "Zn"
182
+ Ga = "Ga"
183
+ Ge = "Ge"
184
+ As = "As"
185
+ Se = "Se"
186
+ Br = "Br"
187
+ Kr = "Kr"
188
+ Rb = "Rb"
189
+ Sr = "Sr"
190
+ Y = "Y"
191
+ Zr = "Zr"
192
+ Nb = "Nb"
193
+ Mo = "Mo"
194
+ Tc = "Tc"
195
+ Ru = "Ru"
196
+ Rh = "Rh"
197
+ Pd = "Pd"
198
+ Ag = "Ag"
199
+ Cd = "Cd"
200
+ In = "In"
201
+ Sn = "Sn"
202
+ Sb = "Sb"
203
+ Te = "Te"
204
+ I = "I"
205
+ Xe = "Xe"
206
+ Cs = "Cs"
207
+ Ba = "Ba"
208
+ La = "La"
209
+ Ce = "Ce"
210
+ Pr = "Pr"
211
+ Nd = "Nd"
212
+ Pm = "Pm"
213
+ Sm = "Sm"
214
+ Eu = "Eu"
215
+ Gd = "Gd"
216
+ Tb = "Tb"
217
+ Dy = "Dy"
218
+ Ho = "Ho"
219
+ Er = "Er"
220
+ Tm = "Tm"
221
+ Yb = "Yb"
222
+ Lu = "Lu"
223
+ Hf = "Hf"
224
+ Ta = "Ta"
225
+ W = "W"
226
+ Re = "Re"
227
+ Os = "Os"
228
+ Ir = "Ir"
229
+ Pt = "Pt"
230
+ Au = "Au"
231
+ Hg = "Hg"
232
+ Tl = "Tl"
233
+ Pb = "Pb"
234
+ Bi = "Bi"
235
+ Po = "Po"
236
+ At = "At"
237
+ Rn = "Rn"
238
+ Fr = "Fr"
239
+ Ra = "Ra"
240
+ Ac = "Ac"
241
+ Th = "Th"
242
+ Pa = "Pa"
243
+ U = "U"
244
+ Np = "Np"
245
+ Pu = "Pu"
246
+ Am = "Am"
247
+ Cm = "Cm"
248
+ Bk = "Bk"
249
+ Cf = "Cf"
250
+ Es = "Es"
251
+ Fm = "Fm"
252
+ Md = "Md"
253
+ No = "No"
254
+ Lr = "Lr"
255
+ Rf = "Rf"
256
+ Db = "Db"
257
+ Sg = "Sg"
258
+ Bh = "Bh"
259
+ Hs = "Hs"
260
+ Mt = "Mt"
261
+ Ds = "Ds"
262
+ Rg = "Rg"
263
+ Cn = "Cn"
264
+ Nh = "Nh"
265
+ Fl = "Fl"
266
+ Mc = "Mc"
267
+ Lv = "Lv"
268
+ Ts = "Ts"
269
+ Og = "Og"
270
+
271
+
272
+ class Value31(Enum):
273
+ X = "X"
274
+ Vac = "Vac"
275
+
276
+
277
+ class AtomicElementSchema(BaseModel):
278
+ value: Union[Value, Value31]
279
+ """
280
+ All elements, including extra elements
281
+ """
282
+ id: int
283
+ """
284
+ integer id of this entry
285
+ """
286
+
287
+
288
+ class AtomicCoordinateSchema(BaseModel):
289
+ value: List[float] = Field(..., max_length=3, min_length=3, title="coordinate 3d schema")
290
+ """
291
+ value of this entry
292
+ """
293
+ id: int
294
+ """
295
+ integer id of this entry
296
+ """
297
+
298
+
299
+ class BasisUnitsEnum(Enum):
300
+ crystal = "crystal"
301
+ cartesian = "cartesian"
302
+
303
+
304
+ class AtomicLabelSchema(BaseModel):
305
+ value: Union[Union[int, str, float], conint(ge=1, le=9)]
306
+ """
307
+ value of this entry
308
+ """
309
+ id: int
310
+ """
311
+ integer id of this entry
312
+ """
313
+
314
+
315
+ class BasisSchema(BaseModel):
316
+ elements: List[AtomicElementSchema] = Field(..., title="atomic elements schema")
317
+ """
318
+ atomic elements schema
319
+ """
320
+ coordinates: List[AtomicCoordinateSchema] = Field(..., title="atomic coordinates schema")
321
+ """
322
+ atomic coordinates schema
323
+ """
324
+ units: Optional[BasisUnitsEnum] = Field("crystal", title="basis units enum")
325
+ labels: Optional[List[AtomicLabelSchema]] = Field(None, title="atomic labels schema")
326
+ """
327
+ atomic labels schema
328
+ """
329
+
330
+
331
+ class LatticeVectorsUnitsEnum(Enum):
332
+ angstrom = "angstrom"
333
+ bohr = "bohr"
334
+
335
+
336
+ class LatticeVectorsSchema(BaseModel):
337
+ a: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
338
+ b: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
339
+ c: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
340
+ alat: Optional[float] = 1
341
+ """
342
+ lattice parameter for fractional coordinates
343
+ """
344
+ units: Optional[LatticeVectorsUnitsEnum] = Field("angstrom", title="lattice vectors units enum")
345
+
346
+
347
+ class LatticeTypeEnum(Enum):
348
+ CUB = "CUB"
349
+ BCC = "BCC"
350
+ FCC = "FCC"
351
+ TET = "TET"
352
+ MCL = "MCL"
353
+ ORC = "ORC"
354
+ ORCC = "ORCC"
355
+ ORCF = "ORCF"
356
+ ORCI = "ORCI"
357
+ HEX = "HEX"
358
+ BCT = "BCT"
359
+ TRI = "TRI"
360
+ MCLC = "MCLC"
361
+ RHL = "RHL"
362
+
363
+
364
+ class LatticeUnitsLengthEnum(Enum):
365
+ angstrom = "angstrom"
366
+ bohr = "bohr"
367
+
368
+
369
+ class LatticeUnitsAngleEnum(Enum):
370
+ degree = "degree"
371
+ radian = "radian"
372
+
373
+
374
+ class LatticeUnitsSchema(BaseModel):
375
+ length: Optional[LatticeUnitsLengthEnum] = Field("angstrom", title="lattice units length enum")
376
+ angle: Optional[LatticeUnitsAngleEnum] = Field("degree", title="lattice units angle enum")
377
+
378
+
379
+ class LatticeSchema(BaseModel):
380
+ a: float
381
+ """
382
+ length of the first lattice vector
383
+ """
384
+ b: float
385
+ """
386
+ length of the second lattice vector
387
+ """
388
+ c: float
389
+ """
390
+ length of the third lattice vector
391
+ """
392
+ alpha: float
393
+ """
394
+ angle between first and second lattice vector
395
+ """
396
+ beta: float
397
+ """
398
+ angle between second and third lattice vector
399
+ """
400
+ gamma: float
401
+ """
402
+ angle between first and third lattice vector
403
+ """
404
+ vectors: Optional[LatticeVectorsSchema] = Field(None, title="lattice vectors schema")
405
+ type: Optional[LatticeTypeEnum] = Field("TRI", title="lattice type enum")
406
+ units: Optional[LatticeUnitsSchema] = Field(
407
+ default_factory=lambda: LatticeUnitsSchema.model_validate({"length": "angstrom", "angle": "degree"}),
408
+ title="Lattice units schema",
409
+ )
410
+
411
+
412
+ class Name(Enum):
413
+ volume = "volume"
414
+
415
+
416
+ class Units(Enum):
417
+ angstrom_3 = "angstrom^3"
418
+
419
+
420
+ class VolumeSchema(BaseModel):
421
+ name: Literal["0#-datamodel-code-generator-#-object-#-special-#"]
422
+ units: Optional[Units] = None
423
+ value: float
424
+
425
+
426
+ class Name125(Enum):
427
+ density = "density"
428
+
429
+
430
+ class Units69(Enum):
431
+ g_cm_3 = "g/cm^3"
432
+
433
+
434
+ class DensitySchema(BaseModel):
435
+ name: Literal["1#-datamodel-code-generator-#-object-#-special-#"]
436
+ units: Optional[Units69] = None
437
+ value: float
438
+
439
+
440
+ class Units70(Enum):
441
+ angstrom = "angstrom"
442
+
443
+
444
+ class ScalarSchema(BaseModel):
445
+ units: Optional[Units70] = None
446
+ value: float
447
+
448
+
449
+ class Name126(Enum):
450
+ symmetry = "symmetry"
451
+
452
+
453
+ class SymmetrySchema(BaseModel):
454
+ pointGroupSymbol: Optional[str] = None
455
+ """
456
+ point group symbol in Schoenflies notation
457
+ """
458
+ spaceGroupSymbol: Optional[str] = None
459
+ """
460
+ space group symbol in Hermann–Mauguin notation
461
+ """
462
+ tolerance: Optional[ScalarSchema] = Field(None, title="scalar schema")
463
+ """
464
+ tolerance used for symmetry calculation
465
+ """
466
+ name: Literal["2#-datamodel-code-generator-#-object-#-special-#"]
467
+
468
+
469
+ class Name127(Enum):
470
+ elemental_ratio = "elemental_ratio"
471
+
472
+
473
+ class ElementalRatio(BaseModel):
474
+ name: Literal["3#-datamodel-code-generator-#-object-#-special-#"]
475
+ value: confloat(ge=0.0, le=1.0)
476
+ element: Optional[str] = None
477
+ """
478
+ the element this ratio is for
479
+ """
480
+
481
+
482
+ class Name128(Enum):
483
+ p_norm = "p-norm"
484
+
485
+
486
+ class PNorm(BaseModel):
487
+ name: Literal["4#-datamodel-code-generator-#-object-#-special-#"]
488
+ degree: Optional[int] = None
489
+ """
490
+ degree of the dimensionality of the norm
491
+ """
492
+ value: float
493
+
494
+
495
+ class Name129(Enum):
496
+ inchi = "inchi"
497
+
498
+
499
+ class InChIRepresentationSchema(BaseModel):
500
+ name: Literal["5#-datamodel-code-generator-#-object-#-special-#"]
501
+ value: str
502
+
503
+
504
+ class Name130(Enum):
505
+ inchi_key = "inchi_key"
506
+
507
+
508
+ class InChIKeyRepresentationSchema(BaseModel):
509
+ name: Literal["6#-datamodel-code-generator-#-object-#-special-#"]
510
+ value: str
511
+
512
+
513
+ class DerivedPropertiesSchema(
514
+ RootModel[
515
+ Union[
516
+ VolumeSchema,
517
+ DensitySchema,
518
+ SymmetrySchema,
519
+ ElementalRatio,
520
+ PNorm,
521
+ InChIRepresentationSchema,
522
+ InChIKeyRepresentationSchema,
523
+ ]
524
+ ]
525
+ ):
526
+ root: Union[
527
+ VolumeSchema,
528
+ DensitySchema,
529
+ SymmetrySchema,
530
+ ElementalRatio,
531
+ PNorm,
532
+ InChIRepresentationSchema,
533
+ InChIKeyRepresentationSchema,
534
+ ] = Field(..., discriminator="name")
535
+
536
+
537
+ class DatabaseSourceSchema(BaseModel):
538
+ id: Union[str, float]
539
+ """
540
+ ID string for the materials uploaded from a third party source inside the third party source. For materialsproject.org an example ID is mp-32
541
+ """
542
+ source: str
543
+ """
544
+ Third party source name, e.g. materials project, 2dmatpedia, ICSD, etc.
545
+ """
546
+ origin: bool
547
+ """
548
+ Deprecated. To be removed. A flag that is true when material is initially imported from a third party * (as opposed to being independently designed from scratch).
549
+ """
550
+ data: Optional[Dict[str, Any]] = None
551
+ """
552
+ Original response from external source.
553
+ """
554
+ doi: Optional[str] = None
555
+ """
556
+ Digital Object Identifier, e.g. 10.1088/0953-8984/25/10/105506
557
+ """
558
+ url: Optional[str] = None
559
+ """
560
+ The URL of the original record, e.g. https://next-gen.materialsproject.org/materials/mp-48; ToDo: update to use URI type per https://json-schema.org/understanding-json-schema/reference/string#resource-identifiers
561
+ """
562
+
563
+
564
+ class FileSourceSchema(BaseModel):
565
+ extension: Optional[str] = None
566
+ """
567
+ file extension
568
+ """
569
+ filename: str
570
+ """
571
+ file name without extension
572
+ """
573
+ text: str
574
+ """
575
+ file content as raw text
576
+ """
577
+ hash: str
578
+ """
579
+ MD5 hash based on file content
580
+ """
581
+
582
+
583
+ class Name131(Enum):
584
+ default = "default"
585
+ atomsTooClose = "atomsTooClose"
586
+ atomsOverlap = "atomsOverlap"
587
+
588
+
589
+ class Severity(Enum):
590
+ info = "info"
591
+ warning = "warning"
592
+ error = "error"
593
+
594
+
595
+ class MaterialConsistencyCheckSchema(BaseModel):
596
+ name: Name131
597
+ """
598
+ Name of the consistency check that is performed, which is listed in an enum.
599
+ """
600
+ key: str
601
+ """
602
+ Key of the property of the entity on which the consistency check is performed in Mongo dot notation, e.g. 'basis.coordinates.1'
603
+ """
604
+ severity: Severity
605
+ """
606
+ Severity level of the problem, which is used in UI to differentiate.
607
+ """
608
+ message: str
609
+ """
610
+ Message generated by the consistency check describing the problem.
611
+ """
612
+
613
+
614
+ class CrystalSchema(BaseModel):
615
+ formula: Optional[str] = None
616
+ """
617
+ reduced chemical formula
618
+ """
619
+ unitCellFormula: Optional[str] = None
620
+ """
621
+ chemical formula based on the number of atoms of each element in the supercell
622
+ """
623
+ basis: BasisSchema = Field(..., title="basis schema")
624
+ lattice: LatticeSchema = Field(..., title="lattice schema")
625
+ derivedProperties: Optional[List[DerivedPropertiesSchema]] = Field(None, title="derived properties schema")
626
+ external: Optional[DatabaseSourceSchema] = Field(None, title="database source schema")
627
+ """
628
+ information about a database source
629
+ """
630
+ src: Optional[FileSourceSchema] = Field(None, title="file source schema")
631
+ """
632
+ file source with the information inside
633
+ """
634
+ scaledHash: Optional[str] = None
635
+ """
636
+ Hash string for a scaled structure with lattice vector a set to 1 (eg. for materials under pressure).
637
+ """
638
+ icsdId: Optional[int] = None
639
+ """
640
+ Corresponding ICSD id of the material
641
+ """
642
+ isNonPeriodic: Optional[bool] = None
643
+ """
644
+ Whether to work in the finite molecular picture (usually with atomic orbital basis)
645
+ """
646
+ consistencyChecks: Optional[List[MaterialConsistencyCheckSchema]] = None
647
+ field_id: Optional[str] = Field(None, alias="_id")
648
+ """
649
+ entity identity
650
+ """
651
+ slug: Optional[str] = None
652
+ """
653
+ entity slug
654
+ """
655
+ systemName: Optional[str] = None
656
+ schemaVersion: Optional[str] = "2022.8.16"
657
+ """
658
+ entity's schema version. Used to distinct between different schemas.
659
+ """
660
+ name: Optional[str] = None
661
+ """
662
+ entity name
663
+ """
664
+ isDefault: Optional[bool] = False
665
+ """
666
+ Identifies that entity is defaultable
667
+ """
668
+ metadata: Optional[Dict[str, Any]] = None
669
+
670
+
671
+ class AtomicLayersUniqueRepeatedSchema(BaseModel):
672
+ termination_top: TerminationSchema = Field(..., title="Termination Schema")
673
+ """
674
+ Defines a specific termination of a slab
675
+ """
676
+ number_of_repetitions: conint(ge=1)
677
+ """
678
+ Number of repetitions of the unique atomic layers
679
+ """
680
+ crystal: CrystalSchema = Field(..., title="Crystal Schema")
681
+ """
682
+ A crystal structure, referencing the base material schema
683
+ """
684
+ miller_indices: Optional[List[int]] = Field([0, 0, 1], max_length=3, min_length=3, title="Miller Indices Schema")
685
+ """
686
+ Miller indices [h, k, l] defining crystallographic planes
687
+ """
688
+ use_conventional_cell: Optional[bool] = True
689
+ """
690
+ Use the conventional cell for the crystal structure
691
+ """
692
+
693
+
694
+ class AxisEnum(Enum):
695
+ x = "x"
696
+ y = "y"
697
+ z = "z"
698
+
699
+
700
+ class VacuumConfigurationSchema(BaseModel):
701
+ direction: AxisEnum = Field(..., title="Axis Enum")
702
+ """
703
+ Enum for axis types
704
+ """
705
+ size: Optional[confloat(ge=0.0)] = 10
706
+ """
707
+ Size of the vacuum slab in angstroms
708
+ """
709
+
710
+
711
+ class SlabConfigurationSchema(BaseModel):
712
+ xy_supercell_matrix: Optional[List[SupercellMatrix2DSchemaItem]] = Field(
713
+ default_factory=lambda: [SupercellMatrix2DSchemaItem.model_validate(v) for v in [[1, 0], [0, 1]]],
714
+ max_length=2,
715
+ min_length=2,
716
+ title="Supercell Matrix 2D Schema",
717
+ )
718
+ """
719
+ Supercell matrix for xy plane transformations
720
+ """
721
+ stack_components: List[Union[AtomicLayersUniqueRepeatedSchema, VacuumConfigurationSchema]] = Field(
722
+ ..., min_length=2
723
+ )
724
+ """
725
+ Components of the slab unit cell: repeated unique atomic layers and vacuum
726
+ """
727
+ direction: AxisEnum = Field(..., title="Axis Enum")
728
+ """
729
+ Enum for axis types
730
+ """