Skip to content

Commit

Permalink
calculation set for base workchain (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz authored May 3, 2023
1 parent 955e98f commit 1620eac
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion aiida_sssp_workflow/workflows/convergence/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def _get_pw_base_parameters(self, degauss, occupations, smearing, conv_thr):
'conv_thr': conv_thr,
},
'CONTROL': {
# 'calculation': 'scf', NOT EXPLICITLY SET. `scf` is default if not override.
'calculation': 'scf',
'tstress': True, # for pressue to use _caching node directly.
},
}
Expand Down
1 change: 1 addition & 0 deletions aiida_sssp_workflow/workflows/convergence/bands.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def _get_inputs(self, ecutwfc, ecutrho):
parameters_bands = update_dict(parameters, {})
parameters_bands["SYSTEM"].pop("nbnd", None)
parameters_bands["CONTROL"].pop("tstress", None)
parameters_bands["CONTROL"]["calculation"] = "bands"

inputs = {
"structure": self.ctx.structure,
Expand Down
3 changes: 3 additions & 0 deletions aiida_sssp_workflow/workflows/convergence/cohesive_energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ def setup_code_parameters_from_protocol(self):
"ELECTRONS": {
"conv_thr": self._CONV_THR,
},
"CONTROL": {
"calculation": "scf",
},
}

self.ctx.atom_parameters = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def helper_phonon_frequencies_difference(
"""
import numpy as np

input_frequencies = input_parameters["dynamical_matrix_0"]["frequencies"]
ref_frequencies = ref_parameters["dynamical_matrix_0"]["frequencies"]
input_frequencies = input_parameters["dynamical_matrix_1"]["frequencies"]
ref_frequencies = ref_parameters["dynamical_matrix_1"]["frequencies"]

# set strat_idx the idx of frequencies start to count
element = element.value
Expand Down
4 changes: 4 additions & 0 deletions aiida_sssp_workflow/workflows/measure/bands.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ def setup_pw_parameters_from_protocol(self):
"ELECTRONS": {
"conv_thr": self._CONV_THR,
},
"CONTROL": {
"calculation": "scf",
},
}

self.ctx.ecutwfc = self._ECUTWFC
Expand Down Expand Up @@ -187,6 +190,7 @@ def _get_inputs(self, pseudos):

parameters_bands = update_dict(parameters, {})
parameters_bands["SYSTEM"].pop("nbnd", None)
parameters_bands["CONTROL"]["calculation"] = "bands"

inputs = {
"structure": self.ctx.structure,
Expand Down
3 changes: 3 additions & 0 deletions aiida_sssp_workflow/workflows/measure/delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ def setup_pw_parameters_from_protocol(self):
"ELECTRONS": {
"conv_thr": self._CONV_THR,
},
"CONTROL": {
"calculation": "scf",
},
}

self.ctx.ecutwfc = self._ECUTWFC
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ project_urls =
packages = find:
install_requires =
aiida-core[atomic_tools]~=2.1
aiida-quantumespresso~=4.1
aiida-quantumespresso~=4.3.0
python_requires = >=3.8
include_package_data = True

Expand Down

0 comments on commit 1620eac

Please sign in to comment.