Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time

DFTK.jl: The density-functional toolkit.

The density-functional toolkit, DFTK for short, is a library of Julia routines for playing with plane-wave density-functional theory (DFT) algorithms. In its basic formulation it solves periodic Kohn-Sham equations. The unique feature of the code is its emphasis on simplicity and flexibility with the goal of facilitating methodological development and interdisciplinary collaboration. In about 7k lines of pure Julia code we support a [sizeable set of features](@ref package-features). Our performance is of the same order of magnitude as much larger production codes such as Abinit, Quantum Espresso and VASP. DFTK's source code is publicly available on github.

If you are new to density-functional theory or plane-wave methods, see our notes on [Periodic problems](@ref periodic-problems) and our collection of [lectures, workshops and literature on DFT](@ref density-functional-theory).

!!! tip "DFTK summer school: 29th to 31st August 2022 in Paris, France" We will organise a summer school centred around the DFTK code and modern approaches to density-functional theory from 29 to 31 August 2022 at Sorbonne Université, Paris. For more details and registration info see the school's website.

[Package features](@id package-features)

  • Methods and models:
    • Standard DFT models (LDA, GGA, meta-GGA): Any functional from the libxc library
    • Flexibility to build your own Kohn-Sham model: Anything from analytic potentials, linear Cohen-Bergstresser models, Gross-Pitaevskii equations, anyonic models, etc.
    • Analytic potentials or Godecker norm-conserving pseudopotentials (GTH, HGH)
    • Brillouin zone symmetry for k-point sampling using spglib
    • Standard smearing functions (including Methfessel-Paxton and Marzari-Vanderbilt cold smearing)
    • Collinear spin polarization for magnetic systems
    • Self-consistent field approaches including Kerker mixing, LDOS mixing, adaptive damping
    • Direct minimization, Newton solver
    • Multi-level threading (k-points eigenvectors, FFTs, linear algebra)
    • MPI-based distributed parallelism (distribution over k-points)
    • 1D / 2D / 3D systems
    • External magnetic fields
    • Treat systems of 1000 electrons
  • Ground-state properties and post-processing:
    • Total energy
    • Forces, stresses
    • Density of states (DOS), local density of states (LDOS)
    • Band structures
    • Easy access to all intermediate quantities (e.g. density, Bloch waves)
  • Support for arbitrary floating point types, including Float32 (single precision) or Double64 (from DoubleFloats.jl).
  • Runs out of the box on Linux, macOS and Windows
  • Third-party integrations:

Missing a feature? Look for an open issue or create a new one. Want to contribute? See our contributing notes.

[Example index](@id example-index)

First, new users should take a look at the Installation and Tutorial sections. More details about DFTK are explained in the examples as we go along:

Pages = [
    "examples/metallic_systems.md",
    "examples/pymatgen.md",
    "examples/ase.md",
    "examples/collinear_magnetism.md",
    "examples/geometry_optimization.md",
    "examples/scf_callbacks.md",
    "examples/scf_checkpoints.md",
    "examples/polarizability.md",
    "examples/gross_pitaevskii.md",
    "examples/gross_pitaevskii_2D.md",
    "examples/cohen_bergstresser.md",
    "examples/arbitrary_floattype.md",
    "examples/forwarddiff.md",
    "examples/custom_solvers.md",
    "examples/custom_potential.md",
    "examples/wannier90.md",
    "examples/error_estimates_forces.md",
]
Depth = 1

These and more examples can be found in the examples directory of the main code.

!!! note "Convergence parameters in the documentation" In the documentation we use very rough convergence parameters to be able to automatically generate this documentation very quickly. Therefore results are far from converged. Tighter thresholds and larger grids should be used for more realistic results.

If you have a great example you think would fit here, please open a pull request!