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,683 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: materials_category_components/entities/reusable/two_dimensional/atomic_layers.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 ChemicalElements(Enum):
14
+ H = "H"
15
+ He = "He"
16
+ Li = "Li"
17
+ Be = "Be"
18
+ B = "B"
19
+ C = "C"
20
+ N = "N"
21
+ O = "O"
22
+ F = "F"
23
+ Ne = "Ne"
24
+ Na = "Na"
25
+ Mg = "Mg"
26
+ Al = "Al"
27
+ Si = "Si"
28
+ P = "P"
29
+ S = "S"
30
+ Cl = "Cl"
31
+ Ar = "Ar"
32
+ K = "K"
33
+ Ca = "Ca"
34
+ Sc = "Sc"
35
+ Ti = "Ti"
36
+ V = "V"
37
+ Cr = "Cr"
38
+ Mn = "Mn"
39
+ Fe = "Fe"
40
+ Co = "Co"
41
+ Ni = "Ni"
42
+ Cu = "Cu"
43
+ Zn = "Zn"
44
+ Ga = "Ga"
45
+ Ge = "Ge"
46
+ As = "As"
47
+ Se = "Se"
48
+ Br = "Br"
49
+ Kr = "Kr"
50
+ Rb = "Rb"
51
+ Sr = "Sr"
52
+ Y = "Y"
53
+ Zr = "Zr"
54
+ Nb = "Nb"
55
+ Mo = "Mo"
56
+ Tc = "Tc"
57
+ Ru = "Ru"
58
+ Rh = "Rh"
59
+ Pd = "Pd"
60
+ Ag = "Ag"
61
+ Cd = "Cd"
62
+ In = "In"
63
+ Sn = "Sn"
64
+ Sb = "Sb"
65
+ Te = "Te"
66
+ I = "I"
67
+ Xe = "Xe"
68
+ Cs = "Cs"
69
+ Ba = "Ba"
70
+ La = "La"
71
+ Ce = "Ce"
72
+ Pr = "Pr"
73
+ Nd = "Nd"
74
+ Pm = "Pm"
75
+ Sm = "Sm"
76
+ Eu = "Eu"
77
+ Gd = "Gd"
78
+ Tb = "Tb"
79
+ Dy = "Dy"
80
+ Ho = "Ho"
81
+ Er = "Er"
82
+ Tm = "Tm"
83
+ Yb = "Yb"
84
+ Lu = "Lu"
85
+ Hf = "Hf"
86
+ Ta = "Ta"
87
+ W = "W"
88
+ Re = "Re"
89
+ Os = "Os"
90
+ Ir = "Ir"
91
+ Pt = "Pt"
92
+ Au = "Au"
93
+ Hg = "Hg"
94
+ Tl = "Tl"
95
+ Pb = "Pb"
96
+ Bi = "Bi"
97
+ Po = "Po"
98
+ At = "At"
99
+ Rn = "Rn"
100
+ Fr = "Fr"
101
+ Ra = "Ra"
102
+ Ac = "Ac"
103
+ Th = "Th"
104
+ Pa = "Pa"
105
+ U = "U"
106
+ Np = "Np"
107
+ Pu = "Pu"
108
+ Am = "Am"
109
+ Cm = "Cm"
110
+ Bk = "Bk"
111
+ Cf = "Cf"
112
+ Es = "Es"
113
+ Fm = "Fm"
114
+ Md = "Md"
115
+ No = "No"
116
+ Lr = "Lr"
117
+ Rf = "Rf"
118
+ Db = "Db"
119
+ Sg = "Sg"
120
+ Bh = "Bh"
121
+ Hs = "Hs"
122
+ Mt = "Mt"
123
+ Ds = "Ds"
124
+ Rg = "Rg"
125
+ Cn = "Cn"
126
+ Nh = "Nh"
127
+ Fl = "Fl"
128
+ Mc = "Mc"
129
+ Lv = "Lv"
130
+ Ts = "Ts"
131
+ Og = "Og"
132
+
133
+
134
+ class TerminationSchema(BaseModel):
135
+ chemical_elements: Union[ChemicalElements, constr(pattern=r"^[A-Z][a-z]?([A-Z][a-z]?)*$")] = Field(
136
+ ..., title="Chemical Elements"
137
+ )
138
+ """
139
+ Chemical elements at the termination. Can be a single element (e.g. 'Si') or a compound (e.g. 'SiO')
140
+ """
141
+ space_group_symmetry_label: str = Field(..., title="Space Group Symmetry Label")
142
+ """
143
+ Space group symmetry designation for the termination
144
+ """
145
+
146
+
147
+ class Value(Enum):
148
+ H = "H"
149
+ He = "He"
150
+ Li = "Li"
151
+ Be = "Be"
152
+ B = "B"
153
+ C = "C"
154
+ N = "N"
155
+ O = "O"
156
+ F = "F"
157
+ Ne = "Ne"
158
+ Na = "Na"
159
+ Mg = "Mg"
160
+ Al = "Al"
161
+ Si = "Si"
162
+ P = "P"
163
+ S = "S"
164
+ Cl = "Cl"
165
+ Ar = "Ar"
166
+ K = "K"
167
+ Ca = "Ca"
168
+ Sc = "Sc"
169
+ Ti = "Ti"
170
+ V = "V"
171
+ Cr = "Cr"
172
+ Mn = "Mn"
173
+ Fe = "Fe"
174
+ Co = "Co"
175
+ Ni = "Ni"
176
+ Cu = "Cu"
177
+ Zn = "Zn"
178
+ Ga = "Ga"
179
+ Ge = "Ge"
180
+ As = "As"
181
+ Se = "Se"
182
+ Br = "Br"
183
+ Kr = "Kr"
184
+ Rb = "Rb"
185
+ Sr = "Sr"
186
+ Y = "Y"
187
+ Zr = "Zr"
188
+ Nb = "Nb"
189
+ Mo = "Mo"
190
+ Tc = "Tc"
191
+ Ru = "Ru"
192
+ Rh = "Rh"
193
+ Pd = "Pd"
194
+ Ag = "Ag"
195
+ Cd = "Cd"
196
+ In = "In"
197
+ Sn = "Sn"
198
+ Sb = "Sb"
199
+ Te = "Te"
200
+ I = "I"
201
+ Xe = "Xe"
202
+ Cs = "Cs"
203
+ Ba = "Ba"
204
+ La = "La"
205
+ Ce = "Ce"
206
+ Pr = "Pr"
207
+ Nd = "Nd"
208
+ Pm = "Pm"
209
+ Sm = "Sm"
210
+ Eu = "Eu"
211
+ Gd = "Gd"
212
+ Tb = "Tb"
213
+ Dy = "Dy"
214
+ Ho = "Ho"
215
+ Er = "Er"
216
+ Tm = "Tm"
217
+ Yb = "Yb"
218
+ Lu = "Lu"
219
+ Hf = "Hf"
220
+ Ta = "Ta"
221
+ W = "W"
222
+ Re = "Re"
223
+ Os = "Os"
224
+ Ir = "Ir"
225
+ Pt = "Pt"
226
+ Au = "Au"
227
+ Hg = "Hg"
228
+ Tl = "Tl"
229
+ Pb = "Pb"
230
+ Bi = "Bi"
231
+ Po = "Po"
232
+ At = "At"
233
+ Rn = "Rn"
234
+ Fr = "Fr"
235
+ Ra = "Ra"
236
+ Ac = "Ac"
237
+ Th = "Th"
238
+ Pa = "Pa"
239
+ U = "U"
240
+ Np = "Np"
241
+ Pu = "Pu"
242
+ Am = "Am"
243
+ Cm = "Cm"
244
+ Bk = "Bk"
245
+ Cf = "Cf"
246
+ Es = "Es"
247
+ Fm = "Fm"
248
+ Md = "Md"
249
+ No = "No"
250
+ Lr = "Lr"
251
+ Rf = "Rf"
252
+ Db = "Db"
253
+ Sg = "Sg"
254
+ Bh = "Bh"
255
+ Hs = "Hs"
256
+ Mt = "Mt"
257
+ Ds = "Ds"
258
+ Rg = "Rg"
259
+ Cn = "Cn"
260
+ Nh = "Nh"
261
+ Fl = "Fl"
262
+ Mc = "Mc"
263
+ Lv = "Lv"
264
+ Ts = "Ts"
265
+ Og = "Og"
266
+
267
+
268
+ class Value5(Enum):
269
+ X = "X"
270
+ Vac = "Vac"
271
+
272
+
273
+ class AtomicElementSchema(BaseModel):
274
+ value: Union[Value, Value5]
275
+ """
276
+ All elements, including extra elements
277
+ """
278
+ id: int
279
+ """
280
+ integer id of this entry
281
+ """
282
+
283
+
284
+ class AtomicCoordinateSchema(BaseModel):
285
+ value: List[float] = Field(..., max_length=3, min_length=3, title="coordinate 3d schema")
286
+ """
287
+ value of this entry
288
+ """
289
+ id: int
290
+ """
291
+ integer id of this entry
292
+ """
293
+
294
+
295
+ class BasisUnitsEnum(Enum):
296
+ crystal = "crystal"
297
+ cartesian = "cartesian"
298
+
299
+
300
+ class AtomicLabelSchema(BaseModel):
301
+ value: Union[Union[int, str, float], conint(ge=1, le=9)]
302
+ """
303
+ value of this entry
304
+ """
305
+ id: int
306
+ """
307
+ integer id of this entry
308
+ """
309
+
310
+
311
+ class BasisSchema(BaseModel):
312
+ elements: List[AtomicElementSchema] = Field(..., title="atomic elements schema")
313
+ """
314
+ atomic elements schema
315
+ """
316
+ coordinates: List[AtomicCoordinateSchema] = Field(..., title="atomic coordinates schema")
317
+ """
318
+ atomic coordinates schema
319
+ """
320
+ units: Optional[BasisUnitsEnum] = Field("crystal", title="basis units enum")
321
+ labels: Optional[List[AtomicLabelSchema]] = Field(None, title="atomic labels schema")
322
+ """
323
+ atomic labels schema
324
+ """
325
+
326
+
327
+ class LatticeVectorsUnitsEnum(Enum):
328
+ angstrom = "angstrom"
329
+ bohr = "bohr"
330
+
331
+
332
+ class LatticeVectorsSchema(BaseModel):
333
+ a: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
334
+ b: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
335
+ c: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
336
+ alat: Optional[float] = 1
337
+ """
338
+ lattice parameter for fractional coordinates
339
+ """
340
+ units: Optional[LatticeVectorsUnitsEnum] = Field("angstrom", title="lattice vectors units enum")
341
+
342
+
343
+ class LatticeTypeEnum(Enum):
344
+ CUB = "CUB"
345
+ BCC = "BCC"
346
+ FCC = "FCC"
347
+ TET = "TET"
348
+ MCL = "MCL"
349
+ ORC = "ORC"
350
+ ORCC = "ORCC"
351
+ ORCF = "ORCF"
352
+ ORCI = "ORCI"
353
+ HEX = "HEX"
354
+ BCT = "BCT"
355
+ TRI = "TRI"
356
+ MCLC = "MCLC"
357
+ RHL = "RHL"
358
+
359
+
360
+ class LatticeUnitsLengthEnum(Enum):
361
+ angstrom = "angstrom"
362
+ bohr = "bohr"
363
+
364
+
365
+ class LatticeUnitsAngleEnum(Enum):
366
+ degree = "degree"
367
+ radian = "radian"
368
+
369
+
370
+ class LatticeUnitsSchema(BaseModel):
371
+ length: Optional[LatticeUnitsLengthEnum] = Field("angstrom", title="lattice units length enum")
372
+ angle: Optional[LatticeUnitsAngleEnum] = Field("degree", title="lattice units angle enum")
373
+
374
+
375
+ class LatticeSchema(BaseModel):
376
+ a: float
377
+ """
378
+ length of the first lattice vector
379
+ """
380
+ b: float
381
+ """
382
+ length of the second lattice vector
383
+ """
384
+ c: float
385
+ """
386
+ length of the third lattice vector
387
+ """
388
+ alpha: float
389
+ """
390
+ angle between first and second lattice vector
391
+ """
392
+ beta: float
393
+ """
394
+ angle between second and third lattice vector
395
+ """
396
+ gamma: float
397
+ """
398
+ angle between first and third lattice vector
399
+ """
400
+ vectors: Optional[LatticeVectorsSchema] = Field(None, title="lattice vectors schema")
401
+ type: Optional[LatticeTypeEnum] = Field("TRI", title="lattice type enum")
402
+ units: Optional[LatticeUnitsSchema] = Field(
403
+ default_factory=lambda: LatticeUnitsSchema.model_validate({"length": "angstrom", "angle": "degree"}),
404
+ title="Lattice units schema",
405
+ )
406
+
407
+
408
+ class Name(Enum):
409
+ volume = "volume"
410
+
411
+
412
+ class Units(Enum):
413
+ angstrom_3 = "angstrom^3"
414
+
415
+
416
+ class VolumeSchema(BaseModel):
417
+ name: Literal["0#-datamodel-code-generator-#-object-#-special-#"]
418
+ units: Optional[Units] = None
419
+ value: float
420
+
421
+
422
+ class Name3(Enum):
423
+ density = "density"
424
+
425
+
426
+ class Units2(Enum):
427
+ g_cm_3 = "g/cm^3"
428
+
429
+
430
+ class DensitySchema(BaseModel):
431
+ name: Literal["1#-datamodel-code-generator-#-object-#-special-#"]
432
+ units: Optional[Units2] = None
433
+ value: float
434
+
435
+
436
+ class Units3(Enum):
437
+ angstrom = "angstrom"
438
+
439
+
440
+ class ScalarSchema(BaseModel):
441
+ units: Optional[Units3] = None
442
+ value: float
443
+
444
+
445
+ class Name4(Enum):
446
+ symmetry = "symmetry"
447
+
448
+
449
+ class SymmetrySchema(BaseModel):
450
+ pointGroupSymbol: Optional[str] = None
451
+ """
452
+ point group symbol in Schoenflies notation
453
+ """
454
+ spaceGroupSymbol: Optional[str] = None
455
+ """
456
+ space group symbol in Hermann–Mauguin notation
457
+ """
458
+ tolerance: Optional[ScalarSchema] = Field(None, title="scalar schema")
459
+ """
460
+ tolerance used for symmetry calculation
461
+ """
462
+ name: Literal["2#-datamodel-code-generator-#-object-#-special-#"]
463
+
464
+
465
+ class Name5(Enum):
466
+ elemental_ratio = "elemental_ratio"
467
+
468
+
469
+ class ElementalRatio(BaseModel):
470
+ name: Literal["3#-datamodel-code-generator-#-object-#-special-#"]
471
+ value: confloat(ge=0.0, le=1.0)
472
+ element: Optional[str] = None
473
+ """
474
+ the element this ratio is for
475
+ """
476
+
477
+
478
+ class Name6(Enum):
479
+ p_norm = "p-norm"
480
+
481
+
482
+ class PNorm(BaseModel):
483
+ name: Literal["4#-datamodel-code-generator-#-object-#-special-#"]
484
+ degree: Optional[int] = None
485
+ """
486
+ degree of the dimensionality of the norm
487
+ """
488
+ value: float
489
+
490
+
491
+ class Name7(Enum):
492
+ inchi = "inchi"
493
+
494
+
495
+ class InChIRepresentationSchema(BaseModel):
496
+ name: Literal["5#-datamodel-code-generator-#-object-#-special-#"]
497
+ value: str
498
+
499
+
500
+ class Name8(Enum):
501
+ inchi_key = "inchi_key"
502
+
503
+
504
+ class InChIKeyRepresentationSchema(BaseModel):
505
+ name: Literal["6#-datamodel-code-generator-#-object-#-special-#"]
506
+ value: str
507
+
508
+
509
+ class DerivedPropertiesSchema(
510
+ RootModel[
511
+ Union[
512
+ VolumeSchema,
513
+ DensitySchema,
514
+ SymmetrySchema,
515
+ ElementalRatio,
516
+ PNorm,
517
+ InChIRepresentationSchema,
518
+ InChIKeyRepresentationSchema,
519
+ ]
520
+ ]
521
+ ):
522
+ root: Union[
523
+ VolumeSchema,
524
+ DensitySchema,
525
+ SymmetrySchema,
526
+ ElementalRatio,
527
+ PNorm,
528
+ InChIRepresentationSchema,
529
+ InChIKeyRepresentationSchema,
530
+ ] = Field(..., discriminator="name")
531
+
532
+
533
+ class DatabaseSourceSchema(BaseModel):
534
+ id: Union[str, float]
535
+ """
536
+ 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
537
+ """
538
+ source: str
539
+ """
540
+ Third party source name, e.g. materials project, 2dmatpedia, ICSD, etc.
541
+ """
542
+ origin: bool
543
+ """
544
+ 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).
545
+ """
546
+ data: Optional[Dict[str, Any]] = None
547
+ """
548
+ Original response from external source.
549
+ """
550
+ doi: Optional[str] = None
551
+ """
552
+ Digital Object Identifier, e.g. 10.1088/0953-8984/25/10/105506
553
+ """
554
+ url: Optional[str] = None
555
+ """
556
+ 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
557
+ """
558
+
559
+
560
+ class FileSourceSchema(BaseModel):
561
+ extension: Optional[str] = None
562
+ """
563
+ file extension
564
+ """
565
+ filename: str
566
+ """
567
+ file name without extension
568
+ """
569
+ text: str
570
+ """
571
+ file content as raw text
572
+ """
573
+ hash: str
574
+ """
575
+ MD5 hash based on file content
576
+ """
577
+
578
+
579
+ class Name9(Enum):
580
+ default = "default"
581
+ atomsTooClose = "atomsTooClose"
582
+ atomsOverlap = "atomsOverlap"
583
+
584
+
585
+ class Severity(Enum):
586
+ info = "info"
587
+ warning = "warning"
588
+ error = "error"
589
+
590
+
591
+ class MaterialConsistencyCheckSchema(BaseModel):
592
+ name: Name9
593
+ """
594
+ Name of the consistency check that is performed, which is listed in an enum.
595
+ """
596
+ key: str
597
+ """
598
+ Key of the property of the entity on which the consistency check is performed in Mongo dot notation, e.g. 'basis.coordinates.1'
599
+ """
600
+ severity: Severity
601
+ """
602
+ Severity level of the problem, which is used in UI to differentiate.
603
+ """
604
+ message: str
605
+ """
606
+ Message generated by the consistency check describing the problem.
607
+ """
608
+
609
+
610
+ class CrystalSchema(BaseModel):
611
+ formula: Optional[str] = None
612
+ """
613
+ reduced chemical formula
614
+ """
615
+ unitCellFormula: Optional[str] = None
616
+ """
617
+ chemical formula based on the number of atoms of each element in the supercell
618
+ """
619
+ basis: BasisSchema = Field(..., title="basis schema")
620
+ lattice: LatticeSchema = Field(..., title="lattice schema")
621
+ derivedProperties: Optional[List[DerivedPropertiesSchema]] = Field(None, title="derived properties schema")
622
+ external: Optional[DatabaseSourceSchema] = Field(None, title="database source schema")
623
+ """
624
+ information about a database source
625
+ """
626
+ src: Optional[FileSourceSchema] = Field(None, title="file source schema")
627
+ """
628
+ file source with the information inside
629
+ """
630
+ scaledHash: Optional[str] = None
631
+ """
632
+ Hash string for a scaled structure with lattice vector a set to 1 (eg. for materials under pressure).
633
+ """
634
+ icsdId: Optional[int] = None
635
+ """
636
+ Corresponding ICSD id of the material
637
+ """
638
+ isNonPeriodic: Optional[bool] = None
639
+ """
640
+ Whether to work in the finite molecular picture (usually with atomic orbital basis)
641
+ """
642
+ consistencyChecks: Optional[List[MaterialConsistencyCheckSchema]] = None
643
+ field_id: Optional[str] = Field(None, alias="_id")
644
+ """
645
+ entity identity
646
+ """
647
+ slug: Optional[str] = None
648
+ """
649
+ entity slug
650
+ """
651
+ systemName: Optional[str] = None
652
+ schemaVersion: Optional[str] = "2022.8.16"
653
+ """
654
+ entity's schema version. Used to distinct between different schemas.
655
+ """
656
+ name: Optional[str] = None
657
+ """
658
+ entity name
659
+ """
660
+ isDefault: Optional[bool] = False
661
+ """
662
+ Identifies that entity is defaultable
663
+ """
664
+ metadata: Optional[Dict[str, Any]] = None
665
+
666
+
667
+ class AtomicLayersSchema(BaseModel):
668
+ terminations: List[TerminationSchema] = Field(..., min_length=1)
669
+ """
670
+ All possible terminations for this orientation.
671
+ """
672
+ crystal: CrystalSchema = Field(..., title="Crystal Schema")
673
+ """
674
+ A crystal structure, referencing the base material schema
675
+ """
676
+ miller_indices: Optional[List[int]] = Field([0, 0, 1], max_length=3, min_length=3, title="Miller Indices Schema")
677
+ """
678
+ Miller indices [h, k, l] defining crystallographic planes
679
+ """
680
+ use_conventional_cell: Optional[bool] = True
681
+ """
682
+ Use the conventional cell for the crystal structure
683
+ """