Skip to content

Commit 1b4f912

Browse files
author
utf
committed
Tidy phonon frequency
1 parent 73d9105 commit 1b4f912

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

amset/tools/phonon_frequency.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ def get_phonon_weight(eigenvector, frequency, born_effective_charges, structure)
139139
return weight
140140

141141

142-
# ------block to extract data from new outcar-----#
143142
def parse_frequencies(line):
144143
"""Extract frequencies from a given line."""
145144
return [float(value) for value in re.findall(r"[-+]?\d*\.\d+|\d+", line)]
@@ -174,6 +173,7 @@ def extract_gamma_point_data(file_path):
174173
raise ValueError("Could not find PHONON_BORN_CHARGES")
175174

176175
content = content.split("\n")
176+
177177
# Identify the phonon section
178178
phonon_section = []
179179
phonon_started = False
@@ -189,7 +189,6 @@ def extract_gamma_point_data(file_path):
189189
):
190190
break
191191

192-
# Initialize data containers
193192
q_points = []
194193
frequencies = []
195194
eigenvector_3d = []
@@ -240,9 +239,6 @@ def extract_gamma_point_data(file_path):
240239
return gamma_frequencies, gamma_eigenvectors_3d, born
241240

242241

243-
# --------block ends here--------#
244-
245-
246242
def get_file(filename, class_type):
247243
if isinstance(filename, str):
248244
filename_gz = filename + ".gz"

0 commit comments

Comments
 (0)