mat3ra-esse 2025.4.15.post0__py3-none-any.whl → 2025.4.22.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 (87) 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_3d.py +13 -0
  20. mat3ra/esse/models/core/abstract/kpoint.py +16 -0
  21. mat3ra/esse/models/core/abstract/matrix_3x3.py +17 -0
  22. mat3ra/esse/models/core/abstract/vector_3d.py +13 -0
  23. mat3ra/esse/models/core/abstract/vector_boolean_3d.py +13 -0
  24. mat3ra/esse/models/core/primitive/array_of_ids.py +5 -5
  25. mat3ra/esse/models/core/primitive/object_with_id.py +14 -0
  26. mat3ra/esse/models/core/primitive/object_with_id_and_value.py +20 -0
  27. mat3ra/esse/models/core/reusable/atomic_scalars.py +4 -4
  28. mat3ra/esse/models/core/reusable/atomic_string.py +18 -0
  29. mat3ra/esse/models/core/reusable/atomic_vector.py +20 -0
  30. mat3ra/esse/models/core/reusable/atomic_vectors.py +9 -9
  31. mat3ra/esse/models/core/reusable/band_gap.py +8 -2
  32. mat3ra/esse/models/core/reusable/energy.py +2 -2
  33. mat3ra/esse/models/core/reusable/energy_accuracy_levels/__init__.py +3 -0
  34. mat3ra/esse/models/element.py +6 -6
  35. mat3ra/esse/models/material/__init__.py +70 -56
  36. mat3ra/esse/models/methods_directory/physical/psp/file/__init__.py +129 -0
  37. mat3ra/esse/models/methods_directory/physical/psp/file_data_item/__init__.py +111 -0
  38. mat3ra/esse/models/properties_directory/derived_properties.py +10 -10
  39. mat3ra/esse/models/properties_directory/non_scalar/average_potential_profile.py +2 -2
  40. mat3ra/esse/models/properties_directory/non_scalar/band_gaps.py +12 -3
  41. mat3ra/esse/models/properties_directory/non_scalar/band_structure.py +2 -2
  42. mat3ra/esse/models/properties_directory/non_scalar/density_of_states.py +2 -2
  43. mat3ra/esse/models/properties_directory/non_scalar/phonon_dispersions.py +2 -2
  44. mat3ra/esse/models/properties_directory/non_scalar/phonon_dos.py +2 -2
  45. mat3ra/esse/models/properties_directory/non_scalar/stress_tensor.py +1 -1
  46. mat3ra/esse/models/properties_directory/non_scalar/total_energy_contributions.py +26 -26
  47. mat3ra/esse/models/properties_directory/non_scalar/vibrational_spectrum.py +2 -2
  48. mat3ra/esse/models/properties_directory/scalar/electron_affinity.py +2 -2
  49. mat3ra/esse/models/properties_directory/scalar/fermi_energy.py +2 -2
  50. mat3ra/esse/models/properties_directory/scalar/formation_energy.py +2 -2
  51. mat3ra/esse/models/properties_directory/scalar/ionization_potential.py +2 -2
  52. mat3ra/esse/models/properties_directory/scalar/reaction_energy_barrier.py +2 -2
  53. mat3ra/esse/models/properties_directory/scalar/surface_energy.py +2 -2
  54. mat3ra/esse/models/properties_directory/scalar/total_energy.py +2 -2
  55. mat3ra/esse/models/properties_directory/scalar/valence_band_offset.py +2 -2
  56. mat3ra/esse/models/properties_directory/scalar/zero_point_energy.py +2 -2
  57. mat3ra/esse/models/properties_directory/structural/atomic_forces.py +8 -8
  58. mat3ra/esse/models/properties_directory/structural/basis/__init__.py +38 -16
  59. mat3ra/esse/models/properties_directory/structural/basis/atomic_constraint.py +20 -0
  60. mat3ra/esse/models/properties_directory/structural/basis/atomic_constraints.py +11 -14
  61. mat3ra/esse/models/properties_directory/structural/basis/atomic_constraints_property.py +33 -0
  62. mat3ra/esse/models/properties_directory/structural/basis/atomic_coordinate.py +10 -4
  63. mat3ra/esse/models/properties_directory/structural/basis/atomic_coordinates.py +16 -27
  64. mat3ra/esse/models/properties_directory/structural/basis/atomic_element.py +6 -7
  65. mat3ra/esse/models/properties_directory/structural/basis/atomic_elements.py +27 -0
  66. mat3ra/esse/models/properties_directory/structural/basis/atomic_label.py +11 -5
  67. mat3ra/esse/models/properties_directory/structural/basis/atomic_labels.py +27 -0
  68. mat3ra/esse/models/properties_directory/structural/basis/bonds.py +3 -3
  69. mat3ra/esse/models/properties_directory/structural/basis/units_enum.py +12 -0
  70. mat3ra/esse/models/properties_directory/structural/lattice/__init__.py +16 -24
  71. mat3ra/esse/models/properties_directory/structural/lattice/lattice_vectors.py +12 -21
  72. mat3ra/esse/models/properties_directory/structural/lattice/units/__init__.py +3 -0
  73. mat3ra/esse/models/properties_directory/structural/lattice/units/angle_enum.py +12 -0
  74. mat3ra/esse/models/properties_directory/structural/lattice/units/length_enum.py +12 -0
  75. mat3ra/esse/models/properties_directory/structural/lattice/vectors/__init__.py +26 -0
  76. mat3ra/esse/models/properties_directory/structural/lattice/vectors/units_enum.py +12 -0
  77. mat3ra/esse/models/properties_directory/structural/magnetic_moments.py +8 -8
  78. mat3ra/esse/models/properties_directory/structural/molecular_pattern.py +9 -9
  79. mat3ra/esse/models/properties_directory/structural/patterns/functional_group.py +3 -3
  80. mat3ra/esse/models/properties_directory/structural/patterns/ring.py +3 -3
  81. mat3ra/esse/models/properties_directory/structural/patterns/special_bond.py +3 -3
  82. mat3ra/esse/models/properties_directory/workflow/convergence/ionic.py +2 -2
  83. {mat3ra_esse-2025.4.15.post0.dist-info → mat3ra_esse-2025.4.22.post0.dist-info}/METADATA +1 -1
  84. {mat3ra_esse-2025.4.15.post0.dist-info → mat3ra_esse-2025.4.22.post0.dist-info}/RECORD +87 -49
  85. {mat3ra_esse-2025.4.15.post0.dist-info → mat3ra_esse-2025.4.22.post0.dist-info}/WHEEL +1 -1
  86. {mat3ra_esse-2025.4.15.post0.dist-info → mat3ra_esse-2025.4.22.post0.dist-info}/licenses/LICENSE.md +0 -0
  87. {mat3ra_esse-2025.4.15.post0.dist-info → mat3ra_esse-2025.4.22.post0.dist-info}/top_level.txt +0 -0
