I want to find the Cauchy stress tensor in certain materials with ab initio methods. I already have the analytical form of my own definition of "energy" and "forces" (not from DFT), and I now wonder how to derive the stress tensor from them? I've checked Kittel's Intro to Solid State Physics and Lautrup's Physics of Continuous Matter, but it's not discussed there.

Any recommendation for the right reference to this specific problem? It can be a DFT textbook if it has some detailed discussion in it about how to obtain the Cauchy stress tensor from a DFT energy and forces.

Dr. Clark's CASTEP workshop lecture 14 seems to have the answer to my question on page 7. But I'm still a little bit confused on how to implement Hellman-Feynman Theorem to get the stress tensor.

  • $\begingroup$ +1 and welcome to our new community! Thank you so much for contributing your question here and we hope to see much more of you in the future !!! Hopefully you get a quick answer! $\endgroup$ Dec 28, 2021 at 22:16
  • $\begingroup$ If you know imposed strain on simulation box, you can get cauchy stress using strain energy density . But still it is tricky because we define strain energy of entire simulation box, hence stress tensor is defined for whole box. $\endgroup$ Dec 29, 2021 at 15:07
  • $\begingroup$ @pranavkumar Can we impose strain on the unit cell? That is what I want to do. I want to do structual optimization without fixing the cell parameters. $\endgroup$
    – Tack_Tau
    Dec 29, 2021 at 15:34
  • $\begingroup$ @Tack_Tau the answer seemed more like clarification of your question, so I edited into your post. $\endgroup$
    – Tyberius
    Dec 29, 2021 at 15:41
  • $\begingroup$ @Tyberius Thanks! $\endgroup$
    – Tack_Tau
    Dec 29, 2021 at 15:42

1 Answer 1


A useful reference for this is [1], which describes how to compute the energy, forces, and stress tensor efficiently when performing PBC calculations using Gaussian atomic orbitals.

Assuming you can calculate forces, the stress isn't too much more challenging to calculate. For a uniform lattice deformation due to strain $\epsilon_{ab}$, the stress is computed as:

$$\tag{1}\frac{\delta E}{\delta\epsilon_{ab}}=\sum_c^{\text{cells}}\sum_{I\in c}^\text{atoms}r^a_{I_c}\frac{dE}{dr^b_{I_c}}$$

where $I_c$ indexes atoms in cell $c$, $E$ is the energy per unit cell, and $r$ is the Cartesian coordinates of all the atoms in all cells.

The referenced paper provides detailed expressions for the various terms that contribute to this equation. It mostly boils down to two types of terms

  1. Forces on atoms times their position in the central cell (changes in the system energy due to changing the atomic positions)
  2. Forces on atoms in each cell times the corresponding lattice vectors/cell indicies (changes in the system energy due to changing lattice vector length).


  1. Kudin, K. N.; Scuseria, G. E. Linear-scaling density-functional theory with Gaussian orbitals and periodic boundary conditions: Efficient evaluation of energy and forces via the fast multipole method. Phys. Rev. B 2000, 61 (24), 16440–16453. DOI: 10.1103/PhysRevB.61.16440.

You must log in to answer this question.