mat3ra-esse 2025.4.22.post0__py3-none-any.whl → 2025.5.16.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 (47) hide show
  1. mat3ra/esse/data/examples.py +1 -1
  2. mat3ra/esse/data/schemas.py +1 -1
  3. mat3ra/esse/models/apse/materials/builders/slab/pymatgen/__init__.py +3 -0
  4. mat3ra/esse/models/apse/materials/builders/slab/pymatgen/parameters.py +28 -0
  5. mat3ra/esse/models/core/abstract/coordinate_2d.py +13 -0
  6. mat3ra/esse/models/core/reusable/energy.py +2 -2
  7. mat3ra/esse/models/element.py +6 -6
  8. mat3ra/esse/models/material/__init__.py +12 -12
  9. mat3ra/esse/models/material/builders/base/__init__.py +3 -0
  10. mat3ra/esse/models/material/builders/base/selector_parameters.py +16 -0
  11. mat3ra/esse/models/material/builders/single_material/two_dimensional/slab/__init__.py +3 -0
  12. mat3ra/esse/models/material/builders/single_material/two_dimensional/slab/builder_parameters.py +28 -0
  13. mat3ra/esse/models/material/builders/single_material/two_dimensional/slab/selector_parameters.py +27 -0
  14. mat3ra/esse/models/material/reusable/__init__.py +3 -0
  15. mat3ra/esse/models/material/reusable/repetitions.py +25 -0
  16. mat3ra/esse/models/material/reusable/slab/__init__.py +3 -0
  17. mat3ra/esse/models/material/reusable/slab/enums.py +13 -0
  18. mat3ra/esse/models/material/reusable/slab/miller_indices.py +16 -0
  19. mat3ra/esse/models/material/reusable/slab/number_of_layers.py +16 -0
  20. mat3ra/esse/models/material/reusable/slab/termination.py +18 -0
  21. mat3ra/esse/models/material/reusable/slab/vacuum.py +16 -0
  22. mat3ra/esse/models/material/reusable/supercell_matrix_2d.py +25 -0
  23. mat3ra/esse/models/material/reusable/supercell_matrix_3d.py +27 -0
  24. mat3ra/esse/models/materials_category/single_material/two_dimensional/slab/__init__.py +3 -0
  25. mat3ra/esse/models/materials_category/single_material/two_dimensional/slab/configuration.py +445 -0
  26. mat3ra/esse/models/properties_directory/derived_properties.py +13 -13
  27. mat3ra/esse/models/properties_directory/non_scalar/density_of_states.py +2 -2
  28. mat3ra/esse/models/properties_directory/non_scalar/phonon_dispersions.py +2 -2
  29. mat3ra/esse/models/properties_directory/non_scalar/phonon_dos.py +2 -2
  30. mat3ra/esse/models/properties_directory/non_scalar/total_energy_contributions.py +50 -50
  31. mat3ra/esse/models/properties_directory/non_scalar/vibrational_spectrum.py +2 -2
  32. mat3ra/esse/models/properties_directory/scalar/electron_affinity.py +2 -2
  33. mat3ra/esse/models/properties_directory/scalar/fermi_energy.py +2 -2
  34. mat3ra/esse/models/properties_directory/scalar/formation_energy.py +2 -2
  35. mat3ra/esse/models/properties_directory/scalar/ionization_potential.py +2 -2
  36. mat3ra/esse/models/properties_directory/scalar/reaction_energy_barrier.py +2 -2
  37. mat3ra/esse/models/properties_directory/scalar/surface_energy.py +2 -2
  38. mat3ra/esse/models/properties_directory/scalar/total_energy.py +2 -2
  39. mat3ra/esse/models/properties_directory/scalar/valence_band_offset.py +2 -2
  40. mat3ra/esse/models/properties_directory/scalar/zero_point_energy.py +2 -2
  41. mat3ra/esse/models/properties_directory/structural/molecular_pattern.py +4 -4
  42. mat3ra/esse/models/properties_directory/workflow/convergence/ionic.py +2 -2
  43. {mat3ra_esse-2025.4.22.post0.dist-info → mat3ra_esse-2025.5.16.post0.dist-info}/METADATA +1 -1
  44. {mat3ra_esse-2025.4.22.post0.dist-info → mat3ra_esse-2025.5.16.post0.dist-info}/RECORD +47 -27
  45. {mat3ra_esse-2025.4.22.post0.dist-info → mat3ra_esse-2025.5.16.post0.dist-info}/WHEEL +1 -1
  46. {mat3ra_esse-2025.4.22.post0.dist-info → mat3ra_esse-2025.5.16.post0.dist-info}/licenses/LICENSE.md +0 -0
  47. {mat3ra_esse-2025.4.22.post0.dist-info → mat3ra_esse-2025.5.16.post0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,445 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: materials_category/single_material/two_dimensional/slab/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 AtomicElementSchema(BaseModel):
14
+ value: str
15
+ """
16
+ value of this entry
17
+ """
18
+ id: int
19
+ """
20
+ integer id of this entry
21
+ """
22
+
23
+
24
+ class AtomicCoordinateSchema(BaseModel):
25
+ value: List[float] = Field(..., max_length=3, min_length=3, title="coordinate 3d schema")
26
+ """
27
+ value of this entry
28
+ """
29
+ id: int
30
+ """
31
+ integer id of this entry
32
+ """
33
+
34
+
35
+ class BasisUnitsEnum(Enum):
36
+ crystal = "crystal"
37
+ cartesian = "cartesian"
38
+
39
+
40
+ class AtomicLabelSchema(BaseModel):
41
+ value: Union[Union[int, str, float], conint(ge=1, le=9)]
42
+ """
43
+ value of this entry
44
+ """
45
+ id: int
46
+ """
47
+ integer id of this entry
48
+ """
49
+
50
+
51
+ class BasisSchema(BaseModel):
52
+ elements: List[AtomicElementSchema] = Field(..., title="atomic elements schema")
53
+ """
54
+ atomic elements schema
55
+ """
56
+ coordinates: List[AtomicCoordinateSchema] = Field(..., title="atomic coordinates schema")
57
+ """
58
+ atomic coordinates schema
59
+ """
60
+ units: Optional[BasisUnitsEnum] = Field("crystal", title="basis units enum")
61
+ labels: Optional[List[AtomicLabelSchema]] = Field(None, title="atomic labels schema")
62
+ """
63
+ atomic labels schema
64
+ """
65
+
66
+
67
+ class LatticeVectorsUnitsEnum(Enum):
68
+ angstrom = "angstrom"
69
+ bohr = "bohr"
70
+
71
+
72
+ class LatticeVectorsSchema(BaseModel):
73
+ a: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
74
+ b: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
75
+ c: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
76
+ alat: Optional[float] = 1
77
+ """
78
+ lattice parameter for fractional coordinates
79
+ """
80
+ units: Optional[LatticeVectorsUnitsEnum] = Field("angstrom", title="lattice vectors units enum")
81
+
82
+
83
+ class LatticeTypeEnum(Enum):
84
+ CUB = "CUB"
85
+ BCC = "BCC"
86
+ FCC = "FCC"
87
+ TET = "TET"
88
+ MCL = "MCL"
89
+ ORC = "ORC"
90
+ ORCC = "ORCC"
91
+ ORCF = "ORCF"
92
+ ORCI = "ORCI"
93
+ HEX = "HEX"
94
+ BCT = "BCT"
95
+ TRI = "TRI"
96
+ MCLC = "MCLC"
97
+ RHL = "RHL"
98
+
99
+
100
+ class LatticeUnitsLengthEnum(Enum):
101
+ angstrom = "angstrom"
102
+ bohr = "bohr"
103
+
104
+
105
+ class LatticeUnitsAngleEnum(Enum):
106
+ degree = "degree"
107
+ radian = "radian"
108
+
109
+
110
+ class LatticeUnitsSchema(BaseModel):
111
+ length: Optional[LatticeUnitsLengthEnum] = Field("angstrom", title="lattice units length enum")
112
+ angle: Optional[LatticeUnitsAngleEnum] = Field("degree", title="lattice units angle enum")
113
+
114
+
115
+ class LatticeSchema(BaseModel):
116
+ a: float
117
+ """
118
+ length of the first lattice vector
119
+ """
120
+ b: float
121
+ """
122
+ length of the second lattice vector
123
+ """
124
+ c: float
125
+ """
126
+ length of the third lattice vector
127
+ """
128
+ alpha: float
129
+ """
130
+ angle between first and second lattice vector
131
+ """
132
+ beta: float
133
+ """
134
+ angle between second and third lattice vector
135
+ """
136
+ gamma: float
137
+ """
138
+ angle between first and third lattice vector
139
+ """
140
+ vectors: Optional[LatticeVectorsSchema] = Field(None, title="lattice vectors schema")
141
+ type: Optional[LatticeTypeEnum] = Field("TRI", title="lattice type enum")
142
+ units: Optional[LatticeUnitsSchema] = Field(
143
+ default_factory=lambda: LatticeUnitsSchema.model_validate({"length": "angstrom", "angle": "degree"}),
144
+ title="Lattice units schema",
145
+ )
146
+
147
+
148
+ class Name(Enum):
149
+ volume = "volume"
150
+
151
+
152
+ class Units(Enum):
153
+ angstrom_3 = "angstrom^3"
154
+
155
+
156
+ class VolumeSchema(BaseModel):
157
+ name: Literal["0#-datamodel-code-generator-#-object-#-special-#"]
158
+ units: Optional[Units] = None
159
+ value: float
160
+
161
+
162
+ class Name8(Enum):
163
+ density = "density"
164
+
165
+
166
+ class Units10(Enum):
167
+ g_cm_3 = "g/cm^3"
168
+
169
+
170
+ class DensitySchema(BaseModel):
171
+ name: Literal["1#-datamodel-code-generator-#-object-#-special-#"]
172
+ units: Optional[Units10] = None
173
+ value: float
174
+
175
+
176
+ class Units11(Enum):
177
+ angstrom = "angstrom"
178
+
179
+
180
+ class ScalarSchema(BaseModel):
181
+ units: Optional[Units11] = None
182
+ value: float
183
+
184
+
185
+ class Name9(Enum):
186
+ symmetry = "symmetry"
187
+
188
+
189
+ class SymmetrySchema(BaseModel):
190
+ pointGroupSymbol: Optional[str] = None
191
+ """
192
+ point group symbol in Schoenflies notation
193
+ """
194
+ spaceGroupSymbol: Optional[str] = None
195
+ """
196
+ space group symbol in Hermann–Mauguin notation
197
+ """
198
+ tolerance: Optional[ScalarSchema] = Field(None, title="scalar schema")
199
+ """
200
+ tolerance used for symmetry calculation
201
+ """
202
+ name: Literal["2#-datamodel-code-generator-#-object-#-special-#"]
203
+
204
+
205
+ class Name10(Enum):
206
+ elemental_ratio = "elemental_ratio"
207
+
208
+
209
+ class ElementalRatio(BaseModel):
210
+ name: Literal["3#-datamodel-code-generator-#-object-#-special-#"]
211
+ value: confloat(ge=0.0, le=1.0)
212
+ element: Optional[str] = None
213
+ """
214
+ the element this ratio is for
215
+ """
216
+
217
+
218
+ class Name11(Enum):
219
+ p_norm = "p-norm"
220
+
221
+
222
+ class PNorm(BaseModel):
223
+ name: Literal["4#-datamodel-code-generator-#-object-#-special-#"]
224
+ degree: Optional[int] = None
225
+ """
226
+ degree of the dimensionality of the norm
227
+ """
228
+ value: float
229
+
230
+
231
+ class Name12(Enum):
232
+ inchi = "inchi"
233
+
234
+
235
+ class InChIRepresentationSchema(BaseModel):
236
+ name: Literal["5#-datamodel-code-generator-#-object-#-special-#"]
237
+ value: str
238
+
239
+
240
+ class Name13(Enum):
241
+ inchi_key = "inchi_key"
242
+
243
+
244
+ class InChIKeyRepresentationSchema(BaseModel):
245
+ name: Literal["6#-datamodel-code-generator-#-object-#-special-#"]
246
+ value: str
247
+
248
+
249
+ class DerivedPropertiesSchema(
250
+ RootModel[
251
+ Union[
252
+ VolumeSchema,
253
+ DensitySchema,
254
+ SymmetrySchema,
255
+ ElementalRatio,
256
+ PNorm,
257
+ InChIRepresentationSchema,
258
+ InChIKeyRepresentationSchema,
259
+ ]
260
+ ]
261
+ ):
262
+ root: Union[
263
+ VolumeSchema,
264
+ DensitySchema,
265
+ SymmetrySchema,
266
+ ElementalRatio,
267
+ PNorm,
268
+ InChIRepresentationSchema,
269
+ InChIKeyRepresentationSchema,
270
+ ] = Field(..., discriminator="name")
271
+
272
+
273
+ class DatabaseSourceSchema(BaseModel):
274
+ id: Union[str, float]
275
+ """
276
+ 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
277
+ """
278
+ source: str
279
+ """
280
+ Third party source name, e.g. materials project, 2dmatpedia, ICSD, etc.
281
+ """
282
+ origin: bool
283
+ """
284
+ 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).
285
+ """
286
+ data: Optional[Dict[str, Any]] = None
287
+ """
288
+ Original response from external source.
289
+ """
290
+ doi: Optional[str] = None
291
+ """
292
+ Digital Object Identifier, e.g. 10.1088/0953-8984/25/10/105506
293
+ """
294
+ url: Optional[str] = None
295
+ """
296
+ 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
297
+ """
298
+
299
+
300
+ class FileSourceSchema(BaseModel):
301
+ extension: Optional[str] = None
302
+ """
303
+ file extension
304
+ """
305
+ filename: str
306
+ """
307
+ file name without extension
308
+ """
309
+ text: str
310
+ """
311
+ file content as raw text
312
+ """
313
+ hash: str
314
+ """
315
+ MD5 hash based on file content
316
+ """
317
+
318
+
319
+ class Name14(Enum):
320
+ default = "default"
321
+ atomsTooClose = "atomsTooClose"
322
+ atomsOverlap = "atomsOverlap"
323
+
324
+
325
+ class Severity(Enum):
326
+ info = "info"
327
+ warning = "warning"
328
+ error = "error"
329
+
330
+
331
+ class MaterialConsistencyCheckSchema(BaseModel):
332
+ name: Name14
333
+ """
334
+ Name of the consistency check that is performed, which is listed in an enum.
335
+ """
336
+ key: str
337
+ """
338
+ Key of the property of the entity on which the consistency check is performed in Mongo dot notation, e.g. 'basis.coordinates.1'
339
+ """
340
+ severity: Severity
341
+ """
342
+ Severity level of the problem, which is used in UI to differentiate.
343
+ """
344
+ message: str
345
+ """
346
+ Message generated by the consistency check describing the problem.
347
+ """
348
+
349
+
350
+ class MaterialSchema(BaseModel):
351
+ formula: Optional[str] = None
352
+ """
353
+ reduced chemical formula
354
+ """
355
+ unitCellFormula: Optional[str] = None
356
+ """
357
+ chemical formula based on the number of atoms of each element in the supercell
358
+ """
359
+ basis: BasisSchema = Field(..., title="basis schema")
360
+ lattice: LatticeSchema = Field(..., title="lattice schema")
361
+ derivedProperties: Optional[List[DerivedPropertiesSchema]] = Field(None, title="derived properties schema")
362
+ external: Optional[DatabaseSourceSchema] = Field(None, title="database source schema")
363
+ """
364
+ information about a database source
365
+ """
366
+ src: Optional[FileSourceSchema] = Field(None, title="file source schema")
367
+ """
368
+ file source with the information inside
369
+ """
370
+ scaledHash: Optional[str] = None
371
+ """
372
+ Hash string for a scaled structure with lattice vector a set to 1 (eg. for materials under pressure).
373
+ """
374
+ icsdId: Optional[int] = None
375
+ """
376
+ Corresponding ICSD id of the material
377
+ """
378
+ isNonPeriodic: Optional[bool] = None
379
+ """
380
+ Whether to work in the finite molecular picture (usually with atomic orbital basis)
381
+ """
382
+ consistencyChecks: Optional[List[MaterialConsistencyCheckSchema]] = None
383
+ field_id: Optional[str] = Field(None, alias="_id")
384
+ """
385
+ entity identity
386
+ """
387
+ slug: Optional[str] = None
388
+ """
389
+ entity slug
390
+ """
391
+ systemName: Optional[str] = None
392
+ schemaVersion: Optional[str] = "2022.8.16"
393
+ """
394
+ entity's schema version. Used to distinct between different schemas.
395
+ """
396
+ name: Optional[str] = None
397
+ """
398
+ entity name
399
+ """
400
+ isDefault: Optional[bool] = False
401
+ """
402
+ Identifies that entity is defaultable
403
+ """
404
+ metadata: Optional[Dict[str, Any]] = None
405
+
406
+
407
+ class SupercellMatrix2DSchemaItem(RootModel[List[int]]):
408
+ root: List[int]
409
+
410
+
411
+ class SlabConfigurationSchema(BaseModel):
412
+ bulk: Optional[MaterialSchema] = Field(None, title="material schema")
413
+ miller_indices: Optional[List[int]] = Field([0, 0, 1], max_length=3, min_length=3, title="Miller Indices Schema")
414
+ """
415
+ Miller indices for crystallographic plane designation
416
+ """
417
+ number_of_layers: Optional[conint(ge=1)] = Field(1, title="number_of_layers Schema")
418
+ """
419
+ Number of atomic layers in a structural component
420
+ """
421
+ vacuum: Optional[confloat(ge=0.0)] = Field(5, title="Vacuum Schema")
422
+ """
423
+ Vacuum thickness in Angstroms
424
+ """
425
+ xy_supercell_matrix: Optional[List[SupercellMatrix2DSchemaItem]] = Field(
426
+ default_factory=lambda: [SupercellMatrix2DSchemaItem.model_validate(v) for v in [[1, 0], [0, 1]]],
427
+ max_length=2,
428
+ min_length=2,
429
+ title="Supercell Matrix 2D Schema",
430
+ )
431
+ """
432
+ Supercell matrix for xy plane transformations
433
+ """
434
+ use_conventional_cell: Optional[bool] = Field(True, title="Use Conventional Cell")
435
+ """
436
+ Whether to use conventional cell
437
+ """
438
+ use_orthogonal_z: Optional[bool] = Field(False, title="Use Orthogonal Z")
439
+ """
440
+ Whether to make z-axis orthogonal
441
+ """
442
+ make_primitive: Optional[bool] = Field(False, title="Make Primitive")
443
+ """
444
+ Whether to make the slab primitive
445
+ """
@@ -24,30 +24,30 @@ class VolumeSchema(BaseModel):
24
24
  value: float
25
25
 
26
26
 
27
- class Name12(Enum):
27
+ class Name20(Enum):
28
28
  density = "density"
29
29
 
30
30
 
31
- class Units13(Enum):
31
+ class Units16(Enum):
32
32
  g_cm_3 = "g/cm^3"
33
33
 
34
34
 
35
35
  class DensitySchema(BaseModel):
36
36
  name: Literal["1#-datamodel-code-generator-#-object-#-special-#"]
37
- units: Optional[Units13] = None
37
+ units: Optional[Units16] = None
38
38
  value: float
39
39
 
40
40
 
41
- class Units14(Enum):
41
+ class Units17(Enum):
42
42
  angstrom = "angstrom"
43
43
 
44
44
 
45
45
  class ScalarSchema(BaseModel):
46
- units: Optional[Units14] = None
46
+ units: Optional[Units17] = None
47
47
  value: float
48
48
 
49
49
 
50
- class Name13(Enum):
50
+ class Name21(Enum):
51
51
  symmetry = "symmetry"
52
52
 
53
53
 
@@ -67,7 +67,7 @@ class SymmetrySchema(BaseModel):
67
67
  name: Literal["2#-datamodel-code-generator-#-object-#-special-#"]
68
68
 
69
69
 
70
- class Name14(Enum):
70
+ class Name22(Enum):
71
71
  elemental_ratio = "elemental_ratio"
72
72
 
73
73
 
@@ -80,7 +80,7 @@ class ElementalRatio(BaseModel):
80
80
  """
81
81
 
82
82
 
83
- class Name15(Enum):
83
+ class Name23(Enum):
84
84
  p_norm = "p-norm"
85
85
 
86
86
 
@@ -93,7 +93,7 @@ class PNorm(BaseModel):
93
93
  value: float
94
94
 
95
95
 
96
- class Name16(Enum):
96
+ class Name24(Enum):
97
97
  inchi = "inchi"
98
98
 
99
99
 
@@ -102,7 +102,7 @@ class InChIRepresentationSchema(BaseModel):
102
102
  value: str
103
103
 
104
104
 
105
- class Name17(Enum):
105
+ class Name25(Enum):
106
106
  inchi_key = "inchi_key"
107
107
 
108
108
 
@@ -111,7 +111,7 @@ class InChIKeyRepresentationSchema(BaseModel):
111
111
  value: str
112
112
 
113
113
 
114
- class DerivedPropertiesSchema1(
114
+ class DerivedPropertiesSchema(
115
115
  RootModel[
116
116
  Union[
117
117
  VolumeSchema,
@@ -135,5 +135,5 @@ class DerivedPropertiesSchema1(
135
135
  ] = Field(..., discriminator="name")
136
136
 
137
137
 
138
- class DerivedPropertiesSchema(RootModel[List[DerivedPropertiesSchema1]]):
139
- root: List[DerivedPropertiesSchema1] = Field(..., title="derived properties schema")
138
+ class DerivedPropertiesSchema1(RootModel[List[DerivedPropertiesSchema]]):
139
+ root: List[DerivedPropertiesSchema] = Field(..., title="derived properties schema")
@@ -39,7 +39,7 @@ class Label7(Enum):
39
39
  density_of_states = "density of states"
40
40
 
41
41
 
42
- class Units11(Enum):
42
+ class Units14(Enum):
43
43
  states_unitcell = "states/unitcell"
44
44
 
45
45
 
@@ -48,7 +48,7 @@ class AxisSchema10(BaseModel):
48
48
  """
49
49
  label of an axis object
50
50
  """
51
- units: Optional[Units11] = None
51
+ units: Optional[Units14] = None
52
52
  """
53
53
  units for an axis
54
54
  """
@@ -34,7 +34,7 @@ class Label9(Enum):
34
34
  frequency = "frequency"
35
35
 
36
36
 
37
- class Units39(Enum):
37
+ class Units42(Enum):
38
38
  cm_1 = "cm-1"
39
39
  THz = "THz"
40
40
  meV = "meV"
@@ -45,7 +45,7 @@ class AxisSchema12(BaseModel):
45
45
  """
46
46
  label of an axis object
47
47
  """
48
- units: Optional[Units39] = None
48
+ units: Optional[Units42] = None
49
49
  """
50
50
  units for an axis
51
51
  """
@@ -35,7 +35,7 @@ class Label11(Enum):
35
35
  Phonon_DOS = "Phonon DOS"
36
36
 
37
37
 
38
- class Units41(Enum):
38
+ class Units44(Enum):
39
39
  states_cm_1 = "states/cm-1"
40
40
  states_THz = "states/THz"
41
41
  states_meV = "states/meV"
@@ -46,7 +46,7 @@ class AxisSchema14(BaseModel):
46
46
  """
47
47
  label of an axis object
48
48
  """
49
- units: Optional[Units41] = None
49
+ units: Optional[Units44] = None
50
50
  """
51
51
  units for an axis
52
52
  """