Skip to content

Commit

Permalink
BigDFT: fix relative path for pseudos and too many k-points generated (
Browse files Browse the repository at this point in the history
…#169)

The `fast` and `moderate` protocols were accidentally using the k-point distance
of the `precise` protocol making them way more expensive than intended.

Also, the plugin was updated to no longer rely on relative paths of pseudo potentials
which was causing problems on certain installations.
  • Loading branch information
adegomme authored Mar 28, 2021
1 parent 5581a69 commit f93f5af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion PEOPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Reference person for each plugin developement:
* Aliaksandr Yakutovich - aiida_cp2k
* Espen Flage-Larsen - aiida_vasp
* Emanuele Bosoni - aiida_siesta
* Augustine Degomme - aiida_bigdft
* Augustin Degomme - aiida_bigdft
* Conrad Johnston - aiida_nwchem

Reference person from aiida_team:
Expand Down
8 changes: 5 additions & 3 deletions aiida_common_workflows/workflows/relax/bigdft/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class BigDftCommonRelaxInputGenerator(CommonRelaxInputGenerator):
'inputdic_linear': {
'import': 'linear_fast'
},
'kpoints_distance': 100
'kpoints_distance': 20
},
'moderate': {
'description': 'This profile should be chosen if accurate forces are required, but there is no need for '
Expand Down Expand Up @@ -142,7 +142,6 @@ class BigDftCommonRelaxInputGenerator(CommonRelaxInputGenerator):
'inputdict_linear': {
'import': 'linear_accurate'
},
'kpoints_distance': 20
}
}

Expand Down Expand Up @@ -282,10 +281,13 @@ def get_builder(
if magnetization_per_site:
for (i, atom) in enumerate(inputdict['posinp']['positions']):
atom['IGSpin'] = int(magnetization_per_site[i])
# correctly set kpoints from protocol fast and moderate. If precise, use the ones from set_inputfile/set_kpt
if self.get_protocol(protocol).get('kpoints_distance'):
inputdict['kpt'] = {'method': 'auto', 'kptrlen': self.get_protocol(protocol).get('kpoints_distance')}
if psp:
import os
builder.pseudos = orm.List()
psprel = [os.path.relpath(i) for i in psp]
psprel = [os.path.normpath(os.path.relpath(i)) for i in psp]
builder.pseudos.extend(psprel)
builder.parameters = BigDFTParameters(dict=inputdict)
builder.code = orm.load_code(engines[relaxation_schema]['code'])
Expand Down
2 changes: 1 addition & 1 deletion setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"install_requires": [
"abipy",
"aiida-abinit~=0.2.0a1",
"aiida-bigdft>=0.2.4",
"aiida-bigdft>=0.2.6",
"aiida-castep>=1.2.0a5",
"aiida-core[atomic_tools]~=1.2",
"aiida-cp2k~=1.3",
Expand Down

0 comments on commit f93f5af

Please sign in to comment.