mat3ra-esse 2025.4.17.post0__py3-none-any.whl → 2025.5.13.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 (101) hide show
  1. mat3ra/esse/data/examples.py +1 -1
  2. mat3ra/esse/data/schemas.py +1 -1
  3. mat3ra/esse/models/apse/db/nist_jarvis/2024_3.13/__init__.py +3 -0
  4. mat3ra/esse/models/apse/db/nist_jarvis/2024_3.13/atoms.py +41 -0
  5. mat3ra/esse/models/apse/db/nist_jarvis/2024_3.13/db_entry.py +55 -0
  6. mat3ra/esse/models/apse/file/applications/espresso/7.2/__init__.py +3 -0
  7. mat3ra/esse/models/apse/file/applications/espresso/7.2/pw.x/__init__.py +3 -0
  8. mat3ra/esse/models/apse/file/applications/espresso/7.2/pw.x/atomic_positions.py +51 -0
  9. mat3ra/esse/models/apse/file/applications/espresso/7.2/pw.x/atomic_species.py +34 -0
  10. mat3ra/esse/models/apse/file/applications/espresso/7.2/pw.x/cell.py +111 -0
  11. mat3ra/esse/models/apse/file/applications/espresso/7.2/pw.x/cell_parameters.py +36 -0
  12. mat3ra/esse/models/apse/file/applications/espresso/7.2/pw.x/control.py +169 -0
  13. mat3ra/esse/models/apse/file/applications/espresso/7.2/pw.x/electrons.py +139 -0
  14. mat3ra/esse/models/apse/file/applications/espresso/7.2/pw.x/hubbard.py +194 -0
  15. mat3ra/esse/models/apse/file/applications/espresso/7.2/pw.x/ions.py +422 -0
  16. mat3ra/esse/models/apse/file/applications/espresso/7.2/pw.x/k_points.py +73 -0
  17. mat3ra/esse/models/apse/file/applications/espresso/7.2/pw.x/system.py +841 -0
  18. mat3ra/esse/models/apse/file/applications/espresso/7.2/pw_x.py +1990 -0
  19. mat3ra/esse/models/core/abstract/coordinate_2d.py +13 -0
  20. mat3ra/esse/models/core/abstract/coordinate_3d.py +13 -0
  21. mat3ra/esse/models/core/abstract/kpoint.py +16 -0
  22. mat3ra/esse/models/core/abstract/matrix_3x3.py +17 -0
  23. mat3ra/esse/models/core/abstract/vector_3d.py +13 -0
  24. mat3ra/esse/models/core/abstract/vector_boolean_3d.py +13 -0
  25. mat3ra/esse/models/core/primitive/array_of_ids.py +5 -5
  26. mat3ra/esse/models/core/primitive/object_with_id.py +14 -0
  27. mat3ra/esse/models/core/primitive/object_with_id_and_value.py +20 -0
  28. mat3ra/esse/models/core/reusable/atomic_scalars.py +4 -4
  29. mat3ra/esse/models/core/reusable/atomic_string.py +18 -0
  30. mat3ra/esse/models/core/reusable/atomic_vector.py +20 -0
  31. mat3ra/esse/models/core/reusable/atomic_vectors.py +9 -9
  32. mat3ra/esse/models/core/reusable/band_gap.py +8 -2
  33. mat3ra/esse/models/core/reusable/energy.py +2 -2
  34. mat3ra/esse/models/core/reusable/energy_accuracy_levels/__init__.py +3 -0
  35. mat3ra/esse/models/element.py +6 -6
  36. mat3ra/esse/models/material/__init__.py +68 -46
  37. mat3ra/esse/models/material/reusable/__init__.py +3 -0
  38. mat3ra/esse/models/material/reusable/repetitions.py +25 -0
  39. mat3ra/esse/models/material/reusable/slab/__init__.py +3 -0
  40. mat3ra/esse/models/material/reusable/slab/enums.py +13 -0
  41. mat3ra/esse/models/material/reusable/slab/miller_indices.py +16 -0
  42. mat3ra/esse/models/material/reusable/slab/number_of_layers.py +16 -0
  43. mat3ra/esse/models/material/reusable/slab/termination.py +18 -0
  44. mat3ra/esse/models/material/reusable/slab/thickness.py +16 -0
  45. mat3ra/esse/models/material/reusable/slab/vacuum.py +16 -0
  46. mat3ra/esse/models/material/reusable/supercell_matrix_2d.py +25 -0
  47. mat3ra/esse/models/material/reusable/supercell_matrix_3d.py +27 -0
  48. mat3ra/esse/models/materials_category/single_material/two_dimensional/slab/__init__.py +3 -0
  49. mat3ra/esse/models/materials_category/single_material/two_dimensional/slab/configuration.py +445 -0
  50. mat3ra/esse/models/methods_directory/physical/psp/file/__init__.py +129 -0
  51. mat3ra/esse/models/methods_directory/physical/psp/file_data_item/__init__.py +111 -0
  52. mat3ra/esse/models/properties_directory/derived_properties.py +13 -13
  53. mat3ra/esse/models/properties_directory/non_scalar/average_potential_profile.py +2 -2
  54. mat3ra/esse/models/properties_directory/non_scalar/band_gaps.py +12 -3
  55. mat3ra/esse/models/properties_directory/non_scalar/band_structure.py +2 -2
  56. mat3ra/esse/models/properties_directory/non_scalar/density_of_states.py +2 -2
  57. mat3ra/esse/models/properties_directory/non_scalar/phonon_dispersions.py +2 -2
  58. mat3ra/esse/models/properties_directory/non_scalar/phonon_dos.py +2 -2
  59. mat3ra/esse/models/properties_directory/non_scalar/stress_tensor.py +1 -1
  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/atomic_forces.py +8 -8
  72. mat3ra/esse/models/properties_directory/structural/basis/__init__.py +38 -16
  73. mat3ra/esse/models/properties_directory/structural/basis/atomic_constraint.py +20 -0
  74. mat3ra/esse/models/properties_directory/structural/basis/atomic_constraints.py +11 -14
  75. mat3ra/esse/models/properties_directory/structural/basis/atomic_constraints_property.py +33 -0
  76. mat3ra/esse/models/properties_directory/structural/basis/atomic_coordinate.py +10 -4
  77. mat3ra/esse/models/properties_directory/structural/basis/atomic_coordinates.py +16 -27
  78. mat3ra/esse/models/properties_directory/structural/basis/atomic_element.py +6 -7
  79. mat3ra/esse/models/properties_directory/structural/basis/atomic_elements.py +27 -0
  80. mat3ra/esse/models/properties_directory/structural/basis/atomic_label.py +11 -5
  81. mat3ra/esse/models/properties_directory/structural/basis/atomic_labels.py +27 -0
  82. mat3ra/esse/models/properties_directory/structural/basis/bonds.py +3 -3
  83. mat3ra/esse/models/properties_directory/structural/basis/units_enum.py +12 -0
  84. mat3ra/esse/models/properties_directory/structural/lattice/__init__.py +16 -16
  85. mat3ra/esse/models/properties_directory/structural/lattice/lattice_vectors.py +10 -11
  86. mat3ra/esse/models/properties_directory/structural/lattice/units/__init__.py +3 -0
  87. mat3ra/esse/models/properties_directory/structural/lattice/units/angle_enum.py +12 -0
  88. mat3ra/esse/models/properties_directory/structural/lattice/units/length_enum.py +12 -0
  89. mat3ra/esse/models/properties_directory/structural/lattice/vectors/__init__.py +26 -0
  90. mat3ra/esse/models/properties_directory/structural/lattice/vectors/units_enum.py +12 -0
  91. mat3ra/esse/models/properties_directory/structural/magnetic_moments.py +8 -8
  92. mat3ra/esse/models/properties_directory/structural/molecular_pattern.py +9 -9
  93. mat3ra/esse/models/properties_directory/structural/patterns/functional_group.py +3 -3
  94. mat3ra/esse/models/properties_directory/structural/patterns/ring.py +3 -3
  95. mat3ra/esse/models/properties_directory/structural/patterns/special_bond.py +3 -3
  96. mat3ra/esse/models/properties_directory/workflow/convergence/ionic.py +2 -2
  97. {mat3ra_esse-2025.4.17.post0.dist-info → mat3ra_esse-2025.5.13.post0.dist-info}/METADATA +1 -1
  98. {mat3ra_esse-2025.4.17.post0.dist-info → mat3ra_esse-2025.5.13.post0.dist-info}/RECORD +101 -49
  99. {mat3ra_esse-2025.4.17.post0.dist-info → mat3ra_esse-2025.5.13.post0.dist-info}/WHEEL +1 -1
  100. {mat3ra_esse-2025.4.17.post0.dist-info → mat3ra_esse-2025.5.13.post0.dist-info}/licenses/LICENSE.md +0 -0
  101. {mat3ra_esse-2025.4.17.post0.dist-info → mat3ra_esse-2025.5.13.post0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,16 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: material/reusable/slab/number_of_layers.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Optional
8
+
9
+ from pydantic import Field, RootModel, conint
10
+
11
+
12
+ class number_of_layersSchema(RootModel[Optional[conint(ge=1)]]):
13
+ root: Optional[conint(ge=1)] = Field(1, title="number_of_layers Schema")
14
+ """
15
+ Number of atomic layers in a structural component
16
+ """
@@ -0,0 +1,16 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: material/reusable/slab/vacuum.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Optional
8
+
9
+ from pydantic import Field, RootModel, confloat
10
+
11
+
12
+ class VacuumSchema(RootModel[Optional[confloat(ge=0.0)]]):
13
+ root: Optional[confloat(ge=0.0)] = Field(5, title="Vacuum Schema")
14
+ """
15
+ Vacuum thickness in Angstroms
16
+ """
@@ -0,0 +1,25 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: material/reusable/supercell_matrix_2d.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import List, Optional
8
+
9
+ from pydantic import Field, RootModel
10
+
11
+
12
+ class SupercellMatrix2DSchemaItem(RootModel[List[int]]):
13
+ root: List[int]
14
+
15
+
16
+ class SupercellMatrix2DSchema(RootModel[Optional[List[SupercellMatrix2DSchemaItem]]]):
17
+ root: Optional[List[SupercellMatrix2DSchemaItem]] = Field(
18
+ default_factory=lambda: [SupercellMatrix2DSchemaItem.model_validate(v) for v in [[1, 0], [0, 1]]],
19
+ max_length=2,
20
+ min_length=2,
21
+ title="Supercell Matrix 2D Schema",
22
+ )
23
+ """
24
+ Supercell matrix for xy plane transformations
25
+ """
@@ -0,0 +1,27 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: material/reusable/supercell_matrix_3d.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import List, Optional
8
+
9
+ from pydantic import Field, RootModel
10
+
11
+
12
+ class SupercellMatrix3DSchemaItem(RootModel[List[int]]):
13
+ root: List[int]
14
+
15
+
16
+ class SupercellMatrix3DSchema(RootModel[Optional[List[SupercellMatrix3DSchemaItem]]]):
17
+ root: Optional[List[SupercellMatrix3DSchemaItem]] = Field(
18
+ default_factory=lambda: [
19
+ SupercellMatrix3DSchemaItem.model_validate(v) for v in [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
20
+ ],
21
+ max_length=3,
22
+ min_length=3,
23
+ title="Supercell Matrix 3D Schema",
24
+ )
25
+ """
26
+ 3x3 matrix of integers for transforming a unit cell into a supercell
27
+ """
@@ -0,0 +1,3 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: schema
3
+ # version: 0.28.5
@@ -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
+ """
@@ -0,0 +1,129 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: methods_directory/physical/psp/file.json
3
+ # version: 0.25.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import Any, Dict, List, Optional
9
+
10
+ from pydantic import BaseModel, ConfigDict, Field, confloat, conint, constr
11
+
12
+ from ..Reusable_schema_for_energy_value_with_unit_corresponding_to_a_specific_accuracy_level__e import (
13
+ g,
14
+ )
15
+
16
+
17
+ class Slug(Enum):
18
+ pseudopotential = "pseudopotential"
19
+
20
+
21
+ class Type(Enum):
22
+ us = "us"
23
+ nc = "nc"
24
+ nc_fr = "nc-fr"
25
+ paw = "paw"
26
+ coulomb = "coulomb"
27
+
28
+
29
+ class ExchangeCorrelation(BaseModel):
30
+ approximation: Optional[str] = None
31
+ """
32
+ DFT approximation
33
+ """
34
+ functional: Optional[str] = None
35
+ """
36
+ Exchange correlation functional
37
+ """
38
+ path: Optional[str] = Field(None, title="category path schema")
39
+ """
40
+ TODO: Use regex once schema draft version has been updated
41
+ """
42
+
43
+
44
+ class AtomicOrbitalSchema(BaseModel):
45
+ orbitalName: Optional[constr(pattern=r"^[1-7][sSpPdDfF]$")] = None
46
+ orbitalIndex: Optional[conint(ge=1)] = None
47
+ principalNumber: Optional[conint(ge=1, le=7)] = None
48
+ angularMomentum: Optional[conint(ge=0, le=3)] = None
49
+ occupation: Optional[confloat(ge=0.0, le=14.0)] = None
50
+ """
51
+ Shell occupation
52
+ """
53
+
54
+
55
+ class Name(Enum):
56
+ pseudopotential = "pseudopotential"
57
+
58
+
59
+ class Cutoffs(BaseModel):
60
+ model_config = ConfigDict(
61
+ extra="forbid",
62
+ )
63
+ wavefunction: Optional[List[g.FieldUsedForSuggestedWavefunctionAndChargeDensityCutoffs]] = None
64
+ """
65
+ Energy cutoff values for wavefunction plane wave expansion.
66
+ """
67
+ density: Optional[List[g.FieldUsedForSuggestedWavefunctionAndChargeDensityCutoffs]] = None
68
+ """
69
+ Energy cutoff values for charge density plane wave expansion.
70
+ """
71
+
72
+
73
+ class FileDataItem(BaseModel):
74
+ element: str
75
+ """
76
+ chemical element
77
+ """
78
+ hash: Optional[str] = None
79
+ """
80
+ MD5 hash of the pseudopotential file
81
+ """
82
+ type: Type
83
+ source: str
84
+ """
85
+ explains where this came from
86
+ """
87
+ version: Optional[str] = None
88
+ """
89
+ explains the version of where this came from
90
+ """
91
+ exchangeCorrelation: ExchangeCorrelation
92
+ valenceConfiguration: Optional[List[AtomicOrbitalSchema]] = None
93
+ """
94
+ contains pseudo orbital information, including orbital names and occupations
95
+ """
96
+ path: str
97
+ """
98
+ location of the pseudopotential file on filesystem
99
+ """
100
+ apps: List[str]
101
+ """
102
+ The names of the simulation engines that can use this pseudopotential, e.g. espresso
103
+ """
104
+ filename: Optional[str] = None
105
+ """
106
+ filename of pseudopotential file on filesystem
107
+ """
108
+ name: Optional[Name] = None
109
+ """
110
+ name of the data category
111
+ """
112
+ cutoffs: Optional[Cutoffs] = None
113
+ """
114
+ Suggested cutoff values for wave function and charge density.
115
+ """
116
+
117
+
118
+ class Source(BaseModel):
119
+ info: Optional[Dict[str, Any]] = None
120
+ type: Optional[str] = None
121
+
122
+
123
+ class PseudopotentialFile(BaseModel):
124
+ slug: Optional[Slug] = None
125
+ data: Optional[FileDataItem] = Field(None, title="File data item")
126
+ source: Optional[Source] = None
127
+ """
128
+ TODO: remove in the future
129
+ """