# Forces and stresses

### This page gives hints on how to to tune the computation of forces and stresses with the ABINIT package.

##### Copyright (C) 2016-2017 ABINIT group (FJ)

Mentioned in help_features#2.4.

### Table of content:

- 1. Introduction.
- 2. Related lesson(s) of the tutorial.
- 3. Related input variables.
- 4. Selected input files.

### 1. Introduction.

Hellman-Feynman forces are computed from an analytical formula, and corresponds exactly to the limit of finite differences of energy for infinitesimally small atomic displacements when the ground-state calculation is at convergence. This feature is available for all the cases where the total energy can be computed. A correction for non-converged cases allows to get accurate forces with less converged wavefunctions than without it. The decomposition of the forces in their different components can be provided.

Stress can also be computed. This feature is available for all the cases where the total energy can be computed (except wavelets). The decomposition of the stresses in their different components can be provided. A smearing scheme applied to the kinetic energy ecutsm allows one to get smooth energy curves as a function of lattice parameters and angles. A target stress can be given by the user (strtarget), the geometry optimization algorithm will try to find the primitive cell and atomic positions that deliver that target stress.

The computation of forces and stresses is optional, see optforces and optstress. They are used to define SCF stopping criteria (toldff, tolrff) or geometry optimization stopping criteria (tolmxf). For the geometry optimization, combined cell shape and atomic position optimization need a conversion scale, set by strprecon.
Go to the top

### 2. Related lesson(s) of the tutorial.

- The lesson 1 deals with the H2 molecule : get the total energy, the electronic energies, the charge density, the bond length, the atomisation energy
- The lesson 2 deals again with the H2 molecule: convergence studies, LDA versus GGA
- The lesson 3 deals with crystalline silicon (an insulator): the definition of a k-point grid, the smearing of the cut-off energy, the computation of a band structure, and again, convergence studies ...
- The lesson 4 deals with crystalline aluminum (a metal), and its surface: occupation numbers, smearing the Fermi-Dirac distribution, the surface energy, and again, convergence studies ...
Go to the top

### 3. Related input variables.

Basic input variables:

... optforces [OPTions for the calculation of FORCES]
... optstress [OPTion for the computation of STRESS]
... toldff [TOLerance on the DiFference of Forces]
... tolrff [TOLerance on the Relative diFference of Forces]

Useful input variables:

... strprecon [STRess PRECONditioner]
... strtarget [STRess TARGET]
Go to the top

### 4. Selected input files.

WARNING : as of ABINITv8.6.x, the list of input files provided in the specific section of the topics Web pages is still to be reviewed/tuned. In some cases, it will be adequate, and in other cases, it might be incomplete, or perhaps even useless.
The user can find some related example input files in the ABINIT package in the directory /tests, or on the Web:

tests/v2/Input: t50.in
Go to the top