lsmo-epfl / aiida-lsmo

AiiDA workflows for the LSMO laboratory at EPFL
Other
9 stars 13 forks source link

multicomp_gcmc workchain gives key error #90

Closed MAlberts99 closed 3 years ago

MAlberts99 commented 3 years ago

The multicomp_gcmc workchain throws a key error for the enthalpy of adsorbtion with both examples not working right now. This is caused by the get_output_parameters function trying to look up the enthalpy of adsorbtion for each component as shown in the simplified snippet below:

comp = comp_dict['name']
for label in ['enthalpy_of_adsorption_average', 'enthalpy_of_adsorption_dev']:
    out_dict[label][comp] = conv_ener * gcmc_out['components'][comp][label]

However, both enthalpy of adsorbtion and dev are located in the general part of the output dictionary (see txt file). A potential work around is:

for label in ['enthalpy_of_adsorption_average', 'enthalpy_of_adsorption_dev']:
    out_dict[label] = conv_ener * gcmc_out['general'][label]

I am not certain if there is a way of changing the parameters to obtain the enthalpy of adsorbtion for each component which would be the preferable solution.

raspa_output.txt

ltalirz commented 3 years ago

@danieleongari can you comment on this?

danieleongari commented 3 years ago

Hi, yes this is a bug. It is reasonable that we did not notice this before, because the Enthalpy of adsorption for a mixture it not a very valuable information (at least for our analysis!). I will fix it soon.

MAlberts99 commented 3 years ago

Thank you very much. No worries.

danieleongari commented 3 years ago

Fixed in c99f4525cf6ed973fabd5de126826bc15019885e