Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HpParser: fix q-points/atoms output corner case #64

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/aiida_quantumespresso_hp/parsers/parse_raw/hp.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ def parse_raw_output(stdout):
detect_important_message(logs, line)

# A calculation that will only perturb a single atom will only print one line
match = re.search(r'.*The grid of q-points.*\s+([0-9]+)+\s+q-points.*', line)
match = re.search(r'.*The grid of q-points.*?(\d+)+\s+q-points.*', line)
if match:
parsed_data['number_of_qpoints'] = int(match.group(1))

# Determine the atomic sites that will be perturbed, or that the calculation expects
# to have been calculated when post-processing the final matrices
match = re.search(r'.*List of\s+([0-9]+)\s+atoms which will be perturbed.*', line)
match = re.search(r'.*List of.*?(\d+)\s+atoms which will be perturbed.*', line)
if match:
hubbard_sites = {}
number_of_perturbed_atoms = int(match.group(1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
Changing the type of the perturbed atom back to its original type...


The grid of q-points ( 4, 4, 4) ( 18 q-points ) :
The grid of q-points ( 4, 4, 4) (18 q-points ) :
N xq(1) xq(2) xq(3) wq
1 0.000000000 0.000000000 0.000000000 0.015625000
2 0.000000000 0.216131358 -0.211002628 0.062500000
Expand Down
Loading