@@ -24,11 +24,11 @@ class Units(Enum):
24
24
  eV_atom = "eV/atom"
25
25
 
26
26
 
27
- class Units55(Enum):
27
+ class Units49(Enum):
28
28
  eV_A_2 = "eV/A^2"
29
29
 
30
30
 
31
31
  class SurfaceEnergySchema(BaseModel):
32
32
  name: Name
33
- units: Union[Units, Units55]
33
+ units: Union[Units, Units49]
34
34
  value: float
@@ -24,11 +24,11 @@ class Units(Enum):
24
24
  eV_atom = "eV/atom"
25
25
 
26
26
 
27
- class Units58(Enum):
27
+ class Units52(Enum):
28
28
  eV_A_2 = "eV/A^2"
29
29
 
30
30
 
31
31
  class TotalEnergySchema(BaseModel):
32
32
  name: Name
33
- units: Union[Units, Units58]
33
+ units: Union[Units, Units52]
34
34
  value: float
@@ -24,11 +24,11 @@ class Units(Enum):
24
24
  eV_atom = "eV/atom"
25
25
 
26
26
 
27
- class Units62(Enum):
27
+ class Units56(Enum):
28
28
  eV_A_2 = "eV/A^2"
29
29
 
30
30
 
31
31
  class ValenceBandOffsetSchema(BaseModel):
