dftbplus / skprogs

Basic programs for generating Slater-Koster files for the DFTB-method
GNU Lesser General Public License v3.0
25 stars 19 forks source link

Integration of long-range corrected functionals #21

Closed vanderhe closed 2 years ago

vanderhe commented 2 years ago

Integrates functionality for long-range corrected xc-functionals in different parts of the codebase:

General remarks:

We would have to discuss hardcoded settings like the SCF potential convergency check, which is set to 1.0e-08_dp a.u. but ob2 was probably published with 1.0e-10_dp. For now, I just tightened it to 1.0e-10_dp (hardcoded).

The sktools now invoke the libxc implementations, which applies not only to the long-range corrected functionals but also to LDA and PBE. However, the Burke routines are still around and used if an appropriate input is supplied. I would really like to get rid of all of them, mainly because they are numerically unstable and I'm afraid to get (additional) nightmares from them otherwise.

The LCY-BNL functional still uses a short-range version of Burke's LDA/PBE implementation, since back in the days libxc's support for Yukawa separation was very limited it seems. It would (probably) be trivial to change it to libxc (XC_LDA_X_YUKAWA?).

A bunch of files (e.g. poisson solver, finite differences) and subroutines (mostly ancient reference implementations, Broyden mixer and 'getLcContribution') are still a mess, which is quite an understatement, and for sure numerically unstable :(

The xc-functional specification changed from

Globals {
    .
    .
  XCFunctional = pbe
}

to

Globals {
    .
    .
  XCFunctional = pbe {}
}

for (semi-)local functionals and

Globals {
    .
    .
  XCFunctional = lc-pbe {omega = 0.3}
}

for long-range corrected functionals.

awvwgk commented 2 years ago

A bunch of files (e.g. poisson solver, finite differences) and subroutines (mostly ancient reference implementations, Broyden mixer and 'getLcContribution') are still a mess, which is quite an understatement, and for sure numerically unstable :(

For the Broyden mixer we could rip the implementation from DFTB+ or the one in tblite.