Evaluating Hellmann–Feynman forces within non-local pseudopotentials

https://doi.org/10.1016/j.cpc.2019.107034Get rights and content

Abstract

A new approach for evaluating Hellmann–Feynman forces within a non-local potential is introduced. Particularly, the case of Hellmann–Feynman theorem applied within density functional theory in combination with nonlocal ab-initio pseudopotentials, discretized by the finite-element method, is discussed in detail. The validity of the new approach is verified using test calculations on simple molecules and the convergence properties (w.r.t. the DFT loop) are analyzed. A comparison to other previously published approaches to Hellmann–Feynman forces calculations is shown to document that the new approach mitigates, for l-dependent as well as for separable forms of nonlocal pseudopotentials, the efficiency and/or accuracy problems arising in the methods published so far.

Introduction

An efficient evaluation of Hellmann–Feynman forces is essential for geometry optimization tasks and for molecular dynamics calculations in computational material physics. In this paper we introduce the expression for Hellmann–Feynman forces (HF forces, HFF) used in our newly developed ab-initio real-space code for non-periodic electronic structure calculations, based on the density functional theory, finite element method (FEM) (or its variant — isogeometric analysis [1], [2]) and non-local environment-reflecting pseudopotentials [3].

The most difficult part of the Hellmann–Feynman forces calculation is the evaluation of the term coming from the gradient of nonlocal pseudopotentials, because the derivative of the pseudopotentials includes not only the derivative of the potential itself, but also the derivative of the projection operators to l-subspaces. We propose a new expression for computing this part of the force, based on differentiating the wavefunctions instead of the projectors.

The new expression is verified by comparing equilibrium atomic positions (i.e. positions with zero forces) to minima of total energies and to experimental values, for nitric oxide, carbon dioxide and tetrafluoromethane and by comparing vibrational frequencies of carbon dioxide. The convergence property of the expression is analyzed and the expression is compared to other previously published approaches to the non-local contribution to HF forces as regards accuracy and computational demands. This comparison shows advantages in accuracy or/and computational efficiency compared to so far published formulas.

Section 2 provides a short derivation of the basic formula for calculating the Hellmann–Feynman forces. In Section 3 we describe our efficient and numerically stable way for evaluating the local part of the Hellmann–Feynman forces within the finite element method. Section 4 gives a brief overview of various approaches to calculations of nonlocal components of HF forces and illustrates the importance of incorporating all subcomponents of the nonlocal parts. Because none of the methods for evaluating the nonlocal HF forces components published so far has proved to be fully satisfactory in our case, we derived a new formula, which is described in Section 5. Section 6 presents results of sample calculations that demonstrate the correctness of the formula. The error of the computed HF forces is analyzed with respect to the stopping criteria of the DFT self-consistent loop. Section 7 contains a brief convergence and error analysis of the new formula in comparison with other approaches.

Section snippets

Hellmann–Feynman forces for nonlocal pseudopotentials

Hellmann–Feynman forces are the gradients of total energy (including the interaction energy of atomic cores) with respect to the movement of atomic centers.

The expression for HF forces following from the Hellmann–Feynman theorem (see [4]) seems to be straightforward in principle, since we use the finite element method and therefore a fixed (independent of atomic positions) basis (the standard H1 elements with the Lagrange polynomial basis [5]). In addition, isogeometric analysis with Bézier

Local parts of Hellmann–Feynman force

The first term of (6) is the local2 part of electron–ion interaction. The gradient of the local ion potential can be easily evaluated as the partial derivative of the potential in the radial space multiplied by the direction from the atomic center: VLOCaρ=VLOCa(r)rxcarρ.

Only slightly more effort is required to evaluate the last term of (6) expressing the repulsion of atomic cores. Without using

Nonlocal part of Hellmann–Feynman force

The most difficult term of Eq. (6) is the middle one: the nonlocal part of electron–ion interaction. Denoting Vl=VNLa,l, and taking a sample ψ, the corresponding force coming from a given l can be expressed as where Pl is a projection into the given l-subspace using integrations over spheres

The first term in (12) expresses a force originating from the shift of the potential and the second term expresses the change of the charge density in the given l-subspace that occurs due to the shift of

Evaluating HFF using derivatives of wavefunctions

Since none of the methods mentioned above is fully satisfactory in our case, we propose another way to calculate the nonlocal terms of HF forces. Our approach is based on the simple assumption that the movement of an atomic core in any direction must result in the same force as the movement of the wavefunction (which is “frozen” due to the Hellmann–Feynman theorem) in the opposite direction. So instead of differentiating the operator Vl (as in (14)), making use of the Hermiticity of the Vl