32
32
  name: Name
33
- units: Union[Units, Units62]
33
+ units: Union[Units, Units56]
34
34
  value: float
@@ -24,11 +24,11 @@ class Units(Enum):
24
24
  eV_atom = "eV/atom"
25
25
 
26
26
 
27
- class Units67(Enum):
27
+ class Units61(Enum):
28
28
  eV_A_2 = "eV/A^2"
29
29
 
30
30
 
31
31
  class ZeroPointEnergySchema(BaseModel):
32
32
  name: Name
33
- units: Union[Units, Units67]
33
+ units: Union[Units, Units61]
34
34
  value: float
@@ -5,7 +5,7 @@
5
5
  from __future__ import annotations
6
6
 
7
7
  from enum import Enum
8
- from typing import List, Optional, Union
8
+ from typing import List, Optional
9
9
 
10
10
  from pydantic import BaseModel, Field
11
11
 
@@ -14,9 +14,12 @@ class Name(Enum):
14
14
  atomic_forces = "atomic_forces"
15
15
 
16
16
 
17
- class AtomicVectorsSchemaItem(BaseModel):
18
- value: Optional[Union[List[float], List[bool]]] = Field(None, title="vector schema")
19
- id: Optional[int] = None
17
+ class AtomicVectorSchema(BaseModel):
18
+ value: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
19
+ """
20
+ value of this entry
21
+ """
22
+ id: int
20
23
  """
21
24
  integer id of this entry
22
25
  """
@@ -33,8 +36,5 @@ class Units(Enum):
33
36
 
34
37
  class AtomicForces(BaseModel):
35
38
  name: Optional[Name] = None
36
- values: Optional[List[AtomicVectorsSchemaItem]] = Field(None, title="atomic vectors schema")
37
- """
38
- array of objects containing integer id each
39
- """
39
+ values: Optional[List[AtomicVectorSchema]] = Field(None, title="atomic vectors schema")
40
40
  units: Optional[Units] = None
@@ -10,33 +10,55 @@ from typing import List, Optional, Union
10
10
  from pydantic import BaseModel, Field, conint
11
11
 
12
12
 
13
- class AtomicElements(BaseModel):
14
- id: float
13
+ class AtomicElementSchema(BaseModel):
15
14
  value: str
16
- occurrence: Optional[float] = None
17
15
  """
18
- Occurrence is for fractional occupations
16
+ value of this entry
17
+ """
18
+ id: int
19
+ """
20
+ integer id of this entry
19
21
  """
20
- oxidationState: Optional[float] = None
21
22
 
22
23
 
23
- class AtomicCoordinate(BaseModel):
24
- id: Optional[float] = None
25
- value: Optional[Union[List[float], List[bool]]] = Field(None, title="vector schema")
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
+ """
26
33
 
27
34
 
28
- class Units(Enum):
35
+ class BasisUnitsEnum(Enum):
29
36
  crystal = "crystal"
30
37
  cartesian = "cartesian"
31
38
 
32
39
 
33
- class AtomicLabel(BaseModel):
34
- id: Optional[float] = None
35
- value: Optional[conint(ge=1, le=9)] = Field(None, title="integer positive single digit")
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
+ """
36
49
 
37
50
 
38
51
  class BasisSchema(BaseModel):
