File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1248,10 +1248,9 @@ def get_phonon_dos_by_material_id(self, material_id: str):
1248
1248
CompletePhononDos: A phonon DOS object.
1249
1249
1250
1250
"""
1251
- doc = self .materials .phonon .search (material_ids = material_id , fields = ["ph_dos" ])
1252
- if not doc :
1253
- return None
1254
- return doc [0 ].ph_dos if self .use_document_model else doc [0 ]["ph_dos" ] # type: ignore
1251
+ return self .materials .phonon .get_dos_from_material_id (
1252
+ material_id = material_id , phonon_method = "dfpt"
1253
+ )
1255
1254
1256
1255
def get_phonon_bandstructure_by_material_id (self , material_id : str ):
1257
1256
"""Get phonon dispersion data corresponding to a material_id.
@@ -1262,11 +1261,9 @@ def get_phonon_bandstructure_by_material_id(self, material_id: str):
1262
1261
Returns:
1263
1262
PhononBandStructureSymmLine: phonon band structure.
1264
1263
"""
1265
- doc = self .materials .phonon .search (material_ids = material_id , fields = ["ph_bs" ])
1266
- if not doc :
1267
- return None
1268
-
1269
- return doc [0 ].ph_bs if self .use_document_model else doc [0 ]["ph_bs" ] # type: ignore
1264
+ return self .materials .phonon .get_bandstructure_from_material_id (
1265
+ material_id = material_id , phonon_method = "dfpt"
1266
+ )
1270
1267
1271
1268
def get_wulff_shape (self , material_id : str ):
1272
1269
"""Constructs a Wulff shape for a material.
You can’t perform that action at this time.
0 commit comments