mikibonacci / aiidalab-qe-vibroscopy

MIT License
1 stars 1 forks source link

Bugs in the vibroworkchain #100

Closed mikibonacci closed 1 week ago

mikibonacci commented 1 week ago

(1) if DFT fails, phonopy will try to run anyway, giving the error:

...
    return True, self._fn(self._workchain)
  File "/home/jovyan/.local/lib/python3.9/site-packages/aiidalab_qe_vibroscopy/workflows/vibroworkchain.py", line 750, in run_phonopy
    inputs.phonopy_data = self.ctx[self.ctx.key].outputs.phonopy_data
  File "/opt/conda/lib/python3.9/site-packages/aiida/orm/utils/managers.py", line 146, in __getattr__
    raise NotExistentAttributeError(
aiida.common.exceptions.NotExistentAttributeError: Node<1447> does not have an output with link label 'phonopy_data'

(2) providing a python float is wrong for symmetry workchain input. See below:

...
~/.local/lib/python3.9/site-packages/aiidalab_qe_vibroscopy/workflows/vibroworkchain.py in get_builder_from_protocol(cls, structure, phonon_code, dielectric_code, phonopy_code, protocol, overrides, options, simulation_mode, phonon_property, dielectric_property, **kwargs)
    559             # MBO: I do not understand why I have to do this, but it works
    560             builder.phonon = builder_phonon
--> 561             builder.phonon.symmetry = overrides["symmetry"]
    562 
    563             # Adding the bands and pdos inputs.

/opt/conda/lib/python3.9/site-packages/aiida/engine/processes/builder.py in __setattr__(self, attr, value)
    123                 validation_error = port.validate(value)  # type: ignore[union-attr]
    124                 if validation_error:
--> 125                     raise ValueError(f'invalid attribute value {validation_error.message}')
    126 
    127             # If the attribute that is being set corresponds to a port that is a ``PortNamespace`` we need to make sure

ValueError: invalid attribute value value 'symprec' is not of the right type. Got '<class 'float'>', expected '<class 'aiida.orm.nodes.data.float.Float'>'