Skip to content

Commit

Permalink
PhCalculation: use verbosity instead of iverbosity (#633)
Browse files Browse the repository at this point in the history
The input keyword `iverbosity` has been deprecated since QE v5.2 and
completely removed in QE 6.6 causing the `PhCalculation` to fail for
those versions. Here we replace `iverbosity` with the new keyword that
replaces it `verbosity`. Since QE v5.2 is so old, we no longer have to
support it and simply replace `iverbosity` entirely.
  • Loading branch information
unkcpz authored May 25, 2021
1 parent cb5f465 commit f4528af
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
5 changes: 3 additions & 2 deletions aiida_quantumespresso/calculations/epw.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class EpwCalculation(CalcJob):
"""`CalcJob` implementation for the epw.x code of Quantum ESPRESSO."""

# Keywords that cannot be set by the user but will be set by the plugin
_blocked_keywords = [('INPUTEPW', 'outdir'), ('INPUTEPW', 'iverbosity'), ('INPUTEPW', 'prefix'),
_blocked_keywords = [('INPUTEPW', 'outdir'), ('INPUTEPW', 'verbosity'), ('INPUTEPW', 'prefix'),
('INPUTEPW', 'dvscf_dir'), ('INPUTEPW', 'amass'), ('INPUTEPW', 'nq1'), ('INPUTEPW', 'nq2'),
('INPUTEPW', 'nq3'), ('INPUTEPW', 'nk1'), ('INPUTEPW', 'nk2'), ('INPUTEPW', 'nk3')]

Expand All @@ -30,6 +30,7 @@ class EpwCalculation(CalcJob):
_OUTPUT_SUBFOLDER = './out/'
_SAVE_PREFIX = '/save/'
_FOLDER_SAVE = 'save'
_VERBOSITY = 'high'
_FOLDER_DYNAMICAL_MATRIX = 'DYN_MAT'

# Not using symlink in pw to allow multiple nscf to run on top of the same scf
Expand Down Expand Up @@ -121,7 +122,7 @@ def test_offset(offset):
raise exceptions.InputValidationError('required namelist INPUTEPW not specified')

parameters['INPUTEPW']['outdir'] = self._OUTPUT_SUBFOLDER
parameters['INPUTEPW']['iverbosity'] = 1
parameters['INPUTEPW']['verbosity'] = self._VERBOSITY
parameters['INPUTEPW']['prefix'] = self._PREFIX

try:
Expand Down
5 changes: 3 additions & 2 deletions aiida_quantumespresso/calculations/ph.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class PhCalculation(CalcJob):
"""`CalcJob` implementation for the ph.x code of Quantum ESPRESSO."""

# Keywords that cannot be set by the user but will be set by the plugin
_blocked_keywords = [('INPUTPH', 'outdir'), ('INPUTPH', 'iverbosity'), ('INPUTPH', 'prefix'), ('INPUTPH', 'fildyn'),
_blocked_keywords = [('INPUTPH', 'outdir'), ('INPUTPH', 'verbosity'), ('INPUTPH', 'prefix'), ('INPUTPH', 'fildyn'),
('INPUTPH', 'ldisp'), ('INPUTPH', 'nq1'), ('INPUTPH', 'nq2'), ('INPUTPH', 'nq3'),
('INPUTPH', 'qplot')]

Expand All @@ -36,6 +36,7 @@ class PhCalculation(CalcJob):
_DVSCF_PREFIX = 'dvscf'
_DRHO_STAR_EXT = 'drho_rot'
_FOLDER_DYNAMICAL_MATRIX = 'DYN_MAT'
_VERBOSITY = 'high'
_OUTPUT_DYNAMICAL_MATRIX_PREFIX = os.path.join(_FOLDER_DYNAMICAL_MATRIX, 'dynamical-matrix-')

# Not using symlink in pw to allow multiple nscf to run on top of the same scf
Expand Down Expand Up @@ -151,7 +152,7 @@ def prepare_for_submission(self, folder):
raise exceptions.InputValidationError('required namelist INPUTPH not specified')

parameters['INPUTPH']['outdir'] = self._OUTPUT_SUBFOLDER
parameters['INPUTPH']['iverbosity'] = 1
parameters['INPUTPH']['verbosity'] = self._VERBOSITY
parameters['INPUTPH']['prefix'] = self._PREFIX
parameters['INPUTPH']['fildyn'] = self._OUTPUT_DYNAMICAL_MATRIX_PREFIX

Expand Down
2 changes: 1 addition & 1 deletion docs/source/user_guide/calculation_plugins/epw.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Inputs

'INPUTEPW', 'outdir': scratch directory
'INPUTEPW', 'prefix': file prefix
'INPUTEPW', 'iverbosity': file prefix
'INPUTEPW', 'verbosity': file prefix
'INPUTEPW', 'dvscf_dir': place where the dvscf from ph.x are.
'INPUTEPW', 'amass': Atomic mass
'INPUTEPW', 'nk1': coarse k-mesh on b1
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user_guide/calculation_plugins/ph.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Inputs

'INPUTPH', 'outdir': scratch directory
'INPUTPH', 'prefix': file prefix
'INPUTPH', 'iverbosity': file prefix
'INPUTPH', 'verbosity': file prefix
'INPUTPH', 'fildyn': file prefix
'INPUTPH', 'ldisp': logic displacement
'INPUTPH', 'nq1': q-mesh on b1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The input file that we should create is more or less this one::
&INPUTPH
epsil = .true.
fildyn = 'DYN_MAT/dynamical-matrix-'
iverbosity = 1
verbosity = 'high'
ldisp = .true.
nq1 = 1
nq2 = 1
Expand Down
2 changes: 1 addition & 1 deletion tests/calculations/test_epw/test_epw_default.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
elph = .true.
epbwrite = .true.
epwwrite = .true.
iverbosity = 1
nbndsub = 8
nk1 = 2
nk2 = 2
Expand All @@ -23,6 +22,7 @@
outdir = './out/'
prefix = 'aiida'
proj(1) = 'Si : sp3'
verbosity = 'high'
wannierize = .true.
/
3 cartesian
Expand Down
2 changes: 1 addition & 1 deletion tests/calculations/test_ph/test_ph_default.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
&INPUTPH
fildyn = 'DYN_MAT/dynamical-matrix-'
iverbosity = 1
ldisp = .true.
nq1 = 2
nq2 = 2
nq3 = 2
outdir = './out/'
prefix = 'aiida'
verbosity = 'high'
/
2 changes: 1 addition & 1 deletion tests/calculations/test_ph/test_ph_qpoint_list.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
&INPUTPH
fildyn = 'DYN_MAT/dynamical-matrix-'
iverbosity = 1
ldisp = .true.
outdir = './out/'
prefix = 'aiida'
qplot = .true.
verbosity = 'high'
/
8
0.0000000000 0.0000000000 0.0000000000 1
Expand Down

0 comments on commit f4528af

Please sign in to comment.