RE (Reverse-Engineering)¶
The RE code calculates the exact Kohn-Sham (KS) potential [and hence exact exchange-correlation (xc) potential] for a given electron density \(n(x,t)\).
Ground-state Kohn-Sham potential¶
The ground-state KS potential \(V_{\mathrm{KS}}(x,0)\) is calculated by starting from the unperturbed external potential and iteratively correcting using the algorithm:
where \(n_{\mathrm{KS}}(x,0)\) is the ground-state KS electron density, and \(\mu\) and \(p\) are convergence parameters. The correct \(V_{\mathrm{KS}}(x,0)\) is found when \(n_{\mathrm{KS}}(x,0) = n(x,0)\).
Time-dependent Kohn-Sham potential¶
The time-dependent KS potential \(V_{\mathrm{KS}}(x,t)\) is calculated by applying a temporary gauge transformation and iteratively correcting a time-dependent KS vector potential \(A_{\mathrm{KS}}(x,t)\) using the algorithm:
where \(j(x,t)\) is the current density of the interacting system and \(j_{\mathrm{KS}}(x,t)\) is the current density of the KS system. Once the correct \(A_{\mathrm{KS}}(x,t)\) is found, the gauge transformation is removed to calculate the full time-dependent KS potential as a scalar quantity.