Category:Forces: Difference between revisions

From VASP Wiki
 
(40 intermediate revisions by 3 users not shown)
Line 1: Line 1:
On this page the computation of forces acting on ions will be presented.
'''Forces''' on particles are a fundamental concept in condensed matter physics and chemistry. These forces describe the interactions that cause particles, such as atoms and molecules, to move and behave in specific ways. In VASP, forces result from electromagnetic interactions, which can be computed by means of the [[Hellmann-Feynman forces|Hellmann-Feynman theorem]] within DFT, the [[ACFDT/RPA calculations|random-phase approximation]] or by the use of [[Machine learning force field: Theory|machine learning force fields]]. Understanding interaction forces between atoms is crucial in many aspects of science, for example:
=== Introduction ===
* predicting the atomic structure of solids and molecules ([[Ionic minimization|ionic relaxation]])
Forces on particles are a fundamental concept in condensed matter physics and chemistry. These forces describe the interactions that cause particles, such as atoms and molecules, to move and behave in specific ways. In VASP forces result from electromagnetic interactions which can be computed from DFT by the use of the [[Hellmann-Feynman forces|Hellmann-Feynman theorem]], the [[ACFDT/RPA calculations|random-phase approximation]] or by the use of [[Machine learning force field: Theory|machine learning force fields]]. Understanding these forces is crucial in many aspects of science, as for example:
* chemical reactions, catalysis, etc. ([[Transition states|transition states]])
* predicting the atomic structure of solids and molecules
* thermodynamic processes ([[MD|molecular dynamics]])
* to engineer and design new materials
* predicting and optimizing chemical reactions
* improving and understanding catalysis
* predicting and understanding thermodynamic proerties


Formally the force can be defined as follows. Let <math>\mathbf{r}(t)</math> be the position of the particle, then the velocity is defined as the change of position with time
Formally, the force can be defined as follows. Let <math>\mathbf{r}(t)</math> be the position of the particle, then the velocity is defined as the change of position with time


<math>
:<math>
\mathbf{v}(t) = \frac{d\mathbf{r}(t)}{dt}
\mathbf{v}(t) = \frac{d\mathbf{r}(t)}{dt}
</math>
</math>


and the momentum <math>\mathbf{p}(t)</math> of the particle is the velocity times the particle mass m
and the momentum <math>\mathbf{p}(t)</math> of the particle is the velocity times the particle mass <math>m</math>


<math>
:<math>
\mathbf{p}(t) = m\mathbf{v}(t)
\mathbf{p}(t) = m\mathbf{v}(t).
</math>
</math>


Newton's second law of motion states that the change of motion of an object is proportional to the force acting on the object and oriented in the same direction as the force vector. Therefore the force is defined as the change of particle momentum with time
Newton's second law of motion states that the change of motion of an object is proportional to the force acting on the object and oriented in the same direction as the force vector. Therefore, the force is defined as the change of particle momentum with time


<math>
:<math>
\mathbf{F}(t) = m\frac{d\mathbf{p}(t)}{d t} = m\mathbf{a}(t),
\mathbf{F}(t) = m\frac{d\mathbf{v}(t)}{d t} = m\mathbf{a}(t),
</math>
</math>


where <math> \mathbf{a}(t) </math> is the acceleration of the particle. With this equation of motion, the knowledge of some starting conditions  
where <math> \mathbf{a}(t) </math> is the acceleration of the particle. With this equation of motion, the knowledge of some starting conditions <math>\mathbf{r}(0)</math> and <math>\mathbf{v}(0)</math> and an algorithm to compute the forces <math> \mathbf{F} </math> the trajectory <math> \mathbf{r}(t)</math> of a particle can be predicted for all times.
<math>\mathbf{r}(0)</math> and <math>\mathbf{v}(0)</math> and an algorithm to compute the forces <math> \mathbf{F} </math> the trajectory <math> \mathbf{r}(t)</math> of a particle can be predicted for all times.


=== Theory ===
== Theory ==
There is an important relation between forces and the negative gradient of the potential energy which can be computed from the Lagrangian of the particle system of interest. The Lagrangian for
The force and the negative gradient of the potential energy is directly related. The gradient of the potential energy can be computed from the Lagrangian of the particle system of interest. The Lagrangian for an N particle system is
a N particle system is


