Skip to content

Commit d3892d7

Browse files
committed
Set common inputs to non_db
Due to the updates in version 2.6 of `aiida-core`, the `to_aiida_type` serializer is used as a default. Therefore, the validation fails for the inputs defined in the common interfaces, as those are typically defined as Python datatypes. Since these inputs are anyway not stored in the database, we fix it by explicitly setting `non_db = True` for those inputs.
1 parent 24a1819 commit d3892d7

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/aiida_common_workflows/workflows/bands/generator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def define(cls, spec):
5252
spec.input(
5353
'engines.bands.options',
5454
valid_type=dict,
55+
non_db=True,
5556
required=False,
5657
help='Options for the bands calculation jobs.',
5758
)

src/aiida_common_workflows/workflows/relax/generator.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def define(cls, spec):
3333
'protocol',
3434
valid_type=ChoiceType(('fast', 'moderate', 'precise')),
3535
default='moderate',
36+
non_db=True,
3637
help='The protocol to use for the automated input generation. This value indicates the level of precision '
3738
'of the results and computational cost that the input parameters will be selected for.',
3839
)
@@ -61,6 +62,7 @@ def define(cls, spec):
6162
'magnetization_per_site',
6263
valid_type=list,
6364
required=False,
65+
non_db=True,
6466
help='The initial magnetization of the system. Should be a list of floats, where each float represents the '
6567
'spin polarization in units of electrons, meaning the difference between spin up and spin down '
6668
'electrons, for the site. This also corresponds to the magnetization of the site in Bohr magnetons '
@@ -70,19 +72,22 @@ def define(cls, spec):
7072
'threshold_forces',
7173
valid_type=float,
7274
required=False,
75+
non_db=True,
7376
help='A real positive number indicating the target threshold for the forces in eV/Å. If not specified, '
7477
'the protocol specification will select an appropriate value.',
7578
)
7679
spec.input(
7780
'threshold_stress',
7881
valid_type=float,
7982
required=False,
83+
non_db=True,
8084
help='A real positive number indicating the target threshold for the stress in eV/Å^3. If not specified, '
8185
'the protocol specification will select an appropriate value.',
8286
)
8387
spec.input(
8488
'reference_workchain',
8589
valid_type=orm.WorkChainNode,
90+
non_db=True,
8691
required=False,
8792
help='The node of a previously completed process of the same type whose inputs should be taken into '
8893
'account when generating inputs. This is important for particular workflows where certain inputs have '
@@ -106,5 +111,6 @@ def define(cls, spec):
106111
'engines.relax.options',
107112
valid_type=dict,
108113
required=False,
114+
non_db=True,
109115
help='Options for the geometry optimization calculation jobs.',
110116
)

0 commit comments

Comments
 (0)