JDFTx  1.7.0
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', SoftwareX 6, 278 (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 [13], 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] [8], SCF [14]
  • Grand canonical (fixed potential) for electrochemistry [38]
  • Truncated Coulomb for 0D, 1D, 2D or 3D periodicity [30]
  • 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 [12], SCCS [1], CANDLE [32]
  • Nonlinear solvation: GLSSA13 [12] [35]
  • Nonlocal solvation: SaLSA [37]
  • JDFT with classical DFT fluids [31] [36]

Outputs (selected)

  • DOS, optical matrix elements, polarizability etc.
  • Wannier functions [20] 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 [19]. DFT+U [5] is available for treating localized electrons. Pair potential dispersion corrections [Dispersion-Grimme] are available for including van der Waals interactions. JDFTx supports several formats of norm-conserving and ultrasoft pseudopotentials and comes pre-installed with an open-source library for each (see Pseudopotentials). With truncated Coulomb interactions [30], 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) [24], a framework for ab initio calculations of electronic systems in contact with liquid environments. The full power of Joint Density functional theory is unleashed [16] 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 [34] [31] [36].

Additionally, JDFTx implements a hierarchy of continuum solvation models, starting with simple local and linear solvation models [15] (option LinearPCM in command fluid) with several variants (command pcm-variant) including the default GLSSA13 [12], SCCS [1] (the model in Quantum Espresso) and CANDLE [32], which is the recommended solvation model especially for strongly charged and polar solutes. Note that GLSSA13 was later ported to VASP as VASPsol [22]; these models are identical. JDFTx also includes nonlinear solvation models [12] (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] [8], rather than the conventional SCF schemes. Density and potential-mixing SCF algorithms [14] 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 [38] (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 [20] 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 [27].