Skip to content

Commit

Permalink
feat: support seekpath for automatic band path seek for Phonon.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ZLI-afk committed Jan 7, 2024
1 parent bbe0e29 commit bea20ae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apex/core/property/Phonon.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def __init__(self, parameter, inter_param=None):
self.supercell_size = parameter["supercell_size"]
parameter["seekpath_from_original"] = parameter.get('seekpath_from_original', False)
self.seekpath_from_original = parameter["seekpath_from_original"]
parameter["seekpath_param"] = parameter.get('seekpath_param', {})
self.seekpath_param = parameter["seekpath_param"]
parameter["MESH"] = parameter.get('MESH', None)
self.MESH = parameter["MESH"]
parameter["PRIMITIVE_AXES"] = parameter.get('PRIMITIVE_AXES', None)
Expand Down Expand Up @@ -208,12 +210,14 @@ def make_confs(self, path_to_work, path_to_equi, refine=False):
if self.seekpath_from_original:
logging.info(msg='Band path (BAND) not indicated, using seekpath from original cell')
sp = seekpath.get_path_orig_cell(
self.get_seekpath_structure(ss)
self.get_seekpath_structure(ss),
**self.seekpath_param
)
else:
logging.info(msg='Band path (BAND) not indicated, using seekpath for it')
sp = seekpath.get_path(
self.get_seekpath_structure(ss)
self.get_seekpath_structure(ss),
**self.seekpath_param
)
band_list = self.extract_seekpath_band(sp)
self.BAND, self.BAND_LABELS = self.band_list_2_phonopy_band_string(band_list)
Expand Down

0 comments on commit bea20ae

Please sign in to comment.