From Gentoo Wiki
Jump to:navigation Jump to:search

Density Functional Theory Tight Binding (DFTB+) with MKL

Density functional Theory is a commonly accepted "gold standard"for ab initio methods. Many such methods such as VASP and quantum-espresso exist for filling this role. However, the scaling can be problematic for large simulations without very costly computational costs. Here I will discuss setting up a tightbinding version known as DFTB using the code DFTB+. The point will be to set up libraries to use with it and compile it from source to get MPI and OPENMPI to work. As far as I am aware gentoo does not have an article describing DFTB+ and instillation methods of these forms. This is mostly because DFTB is a very niche code and Machine Learning and Reaxff are very competitive in this area.

Short why use DFTB+ at all for at least testing (most likely may just delete this as it is not related to gentoo).

First the documentation is pretty decent for a niche code. Second the scaling is an order 1000 faster than DFT methods, DFTB+ and DFT will scale O(n^3). The accuracy in some areas is even better than that of DFT.

Set up for DFTB

These codes often are heavily parallelized. One should read very carefully read the following BLAS and LAPACK Providers and Blas-lapack-switch.

Problems that may arise

I have had a lot of problems getting openmpi to work. Currently am not sure what the problem is as it will just not work. It detects all my cpu but will not use them. (I think cmake is not finding the correct mkl and I think it is a linking problem. Once I figure this out I will update it in some depth in case this may help someone else. Will add this to BLAS and LAPACK)

Instillation of DFTB

DFTB+ has a github repo that can be found in (May make an ebuild for it later).

user $tar xvf dftb*
user $cd dftb*
user $cmake -B _build