@@ -20,7 +20,7 @@ def search(
20
20
gb_plane : list [str ] | None = None ,
21
21
gb_energy : tuple [float , float ] | None = None ,
22
22
pretty_formula : str | None = None ,
23
- rotation_axis : list [str ] | None = None ,
23
+ rotation_axis : tuple [str | float , str | float , str | float ] | None = None ,
24
24
rotation_angle : tuple [float , float ] | None = None ,
25
25
separation_energy : tuple [float , float ] | None = None ,
26
26
sigma : int | None = None ,
@@ -40,8 +40,10 @@ def search(
40
40
material_ids (List[str]): List of Materials Project IDs to query with.
41
41
pretty_formula (str): Formula of the material.
42
42
rotation_angle (Tuple[float,float]): Minimum and maximum rotation angle in degrees to consider.
43
- rotation_axis(List[str]): The Miller index of rotation axis. e.g., [1, 0, 0], [1, 1, 0], and [1, 1, 1]
44
- sigma (int): Sigma value of grain boundary.
43
+ rotation_axis(List[str]): The Miller index of rotation axis.
44
+ A three-tuple of either int or str: e.g.,
45
+ [1, 0, 0], [1, 1, 0], ["1", "1", "1"]
46
+ sigma (int): Sigma value of grain boundary.
45
47
separation_energy (Tuple[float,float]): Minimum and maximum work of separation energy in J/m³ to consider.
46
48
sigma (int): Sigma value of the boundary.
47
49
type (GBTypeEnum): Grain boundary type.
@@ -84,6 +86,10 @@ def search(
84
86
)
85
87
86
88
if rotation_axis :
89
+ if len (rotation_axis ) != 3 :
90
+ raise ValueError (
91
+ '`rotation_axis` should be a three-tuple of either int or str, ex: (1,1,0), ("0","0","1")'
92
+ )
87
93
query_params .update (
88
94
{"rotation_axis" : "," .join ([str (n ) for n in rotation_axis ])}
89
95
)
0 commit comments