<math>
:<math>
L= \sum_{i=1}^{N}m_{i}\mathbf{v}^{2}_{i} - V(\{\mathbf{r}_{i}\}),
L= \sum_{i=1}^{N}m_{i}\mathbf{v}^{2}_{i} - V(\{\mathbf{r}_{i}\}),
</math>
</math>
Line 39: Line 33:
where <math> V(\{\mathbf{r}_{i}\})</math> is the potential energy of the system. With Lagrange's equation of the second kind
where <math> V(\{\mathbf{r}_{i}\})</math> is the potential energy of the system. With Lagrange's equation of the second kind


<math>
:<math>
\frac{d}{dt}\frac{\partial L}{\partial \mathbf{v}_{i}}=\frac{\partial L}{\partial \mathbf{r}_{i}}
\frac{d}{dt}\frac{\partial L}{\partial \mathbf{v}_{i}}=\frac{\partial L}{\partial \mathbf{r}_{i}}
</math>
</math>
Line 45: Line 39:
the relation  
the relation  


<math>
:<math>
\mathbf{F}_{i} = -\frac{\partial V(\{\mathbf{r}_{i}\})}{\partial \mathbf{r}_{i}} = -\nabla V(\{\mathbf{r}_{i}\}).
\mathbf{F}_{i} = -\frac{\partial V(\{\mathbf{r}_{i}\})}{\partial \mathbf{r}_{i}} = -\nabla V(\{\mathbf{r}_{i}\}).
</math>
</math>


Therefore to predict forces and particle trajectories a way to compute the negative gradient of the potential energy has to be established.
In order to predict forces and particle trajectories, the negative gradient of the potential energy has to be computed.  




'''DFT Forces'''
===DFT Forces===


One way to compute the potential energy's negative gradient is through DFT. In DFT there is no classical potential energy function <math> V(\{\mathbf{r}_{i}\}) </math> but a Hamiltonian <math> \mathcal{H} </math> depending on the ionic positions <math> \mathbf{R}_{i}</math> and the electronic positions <math> \mathbf{r}_{i}</math>. The exact form of the Hamiltonian is given by
One way to compute the potential energy's negative gradient is through DFT. In DFT there is no classical potential energy function <math> V(\{\mathbf{r}_{i}\}) </math> but a Hamiltonian <math> \mathcal{H} </math> depending on the ionic positions <math> \mathbf{R}_{i}</math> and the electronic positions <math> \mathbf{r}_{i}</math>. The exact form of the Hamiltonian is given by
Line 60: Line 54:
</math>
</math>


where <math> n(\mathbf{r}) </math> denotes the electronic ground state density and <math> \psi_{i} </math> are the Kohn-Sham orbitals. <math> E_{XC} </math> is the exchange correlation energy. To obtain the force acting on ion A the Hellmann-Feynman theorem has to be used.  
where <math> n(\mathbf{r}) </math> denotes the electronic ground-state density and <math> \psi_{i} </math> are the Kohn-Sham orbitals. <math> E_{XC} </math> is the exchange-correlation energy. To obtain the force acting on ion A, the Hellmann-Feynman theorem has to be used.  


<math>
<math>
\mathbf{F}_{A}=-\nabla_{A} E_{tot}^{KS-DFT}=\nabla_{A}\sum_{A}\int\frac{Z_{A}}{\left\vert{\bf r}-{\bf R}_{A}\right\vert}n^{KS-DFT}({\bf r})d^{3}r -\nabla_{A}\frac{1}{2}\sum_{A\ne B}\frac{Z_{A}Z_{B}}{\left\vert{\bf R}_{A}-{\bf R}_{B}\right\vert}
\mathbf{F}_{A}=-\nabla_{A} E_{tot}^{KS-DFT}=\nabla_{A}\sum_{A}\int\frac{Z_{A}}{\left\vert{\bf r}-{\bf R}_{A}\right\vert}n^{KS-DFT}({\bf r})d^{3}r -\nabla_{A}\frac{1}{2}\sum_{A\ne B}\frac{Z_{A}Z_{B}}{\left\vert{\bf R}_{A}-{\bf R}_{B}\right\vert},
</math>
</math>