Verification of the HFF formula and its convergence

We have verified and tested our newly developed expression for the molecules of nitric oxide, carbon dioxide and tetrafluoromethane, with interatomic distances scaled by a variable factor β.

Hexahedral meshes, with cubical elements near atomic sites with the edge length α, and substantially larger elements in distances greater than 2.4 a.u. from atomic centers were used for the calculations below. The distance from any atomic center to the domain boundary was at least 16 a.u.

The convergence of

Convergence and fluctuations of various methods for computing HF forces

A series of calculations to compare the errors and convergence rates of six methods for evaluating the nonlocal components of Hellmann–Feynman forces is shown in Fig. 8. Using the series of meshes with varying base element edge length α (described in the previous section), we compare the results of various methods and assess these results in comparison with reference values obtained for the finest mesh (α=0.7). We can see that all the methods converge to the same solution. This solution is

Conclusion

In this paper we present a new approach for calculating the Hellmann–Feynman forces in non-local pseudopotentials discretized using the finite element method, within the density functional theory. The correctness of the present method and numerical properties of the newly proposed formula have been demonstrated by calculations on simple molecules.

Also, very advantageous convergence properties of the newly proposed formula have been demonstrated, which can be used for a reasonable guess of

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgments

This work was supported by the Czech Science Foundation, Czech Republic, project no. GA17-12925S. The first author acknowledges the support by CEDAMNF project, Czech Republic, reg. no. CZ. 02.1.01 co-funded by the ERDF as part of the Ministry of Education, Youth and Sports OP RDE programme, Czech Republic. The third author was supported by the Czech Science Foundation, Czech Republic , project no. GA17-14840S.

References (34)

  • TeffoJ.-L. et al.

    J. Mol. Spectrosc.

    (1992)
  • EyertV.

    J. Comput. Phys.

    (1996)
  • CimrmanR. et al.

    Mathematics and Computers in Simulation

    (2016)
  • CimrmanR. et al.

    Appl. Math. Comput.

    (2017)
  • VackářJ. et al.
  • IhmJ. et al.

    J. Phys. C

    (1979)
  • CiarletP. et al.
  • BordenM.J. et al.

    Internat. J. Numer. Methods Engrg.

    (2011)
  • CimrmanR. et al.

    Adv. Comput. Math.

    (2019)
  • PulayP.

    Mol. Phys.

    (1969)
  • HellmannH.

    J. Chem. Phys.

    (1935)
  • HohenbergP. et al.

    Phys. Rev.

    (1964)
  • CarfìD.

    Atti Accad. Peloritana Pericolanti-Classe Sci. Fisiche Mat. Nat.

    (2010)
  • PaskJ. et al.

    Modelling Simulation Mater. Sci. Eng.

    (2005)
  • BadinskiA. et al.

    Phys. Rev. E

    (2007)
  • GreenwoodN. et al.

    Chemistry of the Elements

    (1997)
  • WangX.-G. et al.

    J. Chem. Phys.

    (2000)
  • Cited by (7)

    • Reaction fragility method: monitoring evolution of atoms and bonds on a reaction path

      2023, Chemical Reactivity: Volume 1: Theories and Principles
    • Variationally consistent Hellmann–Feynman forces in the finite element formulation of Kohn–Sham density functional theory

      2023, Computer Methods in Applied Mechanics and Engineering
      Citation Excerpt :

      In several of these works [49,53,55], an ab initio molecular dynamics study was additionally carried out. More recently, the formulation of the force was discussed in [56] with a particular focus on the contribution arising from the nonlocal pseudopotential and systematic convergence in force calculations has also been demonstrated [48,53,56]. This very limited number of works, to the best knowledge of the authors, demonstrate the possibilities for further exploration and potential advances regarding the formulation and implementation of forces in Kohn–Sham DFT calculations with the finite element method as the encompassing numerical framework, which is a primary motivating aspect for the present work.

    • Fast evaluation of finite element weak forms using python tensor contraction packages

      2021, Advances in Engineering Software
      Citation Excerpt :

      A very preliminary result included in the memory layouts study indicates that using Numba might be promising. The transpiler and einsum expression based weak form implementations are available in SfePy from version 2021.1, allowing a rapid prototyping of multi-physical finite element models and subsequent calculations in various fields such as biomechanics [30] or solid state physics [22]. All data used in preparation of this paper are available online [9].

    • Effects of Temperature Induced Phase Transition in Bulk CdS Structures

      2022, VLSI SATA 2022 - 3rd IEEE International Conference on VLSI Systems, Architecture, Technology and Applications
    View all citing articles on Scopus

    The review of this paper was arranged by Prof. D.P. Landau.

    View full text