Skip to content
Density-functional toolkit
Julia Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
codegen/xc_fallback
data/psp/hgh
deps
docs
examples
src
test
.bumpversion.cfg
.gitignore
.travis.yml
LICENSE
Project.toml
README.md

README.md

DFTK.jl

license Build Status on Linux Coverage Status DOI

DFTK, short for the density-functional toolkit is a library of Julia routines for experimentation with plane-wave-based density-functional theory (DFT), as implemented in much larger production codes such as Abinit, Quantum Espresso and VASP. The main aim at the moment is to provide a platform to facilitate numerical analysis of algorithms and techniques related to DFT. For this we want to leverage as much of the existing developments in plane-wave DFT and the related ecosystems of Julia python or C codes as possible.

The library is at an early stage and the supported feature set is thus still limited. Current features include:

  • Lattice construction and problem setup based on pymatgen
  • Plane-wave discretisations building on top of FFTW.jl.
  • All LDA and GGA functionals from Libxc.jl.
  • Insulators and metals (Fermi-Dirac or Methfessel-Paxton smearing)
  • GTH or HGH pseudopotentials
  • Exploitation of Brillouin zone symmetry for k-Point sampling
  • Three SCF algorithms (Anderson mixing, NLsolve.jl, damping)
  • Band structure generation
  • Computation of density of states (DOS) and local density of states (LDOS)
  • Full access to intermediate quantities (density, Bloch wave)
  • Support for arbitrary floating point types, including Float32 (single precision) or Double64 (from DoubleFloats.jl. (Only for selected DFT functionals at the moment).

Note: This code has only been compared against standard packages for a small number of test cases and might still contain bugs. Use for production calculations is not yet recommended.

Installation

The package is not yet registered in the General registry of Julia. Instead you can obtain it from the MolSim registry, which contains a bunch of packages related to performing molecular simulations in Julia. Note that at least Julia 1.2 is required.

First add MolSim to your installed registries. For this use

] registry add https://github.com/JuliaMolSim/MolSim.git

for a Julia command line (version at least 1.1). Afterwards you can install DFTK like any other package in Julia:

] add DFTK

Some parts of the code require a working Python installation with the libraries scipy, pymatgen and spglib. The examples require matplotlib as well. Check out which version of python is used by the PyCall.jl package, and use the corresponding package manager (usually apt, pip or conda) to install these libraries, for example

pip install scipy spglib matplotlib pymatgen

You can then run the code in the examples/ directory.

Perspective

Despite the current focus on numerics, the intention is to keep the project rather general, so that this platform is useful for general research in materials science.

Citation

DOI

Contact

Feel free to contact us (@mfherbst and @antoine-levitt) directly, open issues or submit pull requests. Any contribution or discussion is welcome!

You can’t perform that action at this time.