where <math> \nabla_{A} </math> denotes the gradient with respect to ionic position <math>\mathbf{R}_{A}</math>. The DFT forces will depend on the chosen [[:Category:Exchange-correlation functionals|exchange correlation functional]] via the electronic ground state density <math> n^{KS-DFT}({\bf r}) </math>. Therefore the choice of the proper exchange correlation
where <math> \nabla_{A} </math> denotes the gradient with respect to ionic position <math>\mathbf{R}_{A}</math>. The DFT forces will depend on the chosen [[:Category:Exchange-correlation functionals|exchange-correlation functional]] via the electronic ground-state density <math> n^{KS-DFT}({\bf r}) </math>. Therefore, the choice of the proper exchange-correlation functional for the system of interest is crucial for obtaining proper forces and, hence, the correct material properties.
functional for the system of interest is crucial for obtaining proper forces and hence the correct material properties.


'''RPA-forces'''
===RPA-forces===


To obtain more accurate forces the [[ACFDT/RPA calculations|RPA]] approximation can be used to get better
The [[ACFDT/RPA calculations|RPA]] approximation can be used to yield estimates for the exchange-correlation energy as well as forces ({{TAG|LRPAFORCE}}) within [[Many-body perturbation theory|many-body perturbation theory]].{{cite|ramberger:prl:118}}
estimates for the exchange correlation energy. The RPA adds the following correlation energy to the DFT ground state energy
<!---
The RPA adds the following correlation energy to the DFT ground state energy


