aiidateam / aiida-quantumespresso

The official AiiDA plugin for Quantum ESPRESSO
https://aiida-quantumespresso.readthedocs.io
Other
55 stars 82 forks source link

`XspectraCrystalWorkChain`: WorkChain Excepts for `xch_smear` Core-Hole Type #1046

Open PNOGillespie opened 2 weeks ago

PNOGillespie commented 2 weeks ago

When running calculations using the xch_smear core-hole treatment setting, the XspectraCrystalWorkChain excepts during run_all_xspectra_core. The offending lines (688-691) are:

            # remove any duplicates created from the "core_hole_treatments.yaml" defaults
            for key in new_scf_params['SYSTEM'].keys():
                if 'starting_magnetization(' in key:
                    new_scf_params['SYSTEM'].pop(key, None)

This was introduced in the last update to the WorkChain in order to make it work better with starting_magnetization settings, but causes a crash because we're poping keys from the same dictionary that we're iterating over.

PNOGillespie commented 2 weeks ago

@superstar54: A fix for this is ready to go. Additionally, I found out that, due to a typo, the abs_atom_marker input for the WorkChain actually doesn't work. I will slip that change in with this one since it just involves a simple change to one line.

superstar54 commented 2 weeks ago

Thanks for reporting the issue and also for the fix, please go ahead!