Skip to content

Commit 9da5a83

Browse files
committed
fix deprecations
1 parent d3e8b04 commit 9da5a83

35 files changed

+84
-69
lines changed

aiida_common_workflows/cli/options.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,12 @@ def convert(self, value, param, ctx):
105105
f'file `{value}` could not be parsed into a `StructureData`: {exception}'
106106
) from exception
107107

108-
duplicate = QueryBuilder().append(StructureData, filters={'extras._aiida_hash': structure._get_hash()}).first() # pylint: disable=protected-access
108+
duplicate = QueryBuilder().append(
109+
StructureData,
110+
filters={
111+
'extras._aiida_hash': structure.base.caching._get_hash() # pylint: disable=protected-access
112+
}
113+
).first()
109114

110115
if duplicate:
111116
return duplicate[0] # pylint: disable=unsubscriptable-object

aiida_common_workflows/cli/plot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def cmd_plot_eos(workflow, precisions, print_table, output_file):
3434
echo.echo_critical(
3535
f'node {workflow.__class__.__name__}<{workflow.pk}> does not correspond to an EquationOfStateWorkChain.'
3636
)
37-
outputs = workflow.get_outgoing(link_type=LinkType.RETURN).nested()
37+
outputs = workflow.base.links.get_outgoing(link_type=LinkType.RETURN).nested()
3838

3939
missing_outputs = tuple(output for output in ('structures', 'total_energies') if output not in outputs)
4040
if missing_outputs:
@@ -107,7 +107,7 @@ def cmd_plot_dissociation_curve(workflow, precisions, print_table, output_file):
107107
echo.echo_critical(
108108
f'node {workflow.__class__.__name__}<{workflow.pk}> does not correspond to a DissociationCurveWorkChain.'
109109
)
110-
outputs = workflow.get_outgoing(link_type=LinkType.RETURN).nested()
110+
outputs = workflow.base.links.get_outgoing(link_type=LinkType.RETURN).nested()
111111

112112
missing_outputs = tuple(output for output in ('distances', 'total_energies') if output not in outputs)
113113
if missing_outputs:

aiida_common_workflows/cli/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def echo_process_results(node):
1616
from aiida.common.links import LinkType
1717

1818
class_name = node.process_class.__name__
19-
outputs = node.get_outgoing(link_type=(LinkType.CREATE, LinkType.RETURN)).all()
19+
outputs = node.base.links.get_outgoing(link_type=(LinkType.CREATE, LinkType.RETURN)).all()
2020

