@@ -16,6 +16,7 @@ class PhononRester(BaseRester[PhononBSDOSDoc]):
16
16
def search (
17
17
self ,
18
18
material_ids : str | list [str ] | None = None ,
19
+ phonon_method : str | None = None ,
19
20
num_chunks : int | None = None ,
20
21
chunk_size : int = 1000 ,
21
22
all_fields : bool = True ,
@@ -26,6 +27,7 @@ def search(
26
27
Arguments:
27
28
material_ids (str, List[str]): A single Material ID string or list of strings
28
29
(e.g., mp-149, [mp-149, mp-13]).
30
+ phonon_method (str): phonon method to search (dfpt, phonopy, pheasy)
29
31
num_chunks (int): Maximum number of chunks of data to yield. None will yield all possible.
30
32
chunk_size (int): Number of data entries per chunk.
31
33
all_fields (bool): Whether to return all fields in the document. Defaults to True.
@@ -41,7 +43,10 @@ def search(
41
43
if isinstance (material_ids , str ):
42
44
material_ids = [material_ids ]
43
45
44
- query_params .update ({"material_ids" : "," .join (validate_ids (material_ids ))})
46
+ query_params ["material_ids" ] = "," .join (validate_ids (material_ids ))
47
+
48
+ if phonon_method and phonon_method in {"dfpt" , "phonopy" , "pheasy" }:
49
+ query_params ["phonon_method" ] = phonon_method
45
50
46
51
query_params = {
47
52
entry : query_params [entry ]
0 commit comments