We present PyCDFT, a Python package to compute diabatic states using
constrained density functional theory (CDFT). PyCDFT provides an
object-oriented, customizable implementation of CDFT, and allows for both
single-point self-consistent-field calculations and geometry optimizations.
PyCDFT is designed to interface with existing density functional theory (DFT)
codes to perform CDFT calculations where constraint potentials are added to the
Kohn-Sham Hamiltonian. Here we demonstrate the use of PyCDFT by performing
calculations with a massively parallel first-principles molecular dynamics
code, Qbox, and we benchmark its accuracy by computing the electronic coupling
between diabatic states for a set of organic molecules. We show that PyCDFT
yields results in agreement with existing implementations and is a robust and
flexible package for performing CDFT calculations. The program is available at
https://github.com/hema-ted/pycdft/.Comment: main text: 27 pages, 6 figures supplementary: 7 pages, 2 figure