  We study the direct calculation of total energy derivatives for lattice
dynamics and electron-phonon coupling calculations using supercell matrices
with non-zero off-diagonal elements. We show that it is possible to determine
the response of a periodic system to a perturbation characterized by a wave
vector with reduced fractional coordinates $(m_1/n_1,m_2/n_2,m_3/n_3)$ using a
supercell containing a number of primitive cells equal to the least common
multiple of $n_1$, $n_2$, and $n_3$. If only diagonal supercell matrices are
used, a supercell containing $n_1n_2n_3$ primitive cells is required. We
demonstrate that the use of non-diagonal supercells significantly reduces the
computational cost of obtaining converged zero-point energies and phonon
dispersions for diamond and graphite. We also perform electron-phonon coupling
calculations using the direct method to sample the vibrational Brillouin zone
with grids of unprecedented size, which enables us to investigate the
convergence of the zero-point renormalization to the thermal and optical band
gaps of diamond.

Materials Science