2121
if node.is_finished and node.exit_message:
2222
state = f'{node.process_state.value} [{node.exit_status}] `{node.exit_message}`'
@@ -78,13 +78,13 @@ def get_code_from_list_or_database(codes, entry_point: str):
7878
:param entry_point: calculation job entry point name.
7979
:return: a ``Code`` instance configured for the given entry point or ``None``.
8080
"""
81-
from aiida.orm import Code, QueryBuilder
81+
from aiida.orm import AbstractCode, QueryBuilder
8282

8383
for entry in codes:
84-
if entry.get_attribute('input_plugin') == entry_point:
84+
if entry.default_calc_job_plugin == entry_point:
8585
return entry
8686

87-
result = QueryBuilder().append(Code, filters={'attributes.input_plugin': entry_point}).first()
87+
result = QueryBuilder().append(AbstractCode, filters={'attributes.default_calc_job_plugin': entry_point}).first()
8888

8989
if result is not None:
9090
return result[0]

aiida_common_workflows/generators/ports.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ def validate(self, value: t.Any, breadcrumbs: t.Sequence[str] = ()) -> PortValid
6969
if result is not None:
7070
return result
7171

72-
if self.code_entry_point is not None and value.get_input_plugin_name() != self.code_entry_point:
73-
return f'invalid entry point `{value.get_input_plugin_name()}` for `Code{value}`.'
72+
if self.code_entry_point is not None and value.default_calc_job_plugin != self.code_entry_point:
73+
return f'invalid entry point `{value.default_calc_job_plugin}` for `Code{value}`.'
7474

7575
if value is not UNSPECIFIED and self.choices is not None and value not in self.choices:
7676
choices = [str(value) for value in self.choices]

aiida_common_workflows/workflows/dissociation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ def set_distance(molecule: orm.StructureData, distance: orm.Float) -> orm.Struct
9797
versor_diff = vector_diff / np.linalg.norm(vector_diff)
9898
new_molecule = molecule.clone()
9999
new_position = (distance.value * versor_diff) / 2
100-
new_molecule.attributes['sites'][0]['position'] = -new_position
101-
new_molecule.attributes['sites'][1]['position'] = new_position
100+
new_molecule.base.attributes.get('sites')[0]['position'] = -new_position
101+
new_molecule.base.attributes.get('sites')[1]['position'] = new_position
102102
return new_molecule
103103

104104

aiida_common_workflows/workflows/relax/abinit/extractors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ def get_ts_energy(common_relax_workchain: AbinitCommonRelaxWorkChain) -> float:
2424
if common_relax_workchain.process_class != AbinitCommonRelaxWorkChain:
2525
return ValueError('The input workchain is not a `AbinitCommonRelaxWorkChain`')
2626

27-
abinit_base_wc = common_relax_workchain.get_outgoing(link_type=LinkType.CALL_WORK).one().node
27+
abinit_base_wc = common_relax_workchain.base.links.get_outgoing(link_type=LinkType.CALL_WORK).one().node
2828
return -abinit_base_wc.outputs.output_parameters['e_entropy']

aiida_common_workflows/workflows/relax/abinit/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def _construct_builder(self, **kwargs) -> engine.ProcessBuilder:
7676

7777
pseudo_family_label = protocol.pop('pseudo_family')
7878
try:
79-
pseudo_family = orm.Group.objects.get(label=pseudo_family_label)
79+
pseudo_family = orm.Group.collection.get(label=pseudo_family_label)
8080
except exceptions.NotExistent as exception:
8181
raise ValueError(
8282
f'required pseudo family `{pseudo_family_label}` is not installed. '

aiida_common_workflows/workflows/relax/abinit/workchain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@
1818
def get_stress(parameters):
1919
"""Return the stress array from the given parameters node."""
2020
stress = orm.ArrayData()
21-
stress.set_array(name='stress', array=np.array(parameters.get_attribute('cart_stress_tensor')) * GPA_TO_EV_A3)
21+
stress.set_array(name='stress', array=np.array(parameters.base.attributes.get('cart_stress_tensor')) * GPA_TO_EV_A3)
2222
return stress
2323

2424

2525
@calcfunction
2626
def get_forces(parameters):
2727
"""Return the forces array from the given parameters node."""
2828
forces = orm.ArrayData()
29-
forces.set_array(name='forces', array=np.array(parameters.get_attribute('forces')))
29+
forces.set_array(name='forces', array=np.array(parameters.base.attributes.get('forces')))
3030
return forces
3131

3232

3333
@calcfunction
3434
def get_total_energy(parameters):
3535
"""Return the total energy from the given parameters node."""
36-
return orm.Float(parameters.get_attribute('energy'))
36+
return orm.Float(parameters.base.attributes.get('energy'))
3737

3838

3939
@calcfunction

aiida_common_workflows/workflows/relax/castep/extractors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_ts_energy(common_relax_workchain):
2828
if common_relax_workchain.process_class != CastepCommonRelaxWorkChain:
2929
return ValueError('The input workchain is not a `CastepCommonRelaxWorkChain`')
3030

31-
castep_base_wc = common_relax_workchain.get_outgoing(link_type=LinkType.CALL_WORK).one().node
31+
castep_base_wc = common_relax_workchain.base.links.get_outgoing(link_type=LinkType.CALL_WORK).one().node
3232
e_ks = castep_base_wc.outputs.output_parameters['total energy']
3333
free_e = castep_base_wc.outputs.output_parameters['free energy']
3434

aiida_common_workflows/workflows/relax/castep/generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def generate_inputs(
256256
if isinstance(family_name, orm.Str):
257257
family_name = family_name.value
258258
try:
259-
otfg_family = OTFGGroup.objects.get(label=family_name)
259+
otfg_family = OTFGGroup.collection.get(label=family_name)
260260
except exceptions.NotExistent as exc:
261261
name = protocol['name']
262262
family = protocol['relax']['base']['pseudos_family']
@@ -424,7 +424,7 @@ def ensure_otfg_family(family_name, force_update=False):
424424
if isinstance(family_name, orm.Str):
425425
family_name = family_name.value
426426
try:
427-
OTFGGroup.objects.get(label=family_name)
427+
OTFGGroup.collection.get(label=family_name)
428428
except NotExistent:
429429
has_family = False
430430
else:

aiida_common_workflows/workflows/relax/castep/workchain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def get_free_energy(parameters):
5353
Return the free energy from the given parameters node.
5454
The free energy reported by CASTEP is the one that is consistent with the forces.
5555
"""
56-
return orm.Float(parameters.get_attribute('free_energy'))
56+
return orm.Float(parameters.base.attributes.get('free_energy'))
5757

