# Supporting files for Schubert et al. (2023) ## Description This repository contains input files, output files and scripts for reproducing the results of the article "Testing Koopmans spectral functionals on the analytically-solvable Hooke's atom". ## Contents The three folders "omega_one_tenth", "omega_one_half", and "omega_ten" contain the corresponding files for the three different values of omega presented in the article. They follow a very similar structure: - The folder "Convergence_Analysis" contains all necessary files to run the convergence analysis. It also contains a Readme with instructions needed to reproduce these results - The folder "Analysis/Analysis_*" contains all necessary files to run the actual computations. It also contains a Readme with instructions needed to reproduce these results and a script to plot all potentials and extract the eigenenergies as well as the total energies. - Finally, a plot containing the densities for all three systems can be generated by running "plot.py" in "plotting". ## Reproducing the results For our calculations we used the following versions of Koopmans and Quantum ESPRESSO: 1. Quantum ESPRESSO version 4.1 (hereafter referred to as **old_q-e**) 2. Quantum ESPRESSO version 6.8 (hereafter referred to as **q-e**) 3. Commit 5548809 of the Koopmans repository (https://github.com/epfl-theos/koopmans/tree/55488090) (hereafter referred to as **koopmans**) Please provide in "omega_*/paths.txt" your installation paths: - old_pp : absolute path to the source code of pp.x of **old_q-e** - new_pp : absolute path to the source code of pp.x of **q-e** - new_pw : absolute path to the source code of pw.x of **q-e** - koopmans_kcp : absolute path to the source code of kcp.x of **koopmans** Further you might need to change some settings in the source code of the different QE versions used to run the calculations to get exactly the same results (see below) ### Modifications to the source codes in **q-e**: in Modules/read_pseudo.f90 - approx. in line 65 in `readpp()` set the parameter `rcut` from `10.0` to `12.0` for $\omega=0.5$ and to `30.0` for $\omega=0.1$, leave unchanged for $\omega=10$ in XClib/xc_input_params_mod.f90 - approx. in line 65 and 69 in `MODULE dft_par_mod` set the parameter `rho_threshold_gga` from `E-6` to `E-10` and `grho_threshold_gga` from `E-10` to `E-14` in **koopmans**: in quantum_espresso/cp_koopmans/Modules/functionals.f90: - approx. in line 842 in subroutine `gcxc()` set the parameter `small` from `E-10` to `E-14` - approx. in line 936 in subroutine `gcx_spin()` set the parameter `small` from `E-10` to `E-14` - approx. in line 1086 in subroutine `gcc_spin()` set the parameter `small` from `E-10` to `E-14` and `epsr` from `E-6` to `E-10` in quantum_espresso/cp_koopmans/CPV/pseudo_base.f90 - approx. in line 223 in subroutine `formfn()` change `<10.0d0` to `<12.0d0` for $\omega=0.5$ and to `<30.0d0` for $\omega=0.1$, leave unchanged for $\omega=10$ in quantum_espresso/cp_koopmans/CPV/exch_corr.f90 - approx. in line 727 in subroutine `exch_corr_wrapper()` set the parameter `epsr` from `E-6` to `E-10` and `epsg` from `E-10` to `E-14` in quantum_espresso/cp_koopmans/CPV/nksiclib.f90 - approx. in line 487 in subroutine before `if (draw_pot) then` add a line `call write_pot_sic ( vsic(:, 1) )`. Uncomment this line for the KIPZ_LUMO-calculation in quantum_espresso/cp_koopmans/Modules/xml_io_base.f90 - approx. in line 1516 change `CALL iotk_write_begin( potunit, "EFFECTIVE-POTENTIAL" )` to `CALL iotk_write_begin( potunit, "CHARGE-DENSITY" )` - approx. in line 1964 change `CALL iotk_write_begin( potunit, "EFFECTIVE-POTENTIAL" )` to `CALL iotk_write_end( potunit, "CHARGE-DENSITY" )` in koopmans/workflows/_koopmans_dscf.py: - introducing mixing can improve the convergence of the self-consistent computation of the screening parameters for KIPZ. To introduce mixing change alpha = alpha_guess * (dE - lambda_0) / (lambda_a - lambda_0) approx. in line 1015 to mixing = 0.9 alpha_new = alpha_guess * (dE - lambda_0) / (lambda_a - lambda_0) alpha = alpha_guess * mixing + (1-mixing)*alpha_new" in **old_q-e**: in espresso-4.1/PW/read_pseudo.f90 - approx. in line 34 in `readpp()` set the parameter `rcut` from `10.0` to `12.0` for $\omega=0.5$ and to $30.0$ for $\omega=0.1$, leave unchanged for $\omega=10$ in espresso-4.1/PW/gradcorr.f90 - approx. in line 51 in subroutine `exch_corr_wrapper()` set the parameter `epsr` from `E-6` to `E-10` and `epsg` from `E-10` to `E-14` in espresso-4.1/Modules/functionals.f90: - approx. in line 844 in subroutine `gcxc()` set the parameter `small` from `E-10` to `E-14` - approx. in line 939 in subroutine `gcx_spin()` set the parameter `small` from `E-10` to `E-14` - approx. in line 1089 in subroutine `gcc_spin()` set the parameter `small` from `E-10` to `E-14` and `epsr` from `E-6` to `E-10`