39
- elements: List[AtomicElements]
40
- coordinates: List[AtomicCoordinate]
41
- units: Optional[Units] = "crystal"
42
- labels: Optional[List[AtomicLabel]] = []
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
+ """
@@ -0,0 +1,20 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: properties_directory/structural/basis/atomic_constraint.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import List
8
+
9
+ from pydantic import BaseModel, Field
10
+
11
+
12
+ class AtomicConstraintSchema(BaseModel):
13
+ value: List[bool] = Field(..., title="vector boolean 3d schema")
14
+ """
15
+ value of this entry
16
+ """
17
+ id: int
18
+ """
19
+ integer id of this entry
20
+ """
@@ -4,27 +4,24 @@
4
4
 
5
5
  from __future__ import annotations
6
6
 
7
- from enum import Enum
8
- from typing import List, Optional, Union
7
+ from typing import List
9
8
 
10
- from pydantic import BaseModel, Field
9
+ from pydantic import BaseModel, Field, RootModel
11
10
 
12
11
 
13
- class Name(Enum):
14
- atomic_constraints = "atomic_constraints"
15
-
16
-
17
- class AtomicVectorsSchemaItem(BaseModel):
18
- value: Optional[Union[List[float], List[bool]]] = Field(None, title="vector schema")
19
- id: Optional[int] = None
12
+ class AtomicConstraintSchema(BaseModel):
13
+ value: List[bool] = Field(..., title="vector boolean 3d schema")
14
+ """
15
+ value of this entry
16
+ """
17
+ id: int
20
18
  """
21
19
  integer id of this entry
22
20
  """
23
21
 
24
22
 
25
- class AtomicConstraints(BaseModel):
26
- name: Optional[Name] = None
27
- values: Optional[List[AtomicVectorsSchemaItem]] = Field(None, title="atomic vectors schema")
23
+ class AtomicConstraintsSchema(RootModel[List[AtomicConstraintSchema]]):
24
+ root: List[AtomicConstraintSchema] = Field(..., title="atomic constraints schema")
28
25
  """
29
- array of objects containing integer id each
26
+ atomic constraints schema
30
27
  """
@@ -0,0 +1,33 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: properties_directory/structural/basis/atomic_constraints_property.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import List, Optional
9
+
10
+ from pydantic import BaseModel, Field
11
+
12
+
13
+ class Name(Enum):
14
+ atomic_constraints = "atomic_constraints"
15
+
16
+
17
+ class AtomicConstraintSchema(BaseModel):
18
+ value: List[bool] = Field(..., title="vector boolean 3d schema")
19
+ """
20
+ value of this entry
21
+ """
22
+ id: int
23
+ """
24
+ integer id of this entry
25
+ """
26
+
27
+
28
+ class AtomicConstraintsPropertySchema(BaseModel):
29
+ name: Optional[Name] = None
30
+ values: Optional[List[AtomicConstraintSchema]] = Field(None, title="atomic constraints schema")
31
+ """
32
+ atomic constraints schema
33
+ """
@@ -4,11 +4,17 @@
4
4
 
5
5
  from __future__ import annotations
6
6
 
7
- from typing import List, Optional, Union
7
+ from typing import List
8
8
 
9
9
  from pydantic import BaseModel, Field
10
10
 
11
11
 
12
- class AtomicCoordinate(BaseModel):
13
- id: Optional[float] = None
14
- value: Optional[Union[List[float], List[bool]]] = Field(None, title="vector schema")
12
+ class AtomicCoordinateSchema(BaseModel):
13
+ value: List[float] = Field(..., max_length=3, min_length=3, title="coordinate 3d schema")
14
+ """
15
+ value of this entry
16
+ """
17
+ id: int
18
+ """
19
+ integer id of this entry
20
+ """
@@ -4,35 +4,24 @@
4
4
 
5
5
  from __future__ import annotations
6
6
 
7
- from enum import Enum
8
- from typing import List, Optional, Union
7
+ from typing import List
9
8
 
10
- from pydantic import BaseModel, Field
9
+ from pydantic import BaseModel, Field, RootModel
11
10
 
12
11
 
13
- class Name(Enum):
14
- atomic_coordinates = "atomic_coordinates"
12
+ class AtomicCoordinateSchema(BaseModel):
13
+ value: List[float] = Field(..., max_length=3, min_length=3, title="coordinate 3d schema")
14
+ """
15
+ value of this entry
16
+ """
17
+ id: int
18
+ """
19
+ integer id of this entry
20
+ """
15
21
 
16
22
 
17
- class AtomicCoordinate(BaseModel):
18
- id: Optional[float] = None
19
- value: Optional[Union[List[float], List[bool]]] = Field(None, title="vector schema")
20
-
21
-
22
- class Units(Enum):
23
- km = "km"
24
- m = "m"
25
- cm = "cm"
26
- mm = "mm"
27
- um = "um"
28
- nm = "nm"
29
- angstrom = "angstrom"
30
- a_u_ = "a.u."
31
- bohr = "bohr"
32
- pm = "pm"
33
-
34
-
35
- class AtomicCoordinates(BaseModel):
36
- name: Optional[Name] = None
37
- values: Optional[List[AtomicCoordinate]] = None
38
- units: Optional[Units] = None
23
+ class AtomicCoordinatesSchema(RootModel[List[AtomicCoordinateSchema]]):
24
+ root: List[AtomicCoordinateSchema] = Field(..., title="atomic coordinates schema")
25
+ """
26
+ atomic coordinates schema
27
+ """
@@ -4,16 +4,15 @@
4
4
 
5
5
  from __future__ import annotations
6
6
 
7
- from typing import Optional
8
-
9
7
  from pydantic import BaseModel
10
8
 
11
9
 
12
- class AtomicElements(BaseModel):
13
- id: float
10
+ class AtomicElementSchema(BaseModel):
14
11
  value: str
15
- occurrence: Optional[float] = None
16
12
  """