5858

5959
@calcfunction
@@ -62,7 +62,7 @@ def get_total_magnetization(parameters):
6262
Return the free energy from the given parameters node.
6363
The free energy reported by CASTEP is the one that is consistent with the forces.
6464
"""
65-
return orm.Float(parameters.get_attribute('spin_density'))
65+
return orm.Float(parameters.base.attributes.get('spin_density'))
6666

6767

6868
class CastepCommonRelaxWorkChain(CommonRelaxWorkChain):

aiida_common_workflows/workflows/relax/cp2k/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def _get_kpoints(kpoints_distance, structure, reference_workchain):
334334
if reference_workchain and 'cp2k__kpoints' in reference_workchain.inputs:
335335
kpoints_mesh = KpointsData()
336336
kpoints_mesh.set_cell_from_structure(structure)
337-
kpoints_mesh.set_kpoints_mesh(reference_workchain.inputs.cp2k__kpoints.get_attribute('mesh'))
337+
kpoints_mesh.set_kpoints_mesh(reference_workchain.inputs.cp2k__kpoints.base.attributes.get('mesh'))
338338
return kpoints_mesh
339339

340340
if kpoints_distance:

aiida_common_workflows/workflows/relax/cp2k/workchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
@calcfunction
2323
def get_total_energy(parameters):
2424
"""Return the total energy from the given parameters node."""
25-
return orm.Float(parameters.get_attribute('energy') * HA_TO_EV)
25+
return orm.Float(parameters.base.attributes.get('energy') * HA_TO_EV)
2626

2727

2828
@calcfunction

aiida_common_workflows/workflows/relax/fleur/extractors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_ts_energy(common_relax_workchain):
2525
if common_relax_workchain.process_class != WorkflowFactory('common_workflows.relax.fleur'):
2626
return ValueError('The input workchain is not a `FleurCommonRelaxWorkChain`')
2727

28-
fleur_relax_wc = common_relax_workchain.get_outgoing(link_type=LinkType.CALL_WORK).one().node
28+
fleur_relax_wc = common_relax_workchain.base.links.get_outgoing(link_type=LinkType.CALL_WORK).one().node
2929
fleur_calc_out = fleur_relax_wc.outputs.last_scf.last_calc
3030

3131
output_parameters = fleur_calc_out.output_parameters

aiida_common_workflows/workflows/relax/fleur/workchain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ def get_forces_from_trajectory(trajectory): # pylint: disable=unused-argument
2424
@calcfunction
2525
def get_total_energy(parameters):
2626
"""Calcfunction to get total energy from relax output"""
27-
return orm.Float(parameters.get_attribute('energy'))
27+
return orm.Float(parameters.base.attributes.get('energy'))
2828

2929

3030
@calcfunction
3131
def get_total_magnetization(parameters):
3232
"""Return the total magnetic moment of the cell from the given parameters node."""
33-
return orm.Float(parameters.get_attribute('total_magnetic_moment_cell'))
33+
return orm.Float(parameters.base.attributes.get('total_magnetic_moment_cell'))
3434

3535

3636
class FleurCommonRelaxWorkChain(CommonRelaxWorkChain):

aiida_common_workflows/workflows/relax/gaussian/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def _construct_builder(self, **kwargs) -> engine.ProcessBuilder:
8080
magnetization_per_site = kwargs.get('magnetization_per_site', None)
8181
threshold_forces = kwargs.get('threshold_forces', None)
8282

83-
if any(structure.get_attribute_many(['pbc1', 'pbc2', 'pbc3'])):
83+
if any(structure.base.attributes.get_many(['pbc1', 'pbc2', 'pbc3'])):
8484
print('Warning: PBC detected in input structure. It is not supported and thus ignored.')
8585

8686
# -----------------------------------------------------------------

aiida_common_workflows/workflows/relax/gpaw/generator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ def _construct_builder( # pylint: disable=arguments-differ,too-many-locals
117117
kpoints.set_cell_from_structure(structure)
118118
if reference_workchain:
119119
previous_kpoints = reference_workchain.inputs.kpoints
120-
kpoints.set_kpoints_mesh(previous_kpoints.get_attribute('mesh'), previous_kpoints.get_attribute('offset'))
120+
kpoints.set_kpoints_mesh(
121+
previous_kpoints.base.attributes.get('mesh'), previous_kpoints.base.attributes.get('offset')
122+
)
121123
else:
122124
kpoints.set_kpoints_mesh_from_density(protocol['kpoint_distance'])
123125

aiida_common_workflows/workflows/relax/gpaw/workchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def extract_forces_from_array(array):
2121
@calcfunction
2222
def extract_total_energy_from_parameters(parameters):
2323
"""Return the total energy from the given parameters node."""
24-
energy_cont = parameters.get_attribute('energy_contributions')
24+
energy_cont = parameters.base.attributes.get('energy_contributions')
2525
total_energy = energy_cont['xc'] + energy_cont['local'] + energy_cont['kinetic']
2626
total_energy += energy_cont['external'] + energy_cont['potential'] + energy_cont['entropy (-st)']
2727
return orm.Float(total_energy)

aiida_common_workflows/workflows/relax/orca/generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
__all__ = ('OrcaCommonRelaxInputGenerator',)
1818

19-
StructureData = DataFactory('structure')
19+
StructureData = DataFactory('core.structure')
2020

2121

2222
class OrcaCommonRelaxInputGenerator(CommonRelaxInputGenerator):
@@ -72,7 +72,7 @@ def _construct_builder(self, **kwargs) -> engine.ProcessBuilder:
7272
magnetization_per_site = kwargs.get('magnetization_per_site', None)
7373

7474
# Checks
75-
if any(structure.get_attribute_many(['pbc1', 'pbc2', 'pbc2'])):
75+
if any(structure.base.attributes.get_many(['pbc1', 'pbc2', 'pbc2'])):
7676
warnings.warn('PBC detected in the input structure. It is not supported and thus is ignored.')
7777

7878
if protocol not in self.get_protocol_names():

aiida_common_workflows/workflows/relax/quantum_espresso/extractors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ def get_ts_energy(common_relax_workchain: QuantumEspressoCommonRelaxWorkChain) -
2727
if common_relax_workchain.process_class != QuantumEspressoCommonRelaxWorkChain:
2828
return ValueError('The input workchain is not a `QuantumEspressoCommonRelaxWorkChain`')
2929

30-
qe_relax_wc = common_relax_workchain.get_outgoing(link_type=LinkType.CALL_WORK).one().node
30+
qe_relax_wc = common_relax_workchain.base.links.get_outgoing(link_type=LinkType.CALL_WORK).one().node
3131
return -qe_relax_wc.outputs.output_parameters['energy_smearing']

aiida_common_workflows/workflows/relax/quantum_espresso/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def _construct_builder(self, **kwargs) -> engine.ProcessBuilder:
197197
builder.base['pw']['parameters'] = orm.Dict(dict=parameters)
198198

199199
if reference_workchain:
200-
relax = reference_workchain.get_outgoing(node_class=orm.WorkChainNode).one().node
200+
relax = reference_workchain.base.links.get_outgoing(node_class=orm.WorkChainNode).one().node
201201
base = sorted(relax.called, key=lambda x: x.ctime)[-1]
202202
calc = sorted(base.called, key=lambda x: x.ctime)[-1]
203203
kpoints = calc.inputs.kpoints

aiida_common_workflows/workflows/relax/quantum_espresso/workchain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def extract_from_trajectory(trajectory):
3030
@calcfunction
3131
def extract_from_parameters(parameters):
3232
"""Return the total energy and optionally the total magnetization from the given parameters node."""
33-
total_energy = parameters.get_attribute('energy')
34-
total_magnetization = parameters.get_attribute('total_magnetization', None)
33+
total_energy = parameters.base.attributes.get('energy')
34+
total_magnetization = parameters.base.attributes.get('total_magnetization', None)
3535

3636
results = {'total_energy': orm.Float(total_energy)}
3737

aiida_common_workflows/workflows/relax/siesta/extractors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def get_ts_energy(common_relax_workchain):
2222
if common_relax_workchain.process_class != WorkflowFactory('common_workflows.relax.siesta'):
2323
return ValueError('The input workchain is not a `CommonWorkflowSiestaWorkChain`')
2424

25-
siesta_base_wc = common_relax_workchain.get_outgoing(link_type=LinkType.CALL_WORK).one().node
25+
siesta_base_wc = common_relax_workchain.base.links.get_outgoing(link_type=LinkType.CALL_WORK).one().node
2626
e_ks = siesta_base_wc.outputs.output_parameters['E_KS']
2727
free_e = siesta_base_wc.outputs.output_parameters['FreeE']
2828

aiida_common_workflows/workflows/relax/siesta/generator.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _construct_builder(self, **kwargs) -> engine.ProcessBuilder:
9898

9999
pseudo_family = self._protocols[protocol]['pseudo_family']
100100
try:
101-
orm.Group.objects.get(label=pseudo_family)
101+
orm.Group.collection.get(label=pseudo_family)
102102
except exceptions.NotExistent as exc:
103103
raise ValueError(
104104
f'protocol `{protocol}` requires `pseudo_family` with name {pseudo_family} '
@@ -213,8 +213,8 @@ def _get_param(self, key, structure, reference_workchain): # pylint: disable=to
213213
#the underline SiestaBaseWorkChain.
214214
if reference_workchain is not None:
215215
from aiida.orm import WorkChainNode
216-
siesta_base_outs = reference_workchain.get_outgoing(node_class=WorkChainNode).one().node.outputs
217-
mesh = siesta_base_outs.output_parameters.attributes['mesh']
216+
siesta_base_outs = reference_workchain.base.links.get_outgoing(node_class=WorkChainNode).one().node.outputs
217+
mesh = siesta_base_outs.output_parameters.base.attributes.get('mesh')
218218
parameters['mesh-sizes'] = f'[{mesh[0]} {mesh[1]} {mesh[2]}]'
219219
parameters.pop('mesh-cutoff', None)
220220

@@ -281,7 +281,9 @@ def _get_kpoints(self, key, structure, reference_workchain):
281281
kpoints_mesh = KpointsData()
282282
kpoints_mesh.set_cell_from_structure(structure)
283283
previous_wc_kp = reference_workchain.inputs.kpoints
284-
kpoints_mesh.set_kpoints_mesh(previous_wc_kp.get_attribute('mesh'), previous_wc_kp.get_attribute('offset'))
284+
kpoints_mesh.set_kpoints_mesh(
285+
previous_wc_kp.base.attributes.get('mesh'), previous_wc_kp.base.attributes.get('offset')
286+
)
285287
return kpoints_mesh
286288

287289
if 'kpoints' in self._protocols[key]:

aiida_common_workflows/workflows/relax/siesta/workchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ def convert_outputs(self):
5757
res_dict = get_forces_and_stress(self.ctx.workchain.outputs.forces_and_stress)
5858
self.out('forces', res_dict['forces'])
5959
self.out('stress', res_dict['stress'])
60-
if 'stot' in self.ctx.workchain.outputs.output_parameters.attributes:
60+
if 'stot' in self.ctx.workchain.outputs.output_parameters.base.attributes.all:
6161
self.out('total_magnetization', get_magn(self.ctx.workchain.outputs.output_parameters))
6262
self.out('remote_folder', self.ctx.workchain.outputs.remote_folder)

aiida_common_workflows/workflows/relax/vasp/extractors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def get_ts_energy(common_relax_workchain):
1919
if common_relax_workchain.process_class != WorkflowFactory('common_workflows.relax.vasp'):
2020
return ValueError('The input workchain is not a `VaspCommonRelaxWorkChain`')
2121

22-
vasp_wc = common_relax_workchain.get_outgoing(link_type=LinkType.CALL_WORK).one().node
22+
vasp_wc = common_relax_workchain.base.links.get_outgoing(link_type=LinkType.CALL_WORK).one().node
2323
energies = vasp_wc.outputs.energies
2424
energy_free = energies.get_array('energy_free_electronic')[0]
2525
energy_no_entropy = energies.get_array('energy_no_entropy')[0]

aiida_common_workflows/workflows/relax/vasp/generator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ def _construct_builder(self, **kwargs) -> engine.ProcessBuilder:
188188
kpoints.set_cell_from_structure(structure)
189189
if reference_workchain:
190190
previous_kpoints = reference_workchain.inputs.kpoints
191-
kpoints.set_kpoints_mesh(previous_kpoints.get_attribute('mesh'), previous_kpoints.get_attribute('offset'))
191+
kpoints.set_kpoints_mesh(
192+
previous_kpoints.base.attributes.get('mesh'), previous_kpoints.base.attributes.get('offset')
193+
)
192194
else:
193195
kpoints.set_kpoints_mesh_from_density(protocol['kpoint_distance'])
194196
builder.kpoints = kpoints

aiida_common_workflows/workflows/relax/wien2k/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def _construct_builder(self, **kwargs) -> engine.ProcessBuilder:
8484
inpdict['-nometal'] = True
8585
if reference_workchain: # ref. workchain is passed as input
8686
# derive Rmt's from the ref. workchain and pass as input
87-
w2k_wchain = reference_workchain.get_outgoing(node_class=orm.WorkChainNode).one().node
87+
w2k_wchain = reference_workchain.base.links.get_outgoing(node_class=orm.WorkChainNode).one().node
8888
ref_wrkchn_res_dict = w2k_wchain.outputs.workchain_result.get_dict()
8989
rmt = ref_wrkchn_res_dict['Rmt']
9090
atm_lbl = ref_wrkchn_res_dict['atom_labels']

docs/source/workflows/composite/dc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ A template script to retrieve the results follows:
103103
104104
node = load_node(<IDN>) # <IDN> is an identifier (PK, uuid, ..) of a completed DC workchain
105105
106-
outputs = node.get_outgoing(link_type=LinkType.RETURN).nested()
106+
outputs = node.base.links.get_outgoing(link_type=LinkType.RETURN).nested()
107107
108108
distances = []
109109
energies = []

docs/source/workflows/composite/eos.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ A template script to retrieve the results follows:
103103
104104
node = load_node(<IDN>) # <IDN> is an identifier (PK, uuid, ..) of a completed EoS workchain
105105
106-
outputs = node.get_outgoing(link_type=LinkType.RETURN).nested()
106+
outputs = node.base.links.get_outgoing(link_type=LinkType.RETURN).nested()
107107
108108
volumes = []
109109
energies = []

0 commit comments

Comments
 (0)