JDFTx  1.3.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JDFTx Documentation

JDFTx is a plane-wave density-functional theory (DFT) code designed to be as easy to develop with as it is easy to use. It is distributed under the GPL license (version 3 or higher) and publications resulting from its use must cite:

  • R. Sundararaman, K. Letchworth-Weaver, K.A. Schwarz, D. Gunceler, Y. Ozhabes and T.A. Arias, 'JDFTx: software for joint density-functional theory', arXiv:1708.03621 (2017)

For any given calculation, JDFTx prints out a list of relevant citations for optional features of the code used in that run. This output appears at the end of initialization just before the first electronic solve starts.

JDFTx is written using highly-templated and object oriented C++11 code in order to express all the physics in the DFT++ algeraic framework [10], while simultaneously maintaining a small memory footprint and supporting a range of hardware architectures (such as GPUs using CUDA) without requiring hand-optimized implementations for each architecture. See Setting up JDFTx and Using JDFTx for setting up and getting started with JDFTx.


  • Exchange-correlation: semilocal, meta-GGA,
    EXX-hybrids, DFT+U, DFT-D2, LibXC
  • Pseudopotentials: norm-conserving and ultrasoft
  • Noncollinear magnetism / spin-orbit coupling
  • Algorithms: varitional minimization [2] [6], SCF [11]
  • Grand canonical (fixed potential) for electrochemistry [32]
  • Truncated Coulomb for 0D, 1D, 2D or 3D periodicity [24]
  • Custom external potentials, electric fields
  • Charged-defect corrections: bulk and interfacial
  • Ion/lattice optimization with constraints
  • Ab initio molecular dynamics
  • Vibrational modes, phonons and free energies


  • Linear solvation: GLSSA13 [9], SCCS [1], CANDLE [26]
  • Nonlinear solvation: GLSSA13 [9] [29]
  • Nonlocal solvation: SaLSA [31]
  • JDFT with classical DFT fluids [25] [30]

Outputs (selected)

  • DOS, optical matrix elements, polarizability etc.
  • Wannier functions [16] and ab initio tight-binding
  • Electron-electron and electron-phonon scattering


JDFTx supports all the standard functionality present in any electronic DFT software. It supports several semilocal, meta-GGA and EXX-hybrid exchange-correlation functions, with additional options available by linking to LibXC [15]. DFT+U [4] is available for treating localized electrons. Pair potential dispersion corrections [8] are available for including van der Waals interactions. JDFTx supports several formats of norm-conserving and ultrasoft pseudopotentials and comes pre-installed with an opens-ource library for each (see Pseudopotentials). With truncated Coulomb interactions [24], JDFTx enables accurate calculations of systems of any dimensionality from 0 to 3: molecules, wires, slabs / 2D materials and bulk.

A key feature of JDFTx is Joint Density Functional Theory (JDFT) [19], a framework for ab initio calculations of electronic systems in contact with liquid environments. The full power of Joint Density functional theory is unleashed when electronic DFT is coupled to a classical DFT or free energy functional for the fluid (see option ClassicalDFT in command fluid), which accounts for atomic-scale structure in the fluid [28] [25] [30].

Additionally, JDFTx implements a hierarchy of continuum solvation models, starting with simple local and linear solvation models [12] (option LinearPCM in command fluid) with several variants (command pcm-variant) including the default GLSSA13 [9], SCCS [1] (the model in Quantum Espresso) and CANDLE [26], which is the recommended solvation model especially for strongly charged and polar solutes. Note that GLSSA13 was later ported to VASP as VASPsol [18]; these models are identical. JDFTx also includes nonlinear solvation models [9] (option NonlinearPCM in command fluid) that account for dielectric saturation and ionic nonlinearities in the fluid response. Finally, the non-empirical solvation model SaLSA captures atomic-scale nonlocality of the fluid response at a linear-response level (option SaLSA in command fluid).

Unlike most other electronic structure codes, by default, JDFTx performs total energy minimization using analytically continued energy functionals [2] [6], rather than the conventional SCF schemes. Density and potential-mixing SCF algorithms [11] are also implemented in JDFTx, but for difficult systems when SCF diverges, variational minimization provides a useful fallback that is guaranteed to converge. This might be advantageous for vanilla DFT calculations in some cases, but it is critical for reliable convergence in the presence of liquids, especially with charged systems. A particularly useful feature in JDFTx for electrochemical systems is grand-canonical DFT [32] (see command target-mu), which allows the number of electrons to adjust automatically at a fixed electron chemical potential; variational minimization is also important for stable convergence in this mode.

JDFTx can export a wide-range of electronic structure and liquid properties including charge/site densities, potentials, density of states, vibrational/phonon modes and free energies, optical and electron-phonon matrix elements etc. (See command dump.) It can generate maximally-localized Wannier functions [16] and transform Hamiltonians and matrix elements into an ab initio tight-binding model. JDFTx is interfaced with several commonly-used visualization software, and with the Atomistic Simulation Environment for additional features such NEB barrier calculations and molecular dynamics. It also provides solvation functionality to other electronic structure software through interfaces, such as for Quantum Monte-Carlo (QMC) simulations in CASINO [21].