mat3ra-esse 2025.5.13.post0__py3-none-any.whl → 2025.5.16.post1__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 (74) 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 +8 -8
  4. mat3ra/esse/models/apse/materials/builders/slab/pymatgen/__init__.py +3 -0
  5. mat3ra/esse/models/apse/materials/builders/slab/pymatgen/parameters.py +28 -0
  6. mat3ra/esse/models/core/reusable/energy.py +2 -2
  7. mat3ra/esse/models/element.py +128 -10
  8. mat3ra/esse/models/enums/__init__.py +3 -0
  9. mat3ra/esse/models/enums/chemical_elements.py +13 -0
  10. mat3ra/esse/models/material/__init__.py +140 -14
  11. mat3ra/esse/models/material/builders/base/__init__.py +3 -0
  12. mat3ra/esse/models/material/builders/base/selector_parameters.py +16 -0
  13. mat3ra/esse/models/material/builders/single_material/two_dimensional/slab/__init__.py +3 -0
  14. mat3ra/esse/models/material/builders/single_material/two_dimensional/slab/builder_parameters.py +28 -0
  15. mat3ra/esse/models/material/builders/single_material/two_dimensional/slab/selector_parameters.py +151 -0
  16. mat3ra/esse/models/material/reusable/slab/enums/__init__.py +3 -0
  17. mat3ra/esse/models/material/reusable/slab/enums/exposed_face.py +13 -0
  18. mat3ra/esse/models/material/reusable/slab/number_of_layers.py +1 -1
  19. mat3ra/esse/models/material/reusable/slab/termination.py +129 -3
  20. mat3ra/esse/models/material/reusable/slab/vacuum.py +2 -2
  21. mat3ra/esse/models/materials_category/defects/__init__.py +3 -0
  22. mat3ra/esse/models/materials_category/defects/configuration.py +538 -0
  23. mat3ra/esse/models/materials_category/defects/enums/__init__.py +3 -0
  24. mat3ra/esse/models/materials_category/defects/enums/atom_placement_method.py +22 -0
  25. mat3ra/esse/models/materials_category/defects/enums/complex_defect_type.py +18 -0
  26. mat3ra/esse/models/materials_category/defects/enums/coordinates_shape.py +21 -0
  27. mat3ra/esse/models/materials_category/defects/enums/point_defect_type.py +13 -0
  28. mat3ra/esse/models/materials_category/defects/enums/slab_defect_type.py +19 -0
  29. mat3ra/esse/models/materials_category/defects/enums.py +13 -0
  30. mat3ra/esse/models/materials_category/defects/one_dimensional/terrace/__init__.py +3 -0
  31. mat3ra/esse/models/materials_category/defects/one_dimensional/terrace/configuration.py +425 -0
  32. mat3ra/esse/models/materials_category/defects/slab/__init__.py +3 -0
  33. mat3ra/esse/models/materials_category/defects/slab/configuration.py +412 -0
  34. mat3ra/esse/models/materials_category/defects/two_dimensional/island/__init__.py +3 -0
  35. mat3ra/esse/models/materials_category/defects/two_dimensional/island/configuration.py +449 -0
  36. mat3ra/esse/models/materials_category/defects/two_dimensional/slab_grain_boundary/__init__.py +3 -0
  37. mat3ra/esse/models/materials_category/defects/two_dimensional/slab_grain_boundary/configuration.py +1105 -0
  38. mat3ra/esse/models/materials_category/defects/zero_dimensional/adatom/__init__.py +3 -0
  39. mat3ra/esse/models/materials_category/defects/zero_dimensional/adatom/base_configuration.py +418 -0
  40. mat3ra/esse/models/materials_category/defects/zero_dimensional/adatom/configuration.py +418 -0
  41. mat3ra/esse/models/materials_category/defects/zero_dimensional/defect_pair/__init__.py +3 -0
  42. mat3ra/esse/models/materials_category/defects/zero_dimensional/defect_pair/configuration.py +1026 -0
  43. mat3ra/esse/models/materials_category/defects/zero_dimensional/point/__init__.py +3 -0
  44. mat3ra/esse/models/materials_category/defects/zero_dimensional/point/base_configuration.py +30 -0
  45. mat3ra/esse/models/materials_category/defects/zero_dimensional/point/configuration.py +672 -0
  46. mat3ra/esse/models/materials_category/defects/zero_dimensional/slab/__init__.py +3 -0
  47. mat3ra/esse/models/materials_category/defects/zero_dimensional/slab/configuration.py +434 -0
  48. mat3ra/esse/models/materials_category/single_material/two_dimensional/slab/configuration.py +142 -16
  49. mat3ra/esse/models/properties_directory/derived_properties.py +11 -11
  50. mat3ra/esse/models/properties_directory/non_scalar/density_of_states.py +2 -2
  51. mat3ra/esse/models/properties_directory/non_scalar/phonon_dispersions.py +2 -2
  52. mat3ra/esse/models/properties_directory/non_scalar/phonon_dos.py +2 -2
  53. mat3ra/esse/models/properties_directory/non_scalar/total_energy_contributions.py +50 -50
  54. mat3ra/esse/models/properties_directory/non_scalar/vibrational_spectrum.py +2 -2
  55. mat3ra/esse/models/properties_directory/scalar/electron_affinity.py +2 -2
  56. mat3ra/esse/models/properties_directory/scalar/fermi_energy.py +2 -2
  57. mat3ra/esse/models/properties_directory/scalar/formation_energy.py +2 -2
  58. mat3ra/esse/models/properties_directory/scalar/ionization_potential.py +2 -2
  59. mat3ra/esse/models/properties_directory/scalar/reaction_energy_barrier.py +2 -2
  60. mat3ra/esse/models/properties_directory/scalar/surface_energy.py +2 -2
  61. mat3ra/esse/models/properties_directory/scalar/total_energy.py +2 -2
  62. mat3ra/esse/models/properties_directory/scalar/valence_band_offset.py +2 -2
  63. mat3ra/esse/models/properties_directory/scalar/zero_point_energy.py +2 -2
  64. mat3ra/esse/models/properties_directory/structural/basis/__init__.py +128 -2
  65. mat3ra/esse/models/properties_directory/structural/basis/atomic_element.py +131 -2
  66. mat3ra/esse/models/properties_directory/structural/basis/atomic_elements.py +130 -3
  67. mat3ra/esse/models/properties_directory/structural/molecular_pattern.py +4 -4
  68. mat3ra/esse/models/properties_directory/workflow/convergence/ionic.py +2 -2
  69. {mat3ra_esse-2025.5.13.post0.dist-info → mat3ra_esse-2025.5.16.post1.dist-info}/METADATA +1 -1
  70. {mat3ra_esse-2025.5.13.post0.dist-info → mat3ra_esse-2025.5.16.post1.dist-info}/RECORD +73 -36
  71. {mat3ra_esse-2025.5.13.post0.dist-info → mat3ra_esse-2025.5.16.post1.dist-info}/WHEEL +1 -1
  72. mat3ra/esse/models/material/reusable/slab/thickness.py +0 -16
  73. {mat3ra_esse-2025.5.13.post0.dist-info → mat3ra_esse-2025.5.16.post1.dist-info}/licenses/LICENSE.md +0 -0
  74. {mat3ra_esse-2025.5.13.post0.dist-info → mat3ra_esse-2025.5.16.post1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1026 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: materials_category/defects/zero_dimensional/defect_pair/configuration.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
11
+
12
+
13
+ class DefectType(Enum):
14
+ pair = "pair"
15
+
16
+
17
+ class DefectType2(Enum):
18
+ vacancy = "vacancy"
19
+ substitution = "substitution"
20
+ interstitial = "interstitial"
21
+ adatom = "adatom"
22
+
23
+
24
+ class AtomicElementSchema(BaseModel):
25
+ value: str
26
+ """
27
+ value of this entry
28
+ """
29
+ id: int
30
+ """
31
+ integer id of this entry
32
+ """
33
+
34
+
35
+ class AtomicCoordinateSchema(BaseModel):
36
+ value: List[float] = Field(..., max_length=3, min_length=3, title="coordinate 3d schema")
37
+ """
38
+ value of this entry
39
+ """
40
+ id: int
41
+ """
42
+ integer id of this entry
43
+ """
44
+
45
+
46
+ class BasisUnitsEnum(Enum):
47
+ crystal = "crystal"
48
+ cartesian = "cartesian"
49
+
50
+
51
+ class AtomicLabelSchema(BaseModel):
52
+ value: Union[Union[int, str, float], conint(ge=1, le=9)]
53
+ """
54
+ value of this entry
55
+ """
56
+ id: int
57
+ """
58
+ integer id of this entry
59
+ """
60
+
61
+
62
+ class BasisSchema(BaseModel):
63
+ elements: List[AtomicElementSchema] = Field(..., title="atomic elements schema")
64
+ """
65
+ atomic elements schema
66
+ """
67
+ coordinates: List[AtomicCoordinateSchema] = Field(..., title="atomic coordinates schema")
68
+ """
69
+ atomic coordinates schema
70
+ """
71
+ units: Optional[BasisUnitsEnum] = Field("crystal", title="basis units enum")
72
+ labels: Optional[List[AtomicLabelSchema]] = Field(None, title="atomic labels schema")
73
+ """
74
+ atomic labels schema
75
+ """
76
+
77
+
78
+ class LatticeVectorsUnitsEnum(Enum):
79
+ angstrom = "angstrom"
80
+ bohr = "bohr"
81
+
82
+
83
+ class LatticeVectorsSchema(BaseModel):
84
+ a: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
85
+ b: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
86
+ c: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
87
+ alat: Optional[float] = 1
88
+ """
89
+ lattice parameter for fractional coordinates
90
+ """
91
+ units: Optional[LatticeVectorsUnitsEnum] = Field("angstrom", title="lattice vectors units enum")
92
+
93
+
94
+ class LatticeTypeEnum(Enum):
95
+ CUB = "CUB"
96
+ BCC = "BCC"
97
+ FCC = "FCC"
98
+ TET = "TET"
99
+ MCL = "MCL"
100
+ ORC = "ORC"
101
+ ORCC = "ORCC"
102
+ ORCF = "ORCF"
103
+ ORCI = "ORCI"
104
+ HEX = "HEX"
105
+ BCT = "BCT"
106
+ TRI = "TRI"
107
+ MCLC = "MCLC"
108
+ RHL = "RHL"
109
+
110
+
111
+ class LatticeUnitsLengthEnum(Enum):
112
+ angstrom = "angstrom"
113
+ bohr = "bohr"
114
+
115
+
116
+ class LatticeUnitsAngleEnum(Enum):
117
+ degree = "degree"
118
+ radian = "radian"
119
+
120
+
121
+ class LatticeUnitsSchema(BaseModel):
122
+ length: Optional[LatticeUnitsLengthEnum] = Field("angstrom", title="lattice units length enum")
123
+ angle: Optional[LatticeUnitsAngleEnum] = Field("degree", title="lattice units angle enum")
124
+
125
+
126
+ class LatticeSchema(BaseModel):
127
+ a: float
128
+ """
129
+ length of the first lattice vector
130
+ """
131
+ b: float
132
+ """
133
+ length of the second lattice vector
134
+ """
135
+ c: float
136
+ """
137
+ length of the third lattice vector
138
+ """
139
+ alpha: float
140
+ """
141
+ angle between first and second lattice vector
142
+ """
143
+ beta: float
144
+ """
145
+ angle between second and third lattice vector
146
+ """
147
+ gamma: float
148
+ """
149
+ angle between first and third lattice vector
150
+ """
151
+ vectors: Optional[LatticeVectorsSchema] = Field(None, title="lattice vectors schema")
152
+ type: Optional[LatticeTypeEnum] = Field("TRI", title="lattice type enum")
153
+ units: Optional[LatticeUnitsSchema] = Field(
154
+ default_factory=lambda: LatticeUnitsSchema.model_validate({"length": "angstrom", "angle": "degree"}),
155
+ title="Lattice units schema",
156
+ )
157
+
158
+
159
+ class Name(Enum):
160
+ volume = "volume"
161
+
162
+
163
+ class Units(Enum):
164
+ angstrom_3 = "angstrom^3"
165
+
166
+
167
+ class VolumeSchema(BaseModel):
168
+ name: Literal["0#-datamodel-code-generator-#-object-#-special-#"]
169
+ units: Optional[Units] = None
170
+ value: float
171
+
172
+
173
+ class Name24(Enum):
174
+ density = "density"
175
+
176
+
177
+ class Units16(Enum):
178
+ g_cm_3 = "g/cm^3"
179
+
180
+
181
+ class DensitySchema(BaseModel):
182
+ name: Literal["1#-datamodel-code-generator-#-object-#-special-#"]
183
+ units: Optional[Units16] = None
184
+ value: float
185
+
186
+
187
+ class Units17(Enum):
188
+ angstrom = "angstrom"
189
+
190
+
191
+ class ScalarSchema(BaseModel):
192
+ units: Optional[Units17] = None
193
+ value: float
194
+
195
+
196
+ class Name25(Enum):
197
+ symmetry = "symmetry"
198
+
199
+
200
+ class SymmetrySchema(BaseModel):
201
+ pointGroupSymbol: Optional[str] = None
202
+ """
203
+ point group symbol in Schoenflies notation
204
+ """
205
+ spaceGroupSymbol: Optional[str] = None
206
+ """
207
+ space group symbol in Hermann–Mauguin notation
208
+ """
209
+ tolerance: Optional[ScalarSchema] = Field(None, title="scalar schema")
210
+ """
211
+ tolerance used for symmetry calculation
212
+ """
213
+ name: Literal["2#-datamodel-code-generator-#-object-#-special-#"]
214
+
215
+
216
+ class Name26(Enum):
217
+ elemental_ratio = "elemental_ratio"
218
+
219
+
220
+ class ElementalRatio(BaseModel):
221
+ name: Literal["3#-datamodel-code-generator-#-object-#-special-#"]
222
+ value: confloat(ge=0.0, le=1.0)
223
+ element: Optional[str] = None
224
+ """
225
+ the element this ratio is for
226
+ """
227
+
228
+
229
+ class Name27(Enum):
230
+ p_norm = "p-norm"
231
+
232
+
233
+ class PNorm(BaseModel):
234
+ name: Literal["4#-datamodel-code-generator-#-object-#-special-#"]
235
+ degree: Optional[int] = None
236
+ """
237
+ degree of the dimensionality of the norm
238
+ """
239
+ value: float
240
+
241
+
242
+ class Name28(Enum):
243
+ inchi = "inchi"
244
+
245
+
246
+ class InChIRepresentationSchema(BaseModel):
247
+ name: Literal["5#-datamodel-code-generator-#-object-#-special-#"]
248
+ value: str
249
+
250
+
251
+ class Name29(Enum):
252
+ inchi_key = "inchi_key"
253
+
254
+
255
+ class InChIKeyRepresentationSchema(BaseModel):
256
+ name: Literal["6#-datamodel-code-generator-#-object-#-special-#"]
257
+ value: str
258
+
259
+
260
+ class DerivedPropertiesSchema(
261
+ RootModel[
262
+ Union[
263
+ VolumeSchema,
264
+ DensitySchema,
265
+ SymmetrySchema,
266
+ ElementalRatio,
267
+ PNorm,
268
+ InChIRepresentationSchema,
269
+ InChIKeyRepresentationSchema,
270
+ ]
271
+ ]
272
+ ):
273
+ root: Union[
274
+ VolumeSchema,
275
+ DensitySchema,
276
+ SymmetrySchema,
277
+ ElementalRatio,
278
+ PNorm,
279
+ InChIRepresentationSchema,
280
+ InChIKeyRepresentationSchema,
281
+ ] = Field(..., discriminator="name")
282
+
283
+
284
+ class DatabaseSourceSchema(BaseModel):
285
+ id: Union[str, float]
286
+ """
287
+ 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
288
+ """
289
+ source: str
290
+ """
291
+ Third party source name, e.g. materials project, 2dmatpedia, ICSD, etc.
292
+ """
293
+ origin: bool
294
+ """
295
+ 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).
296
+ """
297
+ data: Optional[Dict[str, Any]] = None
298
+ """
299
+ Original response from external source.
300
+ """
301
+ doi: Optional[str] = None
302
+ """
303
+ Digital Object Identifier, e.g. 10.1088/0953-8984/25/10/105506
304
+ """
305
+ url: Optional[str] = None
306
+ """
307
+ 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
308
+ """
309
+
310
+
311
+ class FileSourceSchema(BaseModel):
312
+ extension: Optional[str] = None
313
+ """
314
+ file extension
315
+ """
316
+ filename: str
317
+ """
318
+ file name without extension
319
+ """
320
+ text: str
321
+ """
322
+ file content as raw text
323
+ """
324
+ hash: str
325
+ """
326
+ MD5 hash based on file content
327
+ """
328
+
329
+
330
+ class Name30(Enum):
331
+ default = "default"
332
+ atomsTooClose = "atomsTooClose"
333
+ atomsOverlap = "atomsOverlap"
334
+
335
+
336
+ class Severity(Enum):
337
+ info = "info"
338
+ warning = "warning"
339
+ error = "error"
340
+
341
+
342
+ class MaterialConsistencyCheckSchema(BaseModel):
343
+ name: Name30
344
+ """
345
+ Name of the consistency check that is performed, which is listed in an enum.
346
+ """
347
+ key: str
348
+ """
349
+ Key of the property of the entity on which the consistency check is performed in Mongo dot notation, e.g. 'basis.coordinates.1'
350
+ """
351
+ severity: Severity
352
+ """
353
+ Severity level of the problem, which is used in UI to differentiate.
354
+ """
355
+ message: str
356
+ """
357
+ Message generated by the consistency check describing the problem.
358
+ """
359
+
360
+
361
+ class MaterialSchema(BaseModel):
362
+ formula: Optional[str] = None
363
+ """
364
+ reduced chemical formula
365
+ """
366
+ unitCellFormula: Optional[str] = None
367
+ """
368
+ chemical formula based on the number of atoms of each element in the supercell
369
+ """
370
+ basis: BasisSchema = Field(..., title="basis schema")
371
+ lattice: LatticeSchema = Field(..., title="lattice schema")
372
+ derivedProperties: Optional[List[DerivedPropertiesSchema]] = Field(None, title="derived properties schema")
373
+ external: Optional[DatabaseSourceSchema] = Field(None, title="database source schema")
374
+ """
375
+ information about a database source
376
+ """
377
+ src: Optional[FileSourceSchema] = Field(None, title="file source schema")
378
+ """
379
+ file source with the information inside
380
+ """
381
+ scaledHash: Optional[str] = None
382
+ """
383
+ Hash string for a scaled structure with lattice vector a set to 1 (eg. for materials under pressure).
384
+ """
385
+ icsdId: Optional[int] = None
386
+ """
387
+ Corresponding ICSD id of the material
388
+ """
389
+ isNonPeriodic: Optional[bool] = None
390
+ """
391
+ Whether to work in the finite molecular picture (usually with atomic orbital basis)
392
+ """
393
+ consistencyChecks: Optional[List[MaterialConsistencyCheckSchema]] = None
394
+ field_id: Optional[str] = Field(None, alias="_id")
395
+ """
396
+ entity identity
397
+ """
398
+ slug: Optional[str] = None
399
+ """
400
+ entity slug
401
+ """
402
+ systemName: Optional[str] = None
403
+ schemaVersion: Optional[str] = "2022.8.16"
404
+ """
405
+ entity's schema version. Used to distinct between different schemas.
406
+ """
407
+ name: Optional[str] = None
408
+ """
409
+ entity name
410
+ """
411
+ isDefault: Optional[bool] = False
412
+ """
413
+ Identifies that entity is defaultable
414
+ """
415
+ metadata: Optional[Dict[str, Any]] = None
416
+
417
+
418
+ class PointDefectConfigurationSchema(BaseModel):
419
+ defect_type: DefectType2
420
+ coordinate: List[float] = Field(..., max_length=3, min_length=3, title="coordinate 3d schema")
421
+ chemical_element: Optional[str] = None
422
+ """
423
+ The chemical element for substitution or interstitial defects
424
+ """
425
+ use_cartesian_coordinates: Optional[bool] = False
426
+ """
427
+ Whether coordinates are in cartesian rather than fractional coordinates
428
+ """
429
+ crystal: MaterialSchema = Field(..., title="material schema")
430
+
431
+
432
+ class BasisSchema4(BaseModel):
433
+ elements: List[AtomicElementSchema] = Field(..., title="atomic elements schema")
434
+ """
435
+ atomic elements schema
436
+ """
437
+ coordinates: List[AtomicCoordinateSchema] = Field(..., title="atomic coordinates schema")
438
+ """
439
+ atomic coordinates schema
440
+ """
441
+ units: Optional[BasisUnitsEnum] = Field("crystal", title="basis units enum")
442
+ labels: Optional[List[AtomicLabelSchema]] = Field(None, title="atomic labels schema")
443
+ """
444
+ atomic labels schema
445
+ """
446
+
447
+
448
+ class LatticeVectorsSchema3(BaseModel):
449
+ a: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
450
+ b: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
451
+ c: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
452
+ alat: Optional[float] = 1
453
+ """
454
+ lattice parameter for fractional coordinates
455
+ """
456
+ units: Optional[LatticeVectorsUnitsEnum] = Field("angstrom", title="lattice vectors units enum")
457
+
458
+
459
+ class LatticeUnitsSchema3(BaseModel):
460
+ length: Optional[LatticeUnitsLengthEnum] = Field("angstrom", title="lattice units length enum")
461
+ angle: Optional[LatticeUnitsAngleEnum] = Field("degree", title="lattice units angle enum")
462
+
463
+
464
+ class LatticeSchema3(BaseModel):
465
+ a: float
466
+ """
467
+ length of the first lattice vector
468
+ """
469
+ b: float
470
+ """
471
+ length of the second lattice vector
472
+ """
473
+ c: float
474
+ """
475
+ length of the third lattice vector
476
+ """
477
+ alpha: float
478
+ """
479
+ angle between first and second lattice vector
480
+ """
481
+ beta: float
482
+ """
483
+ angle between second and third lattice vector
484
+ """
485
+ gamma: float
486
+ """
487
+ angle between first and third lattice vector
488
+ """
489
+ vectors: Optional[LatticeVectorsSchema3] = Field(None, title="lattice vectors schema")
490
+ type: Optional[LatticeTypeEnum] = Field("TRI", title="lattice type enum")
491
+ units: Optional[LatticeUnitsSchema3] = Field(
492
+ default_factory=lambda: LatticeUnitsSchema3.model_validate({"length": "angstrom", "angle": "degree"}),
493
+ title="Lattice units schema",
494
+ )
495
+
496
+
497
+ class Name31(Enum):
498
+ volume = "volume"
499
+
500
+
501
+ class Units18(Enum):
502
+ angstrom_3 = "angstrom^3"
503
+
504
+
505
+ class VolumeSchema3(BaseModel):
506
+ name: Literal["0#-datamodel-code-generator-#-object-#-special-#"]
507
+ units: Optional[Units18] = None
508
+ value: float
509
+
510
+
511
+ class Name32(Enum):
512
+ density = "density"
513
+
514
+
515
+ class Units19(Enum):
516
+ g_cm_3 = "g/cm^3"
517
+
518
+
519
+ class DensitySchema3(BaseModel):
520
+ name: Literal["1#-datamodel-code-generator-#-object-#-special-#"]
521
+ units: Optional[Units19] = None
522
+ value: float
523
+
524
+
525
+ class Units20(Enum):
526
+ angstrom = "angstrom"
527
+
528
+
529
+ class ScalarSchema4(BaseModel):
530
+ units: Optional[Units20] = None
531
+ value: float
532
+
533
+
534
+ class Name33(Enum):
535
+ symmetry = "symmetry"
536
+
537
+
538
+ class SymmetrySchema3(BaseModel):
539
+ pointGroupSymbol: Optional[str] = None
540
+ """
541
+ point group symbol in Schoenflies notation
542
+ """
543
+ spaceGroupSymbol: Optional[str] = None
544
+ """
545
+ space group symbol in Hermann–Mauguin notation
546
+ """
547
+ tolerance: Optional[ScalarSchema4] = Field(None, title="scalar schema")
548
+ """
549
+ tolerance used for symmetry calculation
550
+ """
551
+ name: Literal["2#-datamodel-code-generator-#-object-#-special-#"]
552
+
553
+
554
+ class Name34(Enum):
555
+ elemental_ratio = "elemental_ratio"
556
+
557
+
558
+ class ElementalRatio3(BaseModel):
559
+ name: Literal["3#-datamodel-code-generator-#-object-#-special-#"]
560
+ value: confloat(ge=0.0, le=1.0)
561
+ element: Optional[str] = None
562
+ """
563
+ the element this ratio is for
564
+ """
565
+
566
+
567
+ class Name35(Enum):
568
+ p_norm = "p-norm"
569
+
570
+
571
+ class PNorm3(BaseModel):
572
+ name: Literal["4#-datamodel-code-generator-#-object-#-special-#"]
573
+ degree: Optional[int] = None
574
+ """
575
+ degree of the dimensionality of the norm
576
+ """
577
+ value: float
578
+
579
+
580
+ class Name36(Enum):
581
+ inchi = "inchi"
582
+
583
+
584
+ class InChIRepresentationSchema3(BaseModel):
585
+ name: Literal["5#-datamodel-code-generator-#-object-#-special-#"]
586
+ value: str
587
+
588
+
589
+ class Name37(Enum):
590
+ inchi_key = "inchi_key"
591
+
592
+
593
+ class InChIKeyRepresentationSchema3(BaseModel):
594
+ name: Literal["6#-datamodel-code-generator-#-object-#-special-#"]
595
+ value: str
596
+
597
+
598
+ class DerivedPropertiesSchema3(
599
+ RootModel[
600
+ Union[
601
+ VolumeSchema3,
602
+ DensitySchema3,
603
+ SymmetrySchema3,
604
+ ElementalRatio3,
605
+ PNorm3,
606
+ InChIRepresentationSchema3,
607
+ InChIKeyRepresentationSchema3,
608
+ ]
609
+ ]
610
+ ):
611
+ root: Union[
612
+ VolumeSchema3,
613
+ DensitySchema3,
614
+ SymmetrySchema3,
615
+ ElementalRatio3,
616
+ PNorm3,
617
+ InChIRepresentationSchema3,
618
+ InChIKeyRepresentationSchema3,
619
+ ] = Field(..., discriminator="name")
620
+
621
+
622
+ class Name38(Enum):
623
+ default = "default"
624
+ atomsTooClose = "atomsTooClose"
625
+ atomsOverlap = "atomsOverlap"
626
+
627
+
628
+ class MaterialConsistencyCheckSchema3(BaseModel):
629
+ name: Name38
630
+ """
631
+ Name of the consistency check that is performed, which is listed in an enum.
632
+ """
633
+ key: str
634
+ """
635
+ Key of the property of the entity on which the consistency check is performed in Mongo dot notation, e.g. 'basis.coordinates.1'
636
+ """
637
+ severity: Severity
638
+ """
639
+ Severity level of the problem, which is used in UI to differentiate.
640
+ """
641
+ message: str
642
+ """
643
+ Message generated by the consistency check describing the problem.
644
+ """
645
+
646
+
647
+ class MaterialSchema3(BaseModel):
648
+ formula: Optional[str] = None
649
+ """
650
+ reduced chemical formula
651
+ """
652
+ unitCellFormula: Optional[str] = None
653
+ """
654
+ chemical formula based on the number of atoms of each element in the supercell
655
+ """
656
+ basis: BasisSchema4 = Field(..., title="basis schema")
657
+ lattice: LatticeSchema3 = Field(..., title="lattice schema")
658
+ derivedProperties: Optional[List[DerivedPropertiesSchema3]] = Field(None, title="derived properties schema")
659
+ external: Optional[DatabaseSourceSchema] = Field(None, title="database source schema")
660
+ """
661
+ information about a database source
662
+ """
663
+ src: Optional[FileSourceSchema] = Field(None, title="file source schema")
664
+ """
665
+ file source with the information inside
666
+ """
667
+ scaledHash: Optional[str] = None
668
+ """
669
+ Hash string for a scaled structure with lattice vector a set to 1 (eg. for materials under pressure).
670
+ """
671
+ icsdId: Optional[int] = None
672
+ """
673
+ Corresponding ICSD id of the material
674
+ """
675
+ isNonPeriodic: Optional[bool] = None
676
+ """
677
+ Whether to work in the finite molecular picture (usually with atomic orbital basis)
678
+ """
679
+ consistencyChecks: Optional[List[MaterialConsistencyCheckSchema3]] = None
680
+ field_id: Optional[str] = Field(None, alias="_id")
681
+ """
682
+ entity identity
683
+ """
684
+ slug: Optional[str] = None
685
+ """
686
+ entity slug
687
+ """
688
+ systemName: Optional[str] = None
689
+ schemaVersion: Optional[str] = "2022.8.16"
690
+ """
691
+ entity's schema version. Used to distinct between different schemas.
692
+ """
693
+ name: Optional[str] = None
694
+ """
695
+ entity name
696
+ """
697
+ isDefault: Optional[bool] = False
698
+ """
699
+ Identifies that entity is defaultable
700
+ """
701
+ metadata: Optional[Dict[str, Any]] = None
702
+
703
+
704
+ class AdatomConfigurationSchema(BaseModel):
705
+ crystal: MaterialSchema3 = Field(..., title="material schema")
706
+ defect_type: Literal["adatom"] = "adatom"
707
+ position_on_surface: List[float] = Field(..., max_length=2, min_length=2, title="coordinate 2d schema")
708
+ distance_z: confloat(ge=0.0)
709
+ """
710
+ Distance from the surface in Angstroms
711
+ """
712
+ chemical_element: str
713
+ """
714
+ Chemical element of the adatom
715
+ """
716
+
717
+
718
+ class BasePointDefectConfigurationSchema(BaseModel):
719
+ defect_type: DefectType2
720
+ coordinate: List[float] = Field(..., max_length=3, min_length=3, title="coordinate 3d schema")
721
+ chemical_element: Optional[str] = None
722
+ """
723
+ The chemical element for substitution or interstitial defects
724
+ """
725
+ use_cartesian_coordinates: Optional[bool] = False
726
+ """
727
+ Whether coordinates are in cartesian rather than fractional coordinates
728
+ """
729
+
730
+
731
+ class BasisSchema5(BaseModel):
732
+ elements: List[AtomicElementSchema] = Field(..., title="atomic elements schema")
733
+ """
734
+ atomic elements schema
735
+ """
736
+ coordinates: List[AtomicCoordinateSchema] = Field(..., title="atomic coordinates schema")
737
+ """
738
+ atomic coordinates schema
739
+ """
740
+ units: Optional[BasisUnitsEnum] = Field("crystal", title="basis units enum")
741
+ labels: Optional[List[AtomicLabelSchema]] = Field(None, title="atomic labels schema")
742
+ """
743
+ atomic labels schema
744
+ """
745
+
746
+
747
+ class LatticeVectorsSchema4(BaseModel):
748
+ a: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
749
+ b: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
750
+ c: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
751
+ alat: Optional[float] = 1
752
+ """
753
+ lattice parameter for fractional coordinates
754
+ """
755
+ units: Optional[LatticeVectorsUnitsEnum] = Field("angstrom", title="lattice vectors units enum")
756
+
757
+
758
+ class LatticeUnitsSchema4(BaseModel):
759
+ length: Optional[LatticeUnitsLengthEnum] = Field("angstrom", title="lattice units length enum")
760
+ angle: Optional[LatticeUnitsAngleEnum] = Field("degree", title="lattice units angle enum")
761
+
762
+
763
+ class LatticeSchema4(BaseModel):
764
+ a: float
765
+ """
766
+ length of the first lattice vector
767
+ """
768
+ b: float
769
+ """
770
+ length of the second lattice vector
771
+ """
772
+ c: float
773
+ """
774
+ length of the third lattice vector
775
+ """
776
+ alpha: float
777
+ """
778
+ angle between first and second lattice vector
779
+ """
780
+ beta: float
781
+ """
782
+ angle between second and third lattice vector
783
+ """
784
+ gamma: float
785
+ """
786
+ angle between first and third lattice vector
787
+ """
788
+ vectors: Optional[LatticeVectorsSchema4] = Field(None, title="lattice vectors schema")
789
+ type: Optional[LatticeTypeEnum] = Field("TRI", title="lattice type enum")
790
+ units: Optional[LatticeUnitsSchema4] = Field(
791
+ default_factory=lambda: LatticeUnitsSchema4.model_validate({"length": "angstrom", "angle": "degree"}),
792
+ title="Lattice units schema",
793
+ )
794
+
795
+
796
+ class Name39(Enum):
797
+ volume = "volume"
798
+
799
+
800
+ class Units21(Enum):
801
+ angstrom_3 = "angstrom^3"
802
+
803
+
804
+ class VolumeSchema4(BaseModel):
805
+ name: Literal["0#-datamodel-code-generator-#-object-#-special-#"]
806
+ units: Optional[Units21] = None
807
+ value: float
808
+
809
+
810
+ class Name40(Enum):
811
+ density = "density"
812
+
813
+
814
+ class Units22(Enum):
815
+ g_cm_3 = "g/cm^3"
816
+
817
+
818
+ class DensitySchema4(BaseModel):
819
+ name: Literal["1#-datamodel-code-generator-#-object-#-special-#"]
820
+ units: Optional[Units22] = None
821
+ value: float
822
+
823
+
824
+ class Units23(Enum):
825
+ angstrom = "angstrom"
826
+
827
+
828
+ class ScalarSchema5(BaseModel):
829
+ units: Optional[Units23] = None
830
+ value: float
831
+
832
+
833
+ class Name41(Enum):
834
+ symmetry = "symmetry"
835
+
836
+
837
+ class SymmetrySchema4(BaseModel):
838
+ pointGroupSymbol: Optional[str] = None
839
+ """
840
+ point group symbol in Schoenflies notation
841
+ """
842
+ spaceGroupSymbol: Optional[str] = None
843
+ """
844
+ space group symbol in Hermann–Mauguin notation
845
+ """
846
+ tolerance: Optional[ScalarSchema5] = Field(None, title="scalar schema")
847
+ """
848
+ tolerance used for symmetry calculation
849
+ """
850
+ name: Literal["2#-datamodel-code-generator-#-object-#-special-#"]
851
+
852
+
853
+ class Name42(Enum):
854
+ elemental_ratio = "elemental_ratio"
855
+
856
+
857
+ class ElementalRatio4(BaseModel):
858
+ name: Literal["3#-datamodel-code-generator-#-object-#-special-#"]
859
+ value: confloat(ge=0.0, le=1.0)
860
+ element: Optional[str] = None
861
+ """
862
+ the element this ratio is for
863
+ """
864
+
865
+
866
+ class Name43(Enum):
867
+ p_norm = "p-norm"
868
+
869
+
870
+ class PNorm4(BaseModel):
871
+ name: Literal["4#-datamodel-code-generator-#-object-#-special-#"]
872
+ degree: Optional[int] = None
873
+ """
874
+ degree of the dimensionality of the norm
875
+ """
876
+ value: float
877
+
878
+
879
+ class Name44(Enum):
880
+ inchi = "inchi"
881
+
882
+
883
+ class InChIRepresentationSchema4(BaseModel):
884
+ name: Literal["5#-datamodel-code-generator-#-object-#-special-#"]
885
+ value: str
886
+
887
+
888
+ class Name45(Enum):
889
+ inchi_key = "inchi_key"
890
+
891
+
892
+ class InChIKeyRepresentationSchema4(BaseModel):
893
+ name: Literal["6#-datamodel-code-generator-#-object-#-special-#"]
894
+ value: str
895
+
896
+
897
+ class DerivedPropertiesSchema4(
898
+ RootModel[
899
+ Union[
900
+ VolumeSchema4,
901
+ DensitySchema4,
902
+ SymmetrySchema4,
903
+ ElementalRatio4,
904
+ PNorm4,
905
+ InChIRepresentationSchema4,
906
+ InChIKeyRepresentationSchema4,
907
+ ]
908
+ ]
909
+ ):
910
+ root: Union[
911
+ VolumeSchema4,
912
+ DensitySchema4,
913
+ SymmetrySchema4,
914
+ ElementalRatio4,
915
+ PNorm4,
916
+ InChIRepresentationSchema4,
917
+ InChIKeyRepresentationSchema4,
918
+ ] = Field(..., discriminator="name")
919
+
920
+
921
+ class Name46(Enum):
922
+ default = "default"
923
+ atomsTooClose = "atomsTooClose"
924
+ atomsOverlap = "atomsOverlap"
925
+
926
+
927
+ class MaterialConsistencyCheckSchema4(BaseModel):
928
+ name: Name46
929
+ """
930
+ Name of the consistency check that is performed, which is listed in an enum.
931
+ """
932
+ key: str
933
+ """
934
+ Key of the property of the entity on which the consistency check is performed in Mongo dot notation, e.g. 'basis.coordinates.1'
935
+ """
936
+ severity: Severity
937
+ """
938
+ Severity level of the problem, which is used in UI to differentiate.
939
+ """
940
+ message: str
941
+ """
942
+ Message generated by the consistency check describing the problem.
943
+ """
944
+
945
+
946
+ class MaterialSchema4(BaseModel):
947
+ formula: Optional[str] = None
948
+ """
949
+ reduced chemical formula
950
+ """
951
+ unitCellFormula: Optional[str] = None
952
+ """
953
+ chemical formula based on the number of atoms of each element in the supercell
954
+ """
955
+ basis: BasisSchema5 = Field(..., title="basis schema")
956
+ lattice: LatticeSchema4 = Field(..., title="lattice schema")
957
+ derivedProperties: Optional[List[DerivedPropertiesSchema4]] = Field(None, title="derived properties schema")
958
+ external: Optional[DatabaseSourceSchema] = Field(None, title="database source schema")
959
+ """
960
+ information about a database source
961
+ """
962
+ src: Optional[FileSourceSchema] = Field(None, title="file source schema")
963
+ """
964
+ file source with the information inside
965
+ """
966
+ scaledHash: Optional[str] = None
967
+ """
968
+ Hash string for a scaled structure with lattice vector a set to 1 (eg. for materials under pressure).
969
+ """
970
+ icsdId: Optional[int] = None
971
+ """
972
+ Corresponding ICSD id of the material
973
+ """
974
+ isNonPeriodic: Optional[bool] = None
975
+ """
976
+ Whether to work in the finite molecular picture (usually with atomic orbital basis)
977
+ """
978
+ consistencyChecks: Optional[List[MaterialConsistencyCheckSchema4]] = None
979
+ field_id: Optional[str] = Field(None, alias="_id")
980
+ """
981
+ entity identity
982
+ """
983
+ slug: Optional[str] = None
984
+ """
985
+ entity slug
986
+ """
987
+ systemName: Optional[str] = None
988
+ schemaVersion: Optional[str] = "2022.8.16"
989
+ """
990
+ entity's schema version. Used to distinct between different schemas.
991
+ """
992
+ name: Optional[str] = None
993
+ """
994
+ entity name
995
+ """
996
+ isDefault: Optional[bool] = False
997
+ """
998
+ Identifies that entity is defaultable
999
+ """
1000
+ metadata: Optional[Dict[str, Any]] = None
1001
+
1002
+
1003
+ class AdatomConfigurationWithoutCrystalSchema(BaseModel):
1004
+ crystal: Optional[MaterialSchema4] = Field(None, title="material schema")
1005
+ defect_type: Literal["adatom"] = "adatom"
1006
+ position_on_surface: List[float] = Field(..., max_length=2, min_length=2, title="coordinate 2d schema")
1007
+ distance_z: confloat(ge=0.0)
1008
+ """
1009
+ Distance from the surface in Angstroms
1010
+ """
1011
+ chemical_element: str
1012
+ """
1013
+ Chemical element of the adatom
1014
+ """
1015
+
1016
+
1017
+ class PointDefectPairConfigurationSchema(BaseModel):
1018
+ defect_type: Optional[DefectType] = None
1019
+ primary_defect_configuration: Union[PointDefectConfigurationSchema, AdatomConfigurationSchema]
1020
+ """
1021
+ Primary defect requires explicit crystal definition
1022
+ """
1023
+ secondary_defect_configuration: Union[BasePointDefectConfigurationSchema, AdatomConfigurationWithoutCrystalSchema]
1024
+ """
1025
+ Configuration for the second defect
1026
+ """