mat3ra-esse 2025.5.17.post2__py3-none-any.whl → 2025.6.14.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 (78) 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/core/primitive/array_of_3_integers.py +13 -0
  6. mat3ra/esse/models/core/reusable/coordinate_conditions/__init__.py +29 -1
  7. mat3ra/esse/models/core/reusable/energy.py +2 -2
  8. mat3ra/esse/models/element.py +6 -6
  9. mat3ra/esse/models/material/__init__.py +14 -14
  10. mat3ra/esse/models/material/builders/single_material/two_dimensional/slab/selector_parameters.py +1 -1
  11. mat3ra/esse/models/material/reusable/slab/termination.py +1 -1
  12. mat3ra/esse/models/material/reusable/slab_configuration_with_termination.py +1 -1
  13. mat3ra/esse/models/material/reusable/stack/slab_in_stack.py +1 -1
  14. mat3ra/esse/models/materials_category/defects/two_dimensional/grain_boundary_plane/configuration.py +2 -2
  15. mat3ra/esse/models/materials_category/multi_material/interfaces/configuration.py +1 -1
  16. mat3ra/esse/models/materials_category/pristine_structures/three_dimensional/__init__.py +3 -0
  17. mat3ra/esse/models/materials_category/pristine_structures/three_dimensional/ideal_crystal.py +530 -0
  18. mat3ra/esse/models/materials_category/pristine_structures/two_dimensional/__init__.py +3 -0
  19. mat3ra/esse/models/materials_category/pristine_structures/two_dimensional/slab.py +1143 -0
  20. mat3ra/esse/models/materials_category_components/entities/auxiliary/three_dimensional/__init__.py +3 -0
  21. mat3ra/esse/models/materials_category_components/entities/auxiliary/three_dimensional/supercell_matrix_3d.py +27 -0
  22. mat3ra/esse/models/materials_category_components/entities/auxiliary/two_dimensional/__init__.py +3 -0
  23. mat3ra/esse/models/materials_category_components/entities/auxiliary/two_dimensional/miller_indices.py +16 -0
  24. mat3ra/esse/models/materials_category_components/entities/auxiliary/two_dimensional/supercell_matrix_2d.py +25 -0
  25. mat3ra/esse/models/materials_category_components/entities/auxiliary/two_dimensional/termination.py +144 -0
  26. mat3ra/esse/models/materials_category_components/entities/auxiliary/zero_dimensional/__init__.py +3 -0
  27. mat3ra/esse/models/materials_category_components/entities/auxiliary/zero_dimensional/crystal_site.py +13 -0
  28. mat3ra/esse/models/materials_category_components/entities/core/three_dimensional/__init__.py +3 -0
  29. mat3ra/esse/models/materials_category_components/entities/core/three_dimensional/crystal.py +530 -0
  30. mat3ra/esse/models/materials_category_components/entities/core/three_dimensional/void.py +32 -0
  31. mat3ra/esse/models/materials_category_components/entities/core/two_dimensional/__init__.py +3 -0
  32. mat3ra/esse/models/materials_category_components/entities/core/two_dimensional/vacuum.py +551 -0
  33. mat3ra/esse/models/materials_category_components/entities/core/zero_dimensional/__init__.py +3 -0
  34. mat3ra/esse/models/materials_category_components/entities/core/zero_dimensional/atom.py +134 -0
  35. mat3ra/esse/models/materials_category_components/entities/reusable/__init__.py +3 -0
  36. mat3ra/esse/models/materials_category_components/entities/reusable/repetitions.py +25 -0
  37. mat3ra/esse/models/materials_category_components/entities/reusable/three_dimensional/__init__.py +3 -0
  38. mat3ra/esse/models/materials_category_components/entities/reusable/three_dimensional/strained_non_uniform.py +544 -0
  39. mat3ra/esse/models/materials_category_components/entities/reusable/three_dimensional/strained_uniform.py +541 -0
  40. mat3ra/esse/models/materials_category_components/entities/reusable/three_dimensional/supercell.py +542 -0
  41. mat3ra/esse/models/materials_category_components/entities/reusable/two_dimensional/__init__.py +3 -0
  42. mat3ra/esse/models/materials_category_components/entities/reusable/two_dimensional/atomic_layers.py +683 -0
  43. mat3ra/esse/models/materials_category_components/entities/reusable/two_dimensional/atomic_layers_unique.py +683 -0
  44. mat3ra/esse/models/materials_category_components/entities/reusable/two_dimensional/atomic_layers_unique_repeated.py +687 -0
  45. mat3ra/esse/models/materials_category_components/entities/reusable/two_dimensional/crystal_lattice_planes.py +545 -0
  46. mat3ra/esse/models/materials_category_components/entities/reusable/two_dimensional/slab_unit_cell.py +1130 -0
  47. mat3ra/esse/models/materials_category_components/operations/core/combinations/__init__.py +3 -0
  48. mat3ra/esse/models/materials_category_components/operations/core/combinations/merge.py +996 -0
  49. mat3ra/esse/models/materials_category_components/operations/core/combinations/stack.py +968 -0
  50. mat3ra/esse/models/materials_category_components/operations/core/combinations/stack_component.py +967 -0
  51. mat3ra/esse/models/materials_category_components/operations/core/modifications/__init__.py +3 -0
  52. mat3ra/esse/models/materials_category_components/operations/core/modifications/repeat.py +27 -0
  53. mat3ra/esse/models/materials_category_components/operations/core/modifications/strain.py +19 -0
  54. mat3ra/esse/models/properties_directory/derived_properties.py +11 -11
  55. mat3ra/esse/models/properties_directory/non_scalar/average_potential_profile.py +2 -2
  56. mat3ra/esse/models/properties_directory/non_scalar/band_structure.py +2 -2
  57. mat3ra/esse/models/properties_directory/non_scalar/density_of_states.py +2 -2
  58. mat3ra/esse/models/properties_directory/non_scalar/phonon_dispersions.py +2 -2
  59. mat3ra/esse/models/properties_directory/non_scalar/phonon_dos.py +2 -2
  60. mat3ra/esse/models/properties_directory/non_scalar/total_energy_contributions.py +50 -50
  61. mat3ra/esse/models/properties_directory/non_scalar/vibrational_spectrum.py +2 -2
  62. mat3ra/esse/models/properties_directory/scalar/electron_affinity.py +2 -2
  63. mat3ra/esse/models/properties_directory/scalar/fermi_energy.py +2 -2
  64. mat3ra/esse/models/properties_directory/scalar/formation_energy.py +2 -2
  65. mat3ra/esse/models/properties_directory/scalar/ionization_potential.py +2 -2
  66. mat3ra/esse/models/properties_directory/scalar/reaction_energy_barrier.py +2 -2
  67. mat3ra/esse/models/properties_directory/scalar/surface_energy.py +2 -2
  68. mat3ra/esse/models/properties_directory/scalar/total_energy.py +2 -2
  69. mat3ra/esse/models/properties_directory/scalar/valence_band_offset.py +2 -2
  70. mat3ra/esse/models/properties_directory/scalar/zero_point_energy.py +2 -2
  71. mat3ra/esse/models/properties_directory/structural/basis/__init__.py +2 -2
  72. mat3ra/esse/models/properties_directory/structural/molecular_pattern.py +4 -4
  73. mat3ra/esse/models/properties_directory/workflow/convergence/ionic.py +2 -2
  74. {mat3ra_esse-2025.5.17.post2.dist-info → mat3ra_esse-2025.6.14.post0.dist-info}/METADATA +1 -1
  75. {mat3ra_esse-2025.5.17.post2.dist-info → mat3ra_esse-2025.6.14.post0.dist-info}/RECORD +78 -39
  76. {mat3ra_esse-2025.5.17.post2.dist-info → mat3ra_esse-2025.6.14.post0.dist-info}/WHEEL +1 -1
  77. {mat3ra_esse-2025.5.17.post2.dist-info → mat3ra_esse-2025.6.14.post0.dist-info}/licenses/LICENSE.md +0 -0
  78. {mat3ra_esse-2025.5.17.post2.dist-info → mat3ra_esse-2025.6.14.post0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1143 @@
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]?[0-9]*)+$")] = 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 Value33(Enum):
273
+ X = "X"
274
+ Vac = "Vac"
275
+
276
+
277
+ class AtomicElementSchema(BaseModel):
278
+ value: Union[Value, Value33]
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 Name133(Enum):
427
+ density = "density"
428
+
429
+
430
+ class Units72(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[Units72] = None
437
+ value: float
438
+
439
+
440
+ class Units73(Enum):
441
+ angstrom = "angstrom"
442
+
443
+
444
+ class ScalarSchema(BaseModel):
445
+ units: Optional[Units73] = None
446
+ value: float
447
+
448
+
449
+ class Name134(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 Name135(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 Name136(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 Name137(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 Name138(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 Name139(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: Name139
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 Value34(Enum):
701
+ H = "H"
702
+ He = "He"
703
+ Li = "Li"
704
+ Be = "Be"
705
+ B = "B"
706
+ C = "C"
707
+ N = "N"
708
+ O = "O"
709
+ F = "F"
710
+ Ne = "Ne"
711
+ Na = "Na"
712
+ Mg = "Mg"
713
+ Al = "Al"
714
+ Si = "Si"
715
+ P = "P"
716
+ S = "S"
717
+ Cl = "Cl"
718
+ Ar = "Ar"
719
+ K = "K"
720
+ Ca = "Ca"
721
+ Sc = "Sc"
722
+ Ti = "Ti"
723
+ V = "V"
724
+ Cr = "Cr"
725
+ Mn = "Mn"
726
+ Fe = "Fe"
727
+ Co = "Co"
728
+ Ni = "Ni"
729
+ Cu = "Cu"
730
+ Zn = "Zn"
731
+ Ga = "Ga"
732
+ Ge = "Ge"
733
+ As = "As"
734
+ Se = "Se"
735
+ Br = "Br"
736
+ Kr = "Kr"
737
+ Rb = "Rb"
738
+ Sr = "Sr"
739
+ Y = "Y"
740
+ Zr = "Zr"
741
+ Nb = "Nb"
742
+ Mo = "Mo"
743
+ Tc = "Tc"
744
+ Ru = "Ru"
745
+ Rh = "Rh"
746
+ Pd = "Pd"
747
+ Ag = "Ag"
748
+ Cd = "Cd"
749
+ In = "In"
750
+ Sn = "Sn"
751
+ Sb = "Sb"
752
+ Te = "Te"
753
+ I = "I"
754
+ Xe = "Xe"
755
+ Cs = "Cs"
756
+ Ba = "Ba"
757
+ La = "La"
758
+ Ce = "Ce"
759
+ Pr = "Pr"
760
+ Nd = "Nd"
761
+ Pm = "Pm"
762
+ Sm = "Sm"
763
+ Eu = "Eu"
764
+ Gd = "Gd"
765
+ Tb = "Tb"
766
+ Dy = "Dy"
767
+ Ho = "Ho"
768
+ Er = "Er"
769
+ Tm = "Tm"
770
+ Yb = "Yb"
771
+ Lu = "Lu"
772
+ Hf = "Hf"
773
+ Ta = "Ta"
774
+ W = "W"
775
+ Re = "Re"
776
+ Os = "Os"
777
+ Ir = "Ir"
778
+ Pt = "Pt"
779
+ Au = "Au"
780
+ Hg = "Hg"
781
+ Tl = "Tl"
782
+ Pb = "Pb"
783
+ Bi = "Bi"
784
+ Po = "Po"
785
+ At = "At"
786
+ Rn = "Rn"
787
+ Fr = "Fr"
788
+ Ra = "Ra"
789
+ Ac = "Ac"
790
+ Th = "Th"
791
+ Pa = "Pa"
792
+ U = "U"
793
+ Np = "Np"
794
+ Pu = "Pu"
795
+ Am = "Am"
796
+ Cm = "Cm"
797
+ Bk = "Bk"
798
+ Cf = "Cf"
799
+ Es = "Es"
800
+ Fm = "Fm"
801
+ Md = "Md"
802
+ No = "No"
803
+ Lr = "Lr"
804
+ Rf = "Rf"
805
+ Db = "Db"
806
+ Sg = "Sg"
807
+ Bh = "Bh"
808
+ Hs = "Hs"
809
+ Mt = "Mt"
810
+ Ds = "Ds"
811
+ Rg = "Rg"
812
+ Cn = "Cn"
813
+ Nh = "Nh"
814
+ Fl = "Fl"
815
+ Mc = "Mc"
816
+ Lv = "Lv"
817
+ Ts = "Ts"
818
+ Og = "Og"
819
+
820
+
821
+ class Value35(Enum):
822
+ X = "X"
823
+ Vac = "Vac"
824
+
825
+
826
+ class AtomicElementSchema13(BaseModel):
827
+ value: Union[Value34, Value35]
828
+ """
829
+ All elements, including extra elements
830
+ """
831
+ id: int
832
+ """
833
+ integer id of this entry
834
+ """
835
+
836
+
837
+ class BasisSchema11(BaseModel):
838
+ elements: List[AtomicElementSchema13] = Field(..., title="atomic elements schema")
839
+ """
840
+ atomic elements schema
841
+ """
842
+ coordinates: List[AtomicCoordinateSchema] = Field(..., title="atomic coordinates schema")
843
+ """
844
+ atomic coordinates schema
845
+ """
846
+ units: Optional[BasisUnitsEnum] = Field("crystal", title="basis units enum")
847
+ labels: Optional[List[AtomicLabelSchema]] = Field(None, title="atomic labels schema")
848
+ """
849
+ atomic labels schema
850
+ """
851
+
852
+
853
+ class LatticeVectorsSchema11(BaseModel):
854
+ a: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
855
+ b: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
856
+ c: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
857
+ alat: Optional[float] = 1
858
+ """
859
+ lattice parameter for fractional coordinates
860
+ """
861
+ units: Optional[LatticeVectorsUnitsEnum] = Field("angstrom", title="lattice vectors units enum")
862
+
863
+
864
+ class LatticeUnitsSchema12(BaseModel):
865
+ length: Optional[LatticeUnitsLengthEnum] = Field("angstrom", title="lattice units length enum")
866
+ angle: Optional[LatticeUnitsAngleEnum] = Field("degree", title="lattice units angle enum")
867
+
868
+
869
+ class LatticeSchema11(BaseModel):
870
+ a: float
871
+ """
872
+ length of the first lattice vector
873
+ """
874
+ b: float
875
+ """
876
+ length of the second lattice vector
877
+ """
878
+ c: float
879
+ """
880
+ length of the third lattice vector
881
+ """
882
+ alpha: float
883
+ """
884
+ angle between first and second lattice vector
885
+ """
886
+ beta: float
887
+ """
888
+ angle between second and third lattice vector
889
+ """
890
+ gamma: float
891
+ """
892
+ angle between first and third lattice vector
893
+ """
894
+ vectors: Optional[LatticeVectorsSchema11] = Field(None, title="lattice vectors schema")
895
+ type: Optional[LatticeTypeEnum] = Field("TRI", title="lattice type enum")
896
+ units: Optional[LatticeUnitsSchema12] = Field(
897
+ default_factory=lambda: LatticeUnitsSchema12.model_validate({"length": "angstrom", "angle": "degree"}),
898
+ title="Lattice units schema",
899
+ )
900
+
901
+
902
+ class Name140(Enum):
903
+ volume = "volume"
904
+
905
+
906
+ class Units74(Enum):
907
+ angstrom_3 = "angstrom^3"
908
+
909
+
910
+ class VolumeSchema11(BaseModel):
911
+ name: Literal["0#-datamodel-code-generator-#-object-#-special-#"]
912
+ units: Optional[Units74] = None
913
+ value: float
914
+
915
+
916
+ class Name141(Enum):
917
+ density = "density"
918
+
919
+
920
+ class Units75(Enum):
921
+ g_cm_3 = "g/cm^3"
922
+
923
+
924
+ class DensitySchema12(BaseModel):
925
+ name: Literal["1#-datamodel-code-generator-#-object-#-special-#"]
926
+ units: Optional[Units75] = None
927
+ value: float
928
+
929
+
930
+ class Units76(Enum):
931
+ angstrom = "angstrom"
932
+
933
+
934
+ class ScalarSchema13(BaseModel):
935
+ units: Optional[Units76] = None
936
+ value: float
937
+
938
+
939
+ class Name142(Enum):
940
+ symmetry = "symmetry"
941
+
942
+
943
+ class SymmetrySchema11(BaseModel):
944
+ pointGroupSymbol: Optional[str] = None
945
+ """
946
+ point group symbol in Schoenflies notation
947
+ """
948
+ spaceGroupSymbol: Optional[str] = None
949
+ """
950
+ space group symbol in Hermann–Mauguin notation
951
+ """
952
+ tolerance: Optional[ScalarSchema13] = Field(None, title="scalar schema")
953
+ """
954
+ tolerance used for symmetry calculation
955
+ """
956
+ name: Literal["2#-datamodel-code-generator-#-object-#-special-#"]
957
+
958
+
959
+ class Name143(Enum):
960
+ elemental_ratio = "elemental_ratio"
961
+
962
+
963
+ class ElementalRatio12(BaseModel):
964
+ name: Literal["3#-datamodel-code-generator-#-object-#-special-#"]
965
+ value: confloat(ge=0.0, le=1.0)
966
+ element: Optional[str] = None
967
+ """
968
+ the element this ratio is for
969
+ """
970
+
971
+
972
+ class Name144(Enum):
973
+ p_norm = "p-norm"
974
+
975
+
976
+ class PNorm12(BaseModel):
977
+ name: Literal["4#-datamodel-code-generator-#-object-#-special-#"]
978
+ degree: Optional[int] = None
979
+ """
980
+ degree of the dimensionality of the norm
981
+ """
982
+ value: float
983
+
984
+
985
+ class Name145(Enum):
986
+ inchi = "inchi"
987
+
988
+
989
+ class InChIRepresentationSchema12(BaseModel):
990
+ name: Literal["5#-datamodel-code-generator-#-object-#-special-#"]
991
+ value: str
992
+
993
+
994
+ class Name146(Enum):
995
+ inchi_key = "inchi_key"
996
+
997
+
998
+ class InChIKeyRepresentationSchema12(BaseModel):
999
+ name: Literal["6#-datamodel-code-generator-#-object-#-special-#"]
1000
+ value: str
1001
+
1002
+
1003
+ class DerivedPropertiesSchema12(
1004
+ RootModel[
1005
+ Union[
1006
+ VolumeSchema11,
1007
+ DensitySchema12,
1008
+ SymmetrySchema11,
1009
+ ElementalRatio12,
1010
+ PNorm12,
1011
+ InChIRepresentationSchema12,
1012
+ InChIKeyRepresentationSchema12,
1013
+ ]
1014
+ ]
1015
+ ):
1016
+ root: Union[
1017
+ VolumeSchema11,
1018
+ DensitySchema12,
1019
+ SymmetrySchema11,
1020
+ ElementalRatio12,
1021
+ PNorm12,
1022
+ InChIRepresentationSchema12,
1023
+ InChIKeyRepresentationSchema12,
1024
+ ] = Field(..., discriminator="name")
1025
+
1026
+
1027
+ class Name147(Enum):
1028
+ default = "default"
1029
+ atomsTooClose = "atomsTooClose"
1030
+ atomsOverlap = "atomsOverlap"
1031
+
1032
+
1033
+ class MaterialConsistencyCheckSchema11(BaseModel):
1034
+ name: Name147
1035
+ """
1036
+ Name of the consistency check that is performed, which is listed in an enum.
1037
+ """
1038
+ key: str
1039
+ """
1040
+ Key of the property of the entity on which the consistency check is performed in Mongo dot notation, e.g. 'basis.coordinates.1'
1041
+ """
1042
+ severity: Severity
1043
+ """
1044
+ Severity level of the problem, which is used in UI to differentiate.
1045
+ """
1046
+ message: str
1047
+ """
1048
+ Message generated by the consistency check describing the problem.
1049
+ """
1050
+
1051
+
1052
+ class CrystalSchema8(BaseModel):
1053
+ formula: Optional[str] = None
1054
+ """
1055
+ reduced chemical formula
1056
+ """
1057
+ unitCellFormula: Optional[str] = None
1058
+ """
1059
+ chemical formula based on the number of atoms of each element in the supercell
1060
+ """
1061
+ basis: BasisSchema11 = Field(..., title="basis schema")
1062
+ lattice: LatticeSchema11 = Field(..., title="lattice schema")
1063
+ derivedProperties: Optional[List[DerivedPropertiesSchema12]] = Field(None, title="derived properties schema")
1064
+ external: Optional[DatabaseSourceSchema] = Field(None, title="database source schema")
1065
+ """
1066
+ information about a database source
1067
+ """
1068
+ src: Optional[FileSourceSchema] = Field(None, title="file source schema")
1069
+ """
1070
+ file source with the information inside
1071
+ """
1072
+ scaledHash: Optional[str] = None
1073
+ """
1074
+ Hash string for a scaled structure with lattice vector a set to 1 (eg. for materials under pressure).
1075
+ """
1076
+ icsdId: Optional[int] = None
1077
+ """
1078
+ Corresponding ICSD id of the material
1079
+ """
1080
+ isNonPeriodic: Optional[bool] = None
1081
+ """
1082
+ Whether to work in the finite molecular picture (usually with atomic orbital basis)
1083
+ """
1084
+ consistencyChecks: Optional[List[MaterialConsistencyCheckSchema11]] = None
1085
+ field_id: Optional[str] = Field(None, alias="_id")
1086
+ """
1087
+ entity identity
1088
+ """
1089
+ slug: Optional[str] = None
1090
+ """
1091
+ entity slug
1092
+ """
1093
+ systemName: Optional[str] = None
1094
+ schemaVersion: Optional[str] = "2022.8.16"
1095
+ """
1096
+ entity's schema version. Used to distinct between different schemas.
1097
+ """
1098
+ name: Optional[str] = None
1099
+ """
1100
+ entity name
1101
+ """
1102
+ isDefault: Optional[bool] = False
1103
+ """
1104
+ Identifies that entity is defaultable
1105
+ """
1106
+ metadata: Optional[Dict[str, Any]] = None
1107
+
1108
+
1109
+ class VacuumConfigurationSchema(BaseModel):
1110
+ direction: AxisEnum = Field(..., title="Axis Enum")
1111
+ """
1112
+ Enum for axis types
1113
+ """
1114
+ size: Optional[confloat(ge=0.0)] = 10
1115
+ """
1116
+ Size of the vacuum slab in angstroms
1117
+ """
1118
+ crystal: CrystalSchema8 = Field(..., title="Crystal Schema")
1119
+ """
1120
+ A crystal structure, referencing the base material schema
1121
+ """
1122
+
1123
+
1124
+ class SlabConfigurationSchema(BaseModel):
1125
+ xy_supercell_matrix: Optional[List[SupercellMatrix2DSchemaItem]] = Field(
1126
+ default_factory=lambda: [SupercellMatrix2DSchemaItem.model_validate(v) for v in [[1, 0], [0, 1]]],
1127
+ max_length=2,
1128
+ min_length=2,
1129
+ title="Supercell Matrix 2D Schema",
1130
+ )
1131
+ """
1132
+ Supercell matrix for xy plane transformations
1133
+ """
1134
+ stack_components: List[Union[AtomicLayersUniqueRepeatedSchema, VacuumConfigurationSchema]] = Field(
1135
+ ..., min_length=2
1136
+ )
1137
+ """
1138
+ Components of the slab unit cell: repeated unique atomic layers and vacuum
1139
+ """
1140
+ direction: AxisEnum = Field(..., title="Axis Enum")
1141
+ """
1142
+ Enum for axis types
1143
+ """