17
- Occurrence is for fractional occupations
13
+ value of this entry
14
+ """
15
+ id: int
16
+ """
17
+ integer id of this entry
18
18
  """
19
- oxidationState: Optional[float] = None
@@ -0,0 +1,27 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: properties_directory/structural/basis/atomic_elements.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import List
8
+
9
+ from pydantic import BaseModel, Field, RootModel
10
+
11
+
12
+ class AtomicElementSchema(BaseModel):
13
+ value: str
14
+ """
15
+ value of this entry
16
+ """
17
+ id: int
18
+ """
19
+ integer id of this entry
20
+ """
21
+
22
+
23
+ class AtomicElementsSchema(RootModel[List[AtomicElementSchema]]):
24
+ root: List[AtomicElementSchema] = Field(..., title="atomic elements schema")
25
+ """
26
+ atomic elements schema
27
+ """
@@ -4,11 +4,17 @@
4
4
 
5
5
  from __future__ import annotations
6
6
 
7
- from typing import Optional
7
+ from typing import Union
8
8
 
9
- from pydantic import BaseModel, Field, conint
9
+ from pydantic import BaseModel, conint
10
10
 
11
11
 
12
- class AtomicLabel(BaseModel):
13
- id: Optional[float] = None
14
- value: Optional[conint(ge=1, le=9)] = Field(None, title="integer positive single digit")
12
+ class AtomicLabelSchema(BaseModel):
13
+ value: Union[Union[int, str, float], conint(ge=1, le=9)]
14
+ """
15
+ value of this entry
16
+ """
17
+ id: int
18
+ """
19
+ integer id of this entry
20
+ """
@@ -0,0 +1,27 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: properties_directory/structural/basis/atomic_labels.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import List, Union
8
+
9
+ from pydantic import BaseModel, Field, RootModel, conint
10
+
11
+
12
+ class AtomicLabelSchema(BaseModel):
13
+ value: Union[Union[int, str, float], conint(ge=1, le=9)]
14
+ """
15
+ value of this entry
16
+ """
17
+ id: int
18
+ """
19
+ integer id of this entry
20
+ """
21
+
22
+
23
+ class AtomicLabelsSchema(RootModel[List[AtomicLabelSchema]]):
24
+ root: List[AtomicLabelSchema] = Field(..., title="atomic labels schema")
25
+ """
26
+ atomic labels schema
27
+ """
@@ -10,8 +10,8 @@ from typing import List, Optional
10
10
  from pydantic import BaseModel, Field, RootModel
11
11
 
12
12
 
13
- class AtomicId(BaseModel):
14
- id: Optional[int] = None
13
+ class ObjectWithId(BaseModel):
14
+ id: int
15
15
  """
16
16
  integer id of this entry
17
17
  """
@@ -29,7 +29,7 @@ class BondType(Enum):
29
29
 
30
30
 
31
31
  class BondsSchemaItem(BaseModel):
32
- atomPair: Optional[List[AtomicId]] = Field(None, max_length=2, min_length=2, title="atomic ids")
32
+ atomPair: Optional[List[ObjectWithId]] = Field(None, max_length=2, min_length=2, title="array of ids")
33
33
  """
34
34
  indices of the two connected atoms
35
35
  """
@@ -0,0 +1,12 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: properties_directory/structural/basis/units_enum.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+
9
+
10
+ class BasisUnitsEnum(Enum):
11
+ crystal = "crystal"
12
+ cartesian = "cartesian"
@@ -10,28 +10,20 @@ from typing import List, Optional
10
10
  from pydantic import BaseModel, Field
11
11
 
12
12
 
13
- class Units(Enum):
14
- km = "km"
15
- m = "m"
16
- cm = "cm"
17
- mm = "mm"
18
- um = "um"
19
- nm = "nm"
13
+ class LatticeVectorsUnitsEnum(Enum):
20
14
  angstrom = "angstrom"
21
- a_u_ = "a.u."
22
15
  bohr = "bohr"
23
- pm = "pm"
24
16
 
25
17
 
26
- class LatticeExplicitUnit(BaseModel):
18
+ class LatticeVectorsSchema(BaseModel):
19
+ a: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
20
+ b: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
21
+ c: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
27
22
  alat: Optional[float] = 1
28
23
  """
29
24
  lattice parameter for fractional coordinates
30
25
  """
31
- units: Optional[Units] = None
32
- a: List[float] = Field(..., max_length=3, min_length=3, title="array of 3 number elements schema")
33
- b: List[float] = Field(..., max_length=3, min_length=3, title="array of 3 number elements schema")
34
- c: List[float] = Field(..., max_length=3, min_length=3, title="array of 3 number elements schema")
26
+ units: Optional[LatticeVectorsUnitsEnum] = Field("angstrom", title="lattice vectors units enum")
35
27
 
36
28
 
37
29
  class LatticeTypeEnum(Enum):
@@ -51,28 +43,22 @@ class LatticeTypeEnum(Enum):
51
43
  RHL = "RHL"
52
44
 
53
45
 
54
- class Length(Enum):
46
+ class LatticeUnitsLengthEnum(Enum):
55
47
  angstrom = "angstrom"
56
48
  bohr = "bohr"
57
49
 
58
50
 
59
- class Angle(Enum):
51
+ class LatticeUnitsAngleEnum(Enum):
60
52
  degree = "degree"
61
53
  radian = "radian"
62
54
 
63
55
 
64
56
  class LatticeUnitsSchema(BaseModel):
65
- length: Optional[Length] = "angstrom"
66
- angle: Optional[Angle] = "degree"
57
+ length: Optional[LatticeUnitsLengthEnum] = Field("angstrom", title="lattice units length enum")
58
+ angle: Optional[LatticeUnitsAngleEnum] = Field("degree", title="lattice units angle enum")
67
59
 
68
60
 
69
61
  class LatticeSchema(BaseModel):
70
- vectors: Optional[LatticeExplicitUnit] = Field(None, title="lattice explicit unit")
71
- type: Optional[LatticeTypeEnum] = Field("TRI", title="lattice type enum")
72
- units: Optional[LatticeUnitsSchema] = Field(
73
- default_factory=lambda: LatticeUnitsSchema.model_validate({"length": "angstrom", "angle": "degree"}),
74
- title="Lattice units schema",
75
- )
76
62
  a: float
77
63
  """
78
64
  length of the first lattice vector
@@ -97,3 +83,9 @@ class LatticeSchema(BaseModel):
97
83
  """
98
84
  angle between first and third lattice vector
99
85
  """
86
+ vectors: Optional[LatticeVectorsSchema] = Field(None, title="lattice vectors schema")
87
+ type: Optional[LatticeTypeEnum] = Field("TRI", title="lattice type enum")
88
+ units: Optional[LatticeUnitsSchema] = Field(
89
+ default_factory=lambda: LatticeUnitsSchema.model_validate({"length": "angstrom", "angle": "degree"}),
90
+ title="Lattice units schema",
91
+ )
@@ -5,30 +5,21 @@
5
5
  from __future__ import annotations
6
6
 
7
7
  from enum import Enum
8
- from typing import List, Optional
8
+ from typing import Optional
9
9
 
10
10
  from pydantic import BaseModel, Field
11
11
 
12
12
 
13
- class Units(Enum):
14
- km = "km"
15
- m = "m"
16
- cm = "cm"
17
- mm = "mm"
18
- um = "um"
19
- nm = "nm"
13
+ class LatticeUnitsLengthEnum(Enum):
20
14
  angstrom = "angstrom"
21
- a_u_ = "a.u."
22
15
  bohr = "bohr"
23
- pm = "pm"
24
-
25
-
26
- class LatticeExplicitUnit(BaseModel):
27
- alat: Optional[float] = 1
28
- """
29
- lattice parameter for fractional coordinates
30
- """
31
- units: Optional[Units] = None
32
- a: List[float] = Field(..., max_length=3, min_length=3, title="array of 3 number elements schema")
33
- b: List[float] = Field(..., max_length=3, min_length=3, title="array of 3 number elements schema")
34
- c: List[float] = Field(..., max_length=3, min_length=3, title="array of 3 number elements schema")
16
+
17
+
18
+ class LatticeUnitsAngleEnum(Enum):
19
+ degree = "degree"
20
+ radian = "radian"
21
+
22
+
23
+ class LatticeUnitsSchema(BaseModel):
24
+ length: Optional[LatticeUnitsLengthEnum] = Field("angstrom", title="lattice units length enum")
25
+ angle: Optional[LatticeUnitsAngleEnum] = Field("degree", title="lattice units angle enum")
@@ -0,0 +1,3 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: schema
3
+ # version: 0.28.5
@@ -0,0 +1,12 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: properties_directory/structural/lattice/units/angle_enum.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+
9
+
10
+ class LatticeUnitsAngleEnum(Enum):
11
+ degree = "degree"
12
+ radian = "radian"
@@ -0,0 +1,12 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: properties_directory/structural/lattice/units/length_enum.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+
9
+
10
+ class LatticeUnitsLengthEnum(Enum):
11
+ angstrom = "angstrom"
12
+ bohr = "bohr"
@@ -0,0 +1,26 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: properties_directory/structural/lattice/vectors.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import List, Optional
9
+
10
+ from pydantic import BaseModel, Field
11
+
12
+
13
+ class LatticeVectorsUnitsEnum(Enum):
14
+ angstrom = "angstrom"
15
+ bohr = "bohr"
16
+
17
+
18
+ class LatticeVectorsSchema(BaseModel):
19
+ a: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
20
+ b: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
21
+ c: List[float] = Field(..., max_length=3, min_length=3, title="vector 3d schema")
22
+ alat: Optional[float] = 1
23
+ """
24
+ lattice parameter for fractional coordinates
25
+ """
26
+ units: Optional[LatticeVectorsUnitsEnum] = Field("angstrom", title="lattice vectors units enum")
@@ -0,0 +1,12 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: properties_directory/structural/lattice/vectors/units_enum.json
3
+ # version: 0.28.5
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+
9
+
10
+ class LatticeVectorsUnitsEnum(Enum):
11
+ angstrom = "angstrom"
12
+ bohr = "bohr"