From 0290d18199621a7b0ae3a503fd17bddafc9d5be9 Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:28:42 +0100 Subject: [PATCH] Fix #18: Add input for pseudo rcut --- src/aiida_dftk/calculations.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/aiida_dftk/calculations.py b/src/aiida_dftk/calculations.py index 0e5df99..701e57e 100644 --- a/src/aiida_dftk/calculations.py +++ b/src/aiida_dftk/calculations.py @@ -42,6 +42,7 @@ def define(cls, spec): # Inputs spec.input('structure', valid_type=orm.StructureData, help='structure') spec.input_namespace('pseudos', valid_type=UpfData, help='The pseudopotentials.', dynamic=True) + spec.input('pseudo_rcut', valid_type=orm.Float, required=False, help='rcut to use for the pseudopotentials, in atomic units') spec.input('kpoints', valid_type=orm.KpointsData, help='kpoint mesh or kpoint path') spec.input('parameters', valid_type=orm.Dict, help='input parameters') spec.input('parent_folder', valid_type=orm.RemoteData, required=False, help='A remote folder used for restarts.') @@ -174,6 +175,8 @@ def _generate_inputdata( for symbol, pseudo in pseudos.items(): data['pseudopotentials'][symbol] = f'{self._PSEUDO_SUBFOLDER}{pseudo.filename}' local_copy_pseudo_list.append((pseudo.uuid, pseudo.filename, f'{self._PSEUDO_SUBFOLDER}{pseudo.filename}')) + if 'pseudo_rcut' in self.inputs: + data['pseudopotentials']['$kwargs'] = {'rcut': self.inputs.pseudo_rcut.value} data['basis_kwargs']['kgrid'], data['basis_kwargs']['kshift'] = kpoints.get_kpoints_mesh() # set the maxtime for the SCF cycle, with a margin of _MIN_OUTPUT_BUFFER_TIME and 10%, whichever leads to a larger margin