fixes a long-standing bug with the way the get_work_function method interacts with a dipole correction. All old calculations using this method and a dipole correction may be various degrees of inaccurate.
This particular fix has been benchmarked with Jacapo for *CO on a 3x2 Pt(111) slab. When a dipole correction is turned on, the resulting calculated work functions are within 0.05 eV of each other. Previously, espresso would have returned a single average value of the two work functions.
fixes a long-standing bug with the way the get_work_function method interacts with a dipole correction. All old calculations using this method and a dipole correction may be various degrees of inaccurate.
This particular fix has been benchmarked with Jacapo for *CO on a 3x2 Pt(111) slab. When a dipole correction is turned on, the resulting calculated work functions are within 0.05 eV of each other. Previously, espresso would have returned a single average value of the two work functions.