<math>
<math>
Line 83: Line 77:
\mathbf{F}_{A}=-\nabla_{A} E_{tot}^{DFT-RPA}=\nabla_{A}\sum_{A}\int\frac{Z_{A}}{\left\vert{\bf r}-{\bf R}_{A}\right\vert}n^{DFT-RPA}({\bf r})d^{3}r -\nabla_{A}\frac{1}{2}\sum_{A\ne B}\frac{Z_{A}Z_{B}}{\left\vert{\bf R}_{A}-{\bf R}_{B}\right\vert}
\mathbf{F}_{A}=-\nabla_{A} E_{tot}^{DFT-RPA}=\nabla_{A}\sum_{A}\int\frac{Z_{A}}{\left\vert{\bf r}-{\bf R}_{A}\right\vert}n^{DFT-RPA}({\bf r})d^{3}r -\nabla_{A}\frac{1}{2}\sum_{A\ne B}\frac{Z_{A}Z_{B}}{\left\vert{\bf R}_{A}-{\bf R}_{B}\right\vert}
</math>
</math>
--->
Note that the RPA is a correction to the underlying functional. Therefore, the choice
of the proper [[:Category:Exchange-correlation functionals|exchange-correlation functional]] is still crucial in the RPA approach for obtaining forces.
The RPA forces are computed by the following equation
<math>
\mathbf{F}_{A}=-Tr[\rho^{(1)}\nabla_{A}V^{KS}-\gamma^{(1)}\nabla_{A}S]
</math>
The operators <math>\rho^{1}</math> and <math>\gamma^{1}</math> are associated with the functional derivatives <math>\delta E/\delta V^{KS}</math> and <math>\delta E/\delta S</math> respectively. S defines the overlap operator between the Kohn-Sham orbitals of the used DFT approximation. The first term of the force equation can be associated with the exchange energy and the second term of the equation can be associated with the correlation part.
{{NB|mind|It is recommended to use the Perdew-Burke-Ernzerhof (PBE) XC potential.}}
{{NB|mind|It is recommended to use the [[Available PAW potentials#Recommended potentials for GW/RPA calculations|GW POTCAR-files]].}}


Note that the RPA is a correction to the underlying DFT approximation of the forces. Therefore the choice
===Machine-learned forces===
of the proper [[:Category:Exchange-correlation functionals|exchange correlation functional]] is still crucial in the RPA approach for obtaining forces.


'''Machine-learning forces'''
A speedy but less accurate approach for obtaining forces is through a [[MLFF|machine-learned force field (MLFF)]].  In this approach, a machine-learning model is first trained on either the DFT or RPA forces, whereby also energies and stresses are considered. In the case of the RPA, the stress tensor is not computed. The machine-learning approach will be an approximation to the underlying method against which it was fitted.


A speedy but less accurate approach for obtaining forces is the machine learning approach. In this
The machine learning force field decomposes the total DFT energy into local atomic contributions <math> E_{B}(\{\mathbf{R}_{C}\}) </math> depending on all atomic positions in the system. Therefore, the force acting on ion A is computed by
approach, a machine learning model is first fitted to either the DFT or RPA approach. During training the MLFF the forces, energies, and stresses are fitted with respect to a DFT or RPA approach. In the case of the RPA the stress tensor is not computed. The machine learning approach will be an approximation to the underlying method against which it was fitted. The machine learning force field decomposes the total DFT energy into local atomic contributions <math> E_{B}(\{\mathbf{R}_{C}\}) </math> depending on all atomic positions in the system. Therefore the force acting on ion A is computed by


<math>
:<math>
\mathbf{F}_{A} = -\nabla_{A}\sum_{B=1}^{N}E_{B}(\{\mathbf{R}_{C}\})=-\sum_{B}^{N}w_{B}\frac{dK(\{\mathbf{R}_{C}\})}{d\mathbf{R}_{A}},
\mathbf{F}_{A} = -\nabla_{A}\sum_{B=1}^{N}E_{B}(\{\mathbf{R}_{C}\})=-\sum_{B}^{N}w_{B}\frac{dK_{B}(\{\mathbf{R}_{C}\})}{d\mathbf{R}_{A}},
</math>
</math>


where <math> K(\mathbf{R}_{C}) </math> is the kernel matrix which can be found on the [[Machine learning force field: Theory|machine learning theory page]]. The kernel matrix as the local energies depends on
where <math> K(\mathbf{R}_{C}) </math> is the kernel matrix which can be found on the [[Machine learning force field: Theory|machine learning theory page]]. The kernel matrix as the local energies depends on the positions of all atoms <math>\{\mathbf{R}_{C}\}</math> in the actual atomic configuration.
the positions of all atoms <math>\{\mathbf{R}_{C}\}</math> in the actual atomic configuration.


==Related concepts==
===Stress and pressure===


===Related concepts===
The stress tensor (see {{TAG|ISIF}}) provides valuable information about how forces are distributed throughout a material, both in magnitude and direction. It includes normal stresses, which act perpendicular to a given plane, and shear stresses, which act parallel to the plane. Together, these components allow predicting how materials will behave under various conditions, such as tension, compression, or shear. The stress tensor can be computed from a viral theorem, including pair forces, or with a finite difference approach deforming the simulation box.
'''Stress and pressure'''


The [[ISIF|stress tensor]] provides valuable information about how forces are distributed throughout a material, both in magnitude and direction. It includes normal stresses, which act perpendicular to a given plane, and shear stresses, which act parallel to the plane. Together, these components allow engineers and scientists to predict how materials will behave under various conditions, such as tension, compression, or shear. The stress tensor can be computed from a viral theorem including pair forces or with a finite difference approach deforming the simulation box.
Pressure, often denoted as P, is a scalar component of the stress tensor. It represents the normal force per unit area acting on a surface within the material. In the stress tensor, pressure is related to the diagonal components <math>\sigma_{xx}</math>, <math>\sigma_{yy}</math>, and <math>\sigma_{zz}</math>:
Pressure, often denoted as P, is a scalar component of the stress tensor. It represents the normal force per unit area acting on a surface within the material. In the stress tensor, pressure is related to the diagonal components σxx, σyy, and σzz:


<math>
:<math>
P = \frac{1}{3}(\sigma_{xx} + \sigma_{yy} + \sigma_{zz})
P = \frac{1}{3}(\sigma_{xx} + \sigma_{yy} + \sigma_{zz}).
</math>
</math>


So, the pressure is the average of the normal components of the stress tensor in the three spatial directions.
In other words, the pressure is the average of the normal components of the stress tensor in the three spatial directions. In electronic structure calculations, finite basis sets are used to express the electron density. Due to this finiteness of the basis set, errors on the stress tensor and the pressure are introduced. The error in the pressure is referred to as [[Energy vs volume Volume relaxations and Pulay stress|Pulay stress]] and can be corrected with the tag {{TAG|PSTRESS}} or by increasing {{TAG|ENCUT}}.
 
===Force constants and phonons===
 
The forces are defined as the negative gradient of the potential energy. The force-constant matrix is defined by
 
:<math>
\Phi_{I\alpha J\beta} (\{\mathbf{R}^0\}) =
\left. \frac{\partial E(\{\mathbf{R}\})}{\partial R_{I\alpha} \partial R_{J\beta}} \right|_{\mathbf{R} =\mathbf{R^0}}
=
- \left. \frac{\partial F_{I\alpha}(\{\mathbf{R}\})}{\partial R_{J\beta}} \right|_{\mathbf{R} =\mathbf{R^0}}
</math>


'''Force constants and phonons'''
and is, therefore, the gradient of the force. The force-constant matrix is a fundamental concept in solid-state physics and materials science, especially in the context of understanding the vibrational properties of crystals. It is a mathematical representation of the interatomic forces and their interactions within a crystal lattice. This matrix is used to describe the relationships between atomic displacements and the resulting forces that occur in a crystal. By Fourier transforming the force-constant matrix, the [[Phonons: Theory|dynamical matrix]] is obtained. By computing the eigenvalues of the dynamic matrix on various reciprocal lattice points, the phonon dispersion relation can be obtained.
Understanding phonons is essential as they influence materials properties such as the electrical conductivity, thermal conductivity, and mechanical properties of materials.


Phonons are quanta of vibrational energy in a crystalline lattice and play a vital role in the field of thermodynamics. In thermodynamics, they are primarily associated with the study of heat conduction and thermal properties of solids. These lattice vibrations are responsible for transporting heat energy through materials, contributing to the understanding of heat transfer mechanisms. Understanding the behavior of phonons in thermodynamics is crucial for designing materials with specific thermal properties, as they influence a material's ability to conduct and store heat. Moreover, the study of phonons contributes to our knowledge of phase transitions and the thermodynamic properties of condensed matter, aiding in the development of more efficient and advanced materials for various applications in engineering and technology.
== How To ==


=== How To ===
*[[:Category:Ionic minimization|Structure optimization]]
*[[:Category:Ionic minimization|structure optimization]]
*[[Energy vs volume Volume relaxations and Pulay stress|Volume optimization]]
*[[Energy vs volume Volume relaxations and Pulay stress|Volume optimization]]
*[[Phonons from finite differences|Phonons from finite differences]]
*[[Phonons from finite differences|Phonons from finite differences]]
*[[Phonons from density-functional-perturbation theory|phonons from perturbation theory]]
*[[Phonons from density-functional-perturbation theory|Phonons from perturbation theory]]
*[[Computing the phonon dispersion and DOS]]
*[[Machine learning force field calculations: Basics|Machine learning Basics]]
*[[Best practices for machine-learned force fields|Machine learning best practice]]
*[[Molecular dynamics calculations|Molecular dynamics simulation]]
*[[ACFDT/RPA calculations|ACFDT/RPA calculations]]


----
== References ==
[[The_VASP_Manual|Contents]]


[[Category:VASP]][[Category:Ionic minimization]]
[[Category:VASP]][[Category:Ionic minimization]]

Latest revision as of 18:29, 9 February 2024

Forces on particles are a fundamental concept in condensed matter physics and chemistry. These forces describe the interactions that cause particles, such as atoms and molecules, to move and behave in specific ways. In VASP, forces result from electromagnetic interactions, which can be computed by means of the Hellmann-Feynman theorem within DFT, the random-phase approximation or by the use of machine learning force fields. Understanding interaction forces between atoms is crucial in many aspects of science, for example:

Formally, the force can be defined as follows. Let be the position of the particle, then the velocity is defined as the change of position with time

and the momentum of the particle is the velocity times the particle mass

Newton's second law of motion states that the change of motion of an object is proportional to the force acting on the object and oriented in the same direction as the force vector. Therefore, the force is defined as the change of particle momentum with time

where is the acceleration of the particle. With this equation of motion, the knowledge of some starting conditions and and an algorithm to compute the forces the trajectory of a particle can be predicted for all times.

Theory

The force and the negative gradient of the potential energy is directly related. The gradient of the potential energy can be computed from the Lagrangian of the particle system of interest. The Lagrangian for an N particle system is

where is the potential energy of the system. With Lagrange's equation of the second kind

the relation

In order to predict forces and particle trajectories, the negative gradient of the potential energy has to be computed.


DFT Forces

One way to compute the potential energy's negative gradient is through DFT. In DFT there is no classical potential energy function but a Hamiltonian depending on the ionic positions and the electronic positions . The exact form of the Hamiltonian is given by

where denotes the electronic ground-state density and are the Kohn-Sham orbitals. is the exchange-correlation energy. To obtain the force acting on ion A, the Hellmann-Feynman theorem has to be used.

where denotes the gradient with respect to ionic position . The DFT forces will depend on the chosen exchange-correlation functional via the electronic ground-state density . Therefore, the choice of the proper exchange-correlation functional for the system of interest is crucial for obtaining proper forces and, hence, the correct material properties.

RPA-forces

The RPA approximation can be used to yield estimates for the exchange-correlation energy as well as forces (LRPAFORCE) within many-body perturbation theory.[1] Note that the RPA is a correction to the underlying functional. Therefore, the choice of the proper exchange-correlation functional is still crucial in the RPA approach for obtaining forces. The RPA forces are computed by the following equation

The operators and are associated with the functional derivatives and respectively. S defines the overlap operator between the Kohn-Sham orbitals of the used DFT approximation. The first term of the force equation can be associated with the exchange energy and the second term of the equation can be associated with the correlation part.

Mind: It is recommended to use the Perdew-Burke-Ernzerhof (PBE) XC potential.
Mind: It is recommended to use the GW POTCAR-files.

Machine-learned forces

A speedy but less accurate approach for obtaining forces is through a machine-learned force field (MLFF). In this approach, a machine-learning model is first trained on either the DFT or RPA forces, whereby also energies and stresses are considered. In the case of the RPA, the stress tensor is not computed. The machine-learning approach will be an approximation to the underlying method against which it was fitted.

The machine learning force field decomposes the total DFT energy into local atomic contributions depending on all atomic positions in the system. Therefore, the force acting on ion A is computed by

where is the kernel matrix which can be found on the machine learning theory page. The kernel matrix as the local energies depends on the positions of all atoms in the actual atomic configuration.

Related concepts

Stress and pressure

The stress tensor (see ISIF) provides valuable information about how forces are distributed throughout a material, both in magnitude and direction. It includes normal stresses, which act perpendicular to a given plane, and shear stresses, which act parallel to the plane. Together, these components allow predicting how materials will behave under various conditions, such as tension, compression, or shear. The stress tensor can be computed from a viral theorem, including pair forces, or with a finite difference approach deforming the simulation box.

Pressure, often denoted as P, is a scalar component of the stress tensor. It represents the normal force per unit area acting on a surface within the material. In the stress tensor, pressure is related to the diagonal components , , and :

In other words, the pressure is the average of the normal components of the stress tensor in the three spatial directions. In electronic structure calculations, finite basis sets are used to express the electron density. Due to this finiteness of the basis set, errors on the stress tensor and the pressure are introduced. The error in the pressure is referred to as Pulay stress and can be corrected with the tag PSTRESS or by increasing ENCUT.

Force constants and phonons

The forces are defined as the negative gradient of the potential energy. The force-constant matrix is defined by

and is, therefore, the gradient of the force. The force-constant matrix is a fundamental concept in solid-state physics and materials science, especially in the context of understanding the vibrational properties of crystals. It is a mathematical representation of the interatomic forces and their interactions within a crystal lattice. This matrix is used to describe the relationships between atomic displacements and the resulting forces that occur in a crystal. By Fourier transforming the force-constant matrix, the dynamical matrix is obtained. By computing the eigenvalues of the dynamic matrix on various reciprocal lattice points, the phonon dispersion relation can be obtained. Understanding phonons is essential as they influence materials properties such as the electrical conductivity, thermal conductivity, and mechanical properties of materials.

How To

References

Subcategories

This category has only the following subcategory.

Pages in category "Forces"

The following 6 pages are in this category, out of 6 total.