XAS: tot_charge
Advanced Setting Interferes with Core-Hole Treatment Options
#807
Labels
bug
Something isn't working
Issue
Running the XAS plugin, both with and without setting
tot_charge
in the advanced settings tab causes calculations with the FCH treatment setting to fail because the overrides dictionary obtained from the advanced settings widget containstot_charge = 0
by default, which overrides the core-hole treatment default (tot_charge = 1
).Proposed Solution
Since the advanced settings control
tot_charge
, and the original intention in the aiida-quantumespresso plugins for XAS and XPS was to let users change such settings as desired, the simplest solution seems to be topop()
the parameter from the overrides of the XAS calculation for the case oftot_charge = 0
so that FCH calculations work properly (including in parallel with XCH calculations on the same workflow run). Otherwise, thetot_charge
defined by the user will be used in the XAS or XPS calculation.Additional Note
Doing XAS calculations with charged systems is possible, since we don't calculate the energy position of the XANES spectrum in absolute terms, though users should only do this for one element at a time. XPS calculations of solid-states systems however rely on the cell being neutral (
tot_charge = 0
) in order for the calculation of absolute binding energies to work properly. The documentation (maybe also the UI) for XAS and XPS should therefore be updated to make these points clear.The text was updated successfully, but these errors were encountered: