@mat3ra/made 2024.11.16-0 → 2024.11.23-0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mat3ra/made",
3
- "version": "2024.11.16-0",
3
+ "version": "2024.11.23-0",
4
4
  "description": "MAterials DEsign library",
5
5
  "scripts": {
6
6
  "lint": "eslint --cache src/js tests/js && prettier --write src/js tests/js",
@@ -452,7 +452,8 @@ class DefectPairBuilder(DefectBuilder):
452
452
  """
453
453
  primary_material = self.create_isolated_defect(primary_defect_configuration)
454
454
  # Remove metadata to allow for independent defect creation
455
- primary_material.metadata["build"] = primary_defect_configuration.crystal.metadata["build"]
455
+ if hasattr(primary_defect_configuration.crystal.metadata, "build"):
456
+ primary_material.metadata["build"] = primary_defect_configuration.crystal.metadata["build"]
456
457
  primary_material.name = primary_defect_configuration.crystal.name
457
458
  secondary_defect_configuration.crystal = primary_material
458
459
  secondary_material = self.create_isolated_defect(secondary_defect_configuration)
@@ -11,6 +11,18 @@ from ..slab.configuration import SlabConfiguration
11
11
 
12
12
 
13
13
  class InterfaceConfiguration(BaseModel, InMemoryEntity):
14
+ """
15
+ Configuration for an interface between two slabs.
16
+
17
+ Args:
18
+ film_configuration (SlabConfiguration): The configuration of the film slab.
19
+ substrate_configuration (SlabConfiguration): The configuration of the substrate slab.
20
+ film_termination (Termination): The termination of the film.
21
+ substrate_termination (Termination): The termination of the substrate.
22
+ distance_z (float): The distance between the film and the substrate in Angstroms.
23
+ vacuum (float): The vacuum thickness, in Angstroms.
24
+ """
25
+
14
26
  film_configuration: SlabConfiguration
15
27
  substrate_configuration: SlabConfiguration
16
28
  film_termination: Termination
@@ -36,6 +48,17 @@ class InterfaceConfiguration(BaseModel, InMemoryEntity):
36
48
 
37
49
 
38
50
  class TwistedInterfaceConfiguration(BaseConfiguration):
51
+ """
52
+ Configuration for creating a twisted interface between two slabs with specified twist angle.
53
+
54
+ Args:
55
+ film (Material): The film material.
56
+ substrate (Material): The substrate material.
57
+ twist_angle (float): Twist angle in degrees.
58
+ distance_z (float): Vertical distance between layers in Angstroms.
59
+ vacuum (float): Vacuum thickness, in Angstroms.
60
+ """
61
+
39
62
  film: Material
40
63
  substrate: Optional[Material] = None
41
64
  twist_angle: float = 0.0
@@ -8,6 +8,15 @@ from ...utils.perturbation import SineWavePerturbationFunctionHolder, Perturbati
8
8
 
9
9
 
10
10
  class PerturbationConfiguration(BaseModel, InMemoryEntity):
11
+ """
12
+ Configuration for a geometrical perturbation.
13
+
14
+ Args:
15
+ material (Material): The Material object.
16
+ perturbation_function_holder (PerturbationFunctionHolder): The perturbation function holder.
17
+ use_cartesian_coordinates (bool): Whether to use cartesian coordinates
18
+ """
19
+
11
20
  material: Material
12
21
  perturbation_function_holder: Union[
13
22
  SineWavePerturbationFunctionHolder, PerturbationFunctionHolder