Propagators for the Time-Dependent Kohn–Sham Equations

Apr 19, 2018 - ADVERTISEMENT · Log In Register · Cart · ACS · ACS Publications · C&EN · CAS · ACS Publications. ACS Journals. ACS eBooks; C&EN ...
1 downloads 4 Views 2MB Size
Subscriber access provided by Kaohsiung Medical University

Quantum Electronic Structure

is published by the American Chemical Society. 1155 Sixteenth Street N.W., Washington, DC 20036 Published by American Chemical Society. Copyright © American Chemical Society. However, no copyright claim is made to original U.S. Government works, or works produced by employees of any

Subscriber access provided by Kaohsiung Medical University

Propagators for the time-dependent Kohn-Sham equations: multistep, Runge-

is published by the American Chemical Society. 1155 Sixteenth Street N.W., Washington, DC 20036 Published by American Chemical Society. Copyright © American Chemical Society. However, no copyright claim is made to original U.S. Government works, or works produced by employees of any

Subscriber access provided by Kaohsiung Medical University

Kutta, exponential Runge-Kutta, and commutator free Magnus methods

is published by the American Chemical Society. 1155 Sixteenth Street N.W., Washington, DC 20036 Published by American Chemical Society. Copyright © American Chemical Society. However, no copyright claim is made to original U.S. Government works, or works produced by employees of any

Subscriber access provided by Kaohsiung Medical University

Adrián Gómez Pueyo, Miguel A. L. Marques, Angel Rubio, and Alberto Castro

is published by the American Chemical Society. 1155 Sixteenth Street N.W., Washington, DC 20036 Published by American Chemical Society. Copyright © American Chemical Society. However, no copyright claim is made to original U.S. Government works, or works produced by employees of any

Subscriber access provided by Kaohsiung Medical University

J. Chem. Theory Comput., Just Accepted Manuscript • DOI: 10.1021/acs.jctc.8b00197 • Publication Date (Web): 19 Apr 2018

is published by the American Chemical Society. 1155 Sixteenth Street N.W., Washington, DC 20036 Published by American Chemical Society. Copyright © American Chemical Society. However, no copyright claim is made to original U.S. Government works, or works produced by employees of any

Subscriber access provided by Kaohsiung Medical University

Downloaded from http://pubs.acs.org on April 23, 2018

is published by the American Chemical Society. 1155 Sixteenth Street N.W., Washington, DC 20036 Published by American Chemical Society. Copyright © American Chemical Society. However, no copyright claim is made to original U.S. Government works, or works produced by employees of any

Subscriber access provided by Kaohsiung Medical University

Just Accepted

is published by the American Chemical Society. 1155 Sixteenth Street N.W., Washington, DC 20036 Published by American Chemical Society. Copyright © American Chemical Society. However, no copyright claim is made to original U.S. Government works, or works produced by employees of any

Subscriber access provided by Kaohsiung Medical University

“Just Accepted” manuscripts have been peer-reviewed and accepted fo online prior to technical editing, formatting for publication and author pro

is published by the American Chemical Society. 1155 Sixteenth Street N.W., Washington, DC 20036 Published by American Chemical Society. Copyright © American Chemical Society. However, no copyright claim is made to original U.S. Government works, or works produced by employees of any

Subscriber access provided by Kaohsiung Medical University

Society provides “Just Accepted” as a service to the research communit of scientific material as soon as possible after acceptance. “Just Acc full in PDF format accompanied by an HTML abstract. “Just Accepted

is published by the American Chemical Society. 1155 Sixteenth Street N.W., Washington, DC 20036 Published by American Chemical Society. Copyright © American Chemical Society. However, no copyright claim is made to original U.S. Government works, or works produced by employees of any

Subscriber access provided by Kaohsiung Medical University

peer reviewed, but should not be considered the official version of re Digital Object Identifier (DOI®). “Just Accepted” is an optional service the “Just Accepted” Web site may not include all articles that will be

is published by the American Chemical Society. 1155 Sixteenth Street N.W., Washington, DC 20036 Published by American Chemical Society. Copyright © American Chemical Society. However, no copyright claim is made to original U.S. Government works, or works produced by employees of any

Subscriber access provided by Kaohsiung Medical University

a manuscript is technically edited and formatted, it will be removed f site and published as an ASAP article. Note that technical editing m to the manuscript text and/or graphics which could affect content,

is published by the American Chemical Society. 1155 Sixteenth Street N.W., Washington, DC 20036 Published by American Chemical Society. Copyright © American Chemical Society. However, no copyright claim is made to original U.S. Government works, or works produced by employees of any

Subscriber access provided by Kaohsiung Medical University

ethical guidelines that apply to the journal pertain. ACS cannot be consequences arising from the use of information contained in these

is published by the American Chemical Society. 1155 Sixteenth Street N.W., Washington, DC 20036 Published by American Chemical Society. Copyright © American Chemical Society. However, no copyright claim is made to original U.S. Government works, or works produced by employees of any

Page 1 3.5 of 22

log10(Cost)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

CFM4 Journal of Chemical Theory and Computation EMR ETRS AETRS

3

2.5

2

1.5 −11

−10

−9 Paragon −8 Plus−7Environment −6 ACS log10(Error)

−5

−4

−3

−2

Journal of Chemical Theory and Computation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Page 2 of 22

Propagators for the time-dependent Kohn-Sham equations: multistep, Runge-Kutta, exponential Runge-Kutta, and commutator free Magnus methods Adri´an G´omez Pueyo,∗,† Miguel A. L. Marques,‡ Angel Rubio,¶,§,k and Alberto Castro⊥,† †Institute for Biocomputation and Physics of Complex Systems, University of Zaragoza, Calle Mariano Esquillor, 50018 Zaragoza, Spain ‡Institut f¨ ur Physik, Martin-Luther-Universit¨at Halle-Wittenberg, 06120 Halle (Saale), Germany ¶Max Planck Institute for the Structure and Dynamics of Matter and Center for Free-Electron Laser Science, Luruper Chaussee 149, 22761 Hamburg, Germany §Center for Computational Quantum Physics (CCQ), The Flatiron Institute, New York NY 10010 kNano-Bio Spectroscopy Group, Universidad del Pa´ıs Vasco, 20018 San Sebastin, Spain ⊥ARAID Foundation, Calle Mar´ıa Luna, 50018 Zaragoza, Spain E-mail: [email protected]

Abstract

as some implicit versions of the multistep methods, may be useful.

We examine various integration schemes for the time-dependent Kohn-Sham equations. Contrary to the time-dependent Schr¨odinger’s equation, this set of equations is non-linear, due to the dependence of the Hamiltonian on the electronic density. We discuss some of their exact properties, and in particular their symplectic structure. Four different families of propagators are considered, specifically the linear multistep, Runge-Kutta, exponential Runge-Kutta, and the commutator-free Magnus schemes. These have been chosen because they have been largely ignored in the past for time-dependent electronic structure calculations. The performance is analyzed in terms of cost-versus-accuracy. The clear winner, in terms of robustness, simplicity, and efficiency is a simplified version of a fourth-order commutator-free Magnus integrator. However, in some specific cases, other propagators, such

1

Introduction

In 1984, Runge and Gross 1 extended the fundamental theorems of density-functional theory to the time-dependent case, thereby founding time-dependent density-functional theory (TDDFT). 2 Over the years, TDDFT has become a very popular tool for the calculation of properties of atoms, molecules, nanostructures, or bulk materials thanks to its favorable accuracy/computational cost relation. It can also be used for a wide range of applications, e.g. to calculate optical properties, 3 to study nuclear dynamics, 4 charge transfer processes, 5 electronic excitations 6 and ultrafast interaction of electrons with strong laser fields, 7 to name a few. At the core of these simulations are the time-dependent Kohn-Sham equations

ACS Paragon Plus Environment

1

Page 3 of 22 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Journal of Chemical Theory and Computation

time-delay systems. 9 Centuries of research since the early days of Newton, Euler, etc. have produced a wide variety of numerical methods to solve ODEs. 10–12 Any of those can in principle be applied to the TDKS equations, but finding the most efficient one is a difficult task. 13–23 In the following paragraphs, we make a necessarily non-exhaustive recap of the ODE schemes that have, or have not, been tried for TDDFT problems. A first division can be established between one-step and multi-step methods. The former provide a recipe to compute an approximation to the solution at some time t from the knowledge of the solution at a single previous time t − ∆t. The latter use information from a number of previous steps t − ∆t, t − 2∆t, etc. Multistep formulas have been scarcely used in the quantum chemistry or electronic structure community, and only recently tried for TDDFT calculations. 16 Perhaps the reason is the need to store the information about a number of previous steps, a large amount of data for this type of problems. The most common alternatives are the implicit and explicit formulas of Adams, and the backward-differentiation formulas (BDFs). For what concerns single-step methods, arguably the most used and studied one is the family of Runge-Kutta (RK) integrators. 24 This includes the implicit and explicit Euler formulas, the trapezoidal (also known as CrankNicolson 25 ) and implicit midpoint rules, the explicit RK4 formula (considered “the” RK formula since it is perhaps the most common), the Gauss-Legendre collocation methods, the Radau and Lobatto families, etc. Moreover, numerous possible extensions and variations are possible: partitioned RK, embedded formulas, use of variable time-step, extrapolation methods on top of the RK schemes (e.g. the GraggBulirsch-Stoer algorithm 26 ), composition techniques, the linearly implicit Rosenbrock methods, etc. (see Refs. 10–12 for a description of these and other ideas). Once again, many of these options have never been tested for TDDFT problems. Linear autonomous ODE systems can also be solved directly by acting on the initial state

(TDKS): ˆ ϕ˙ m (t) = −iH[n(t)](t)ϕ m (t),

(m = 1, . . . , N ) , (1) where we use the dot notation (ϕ) ˙ for time ˆ derivatives, H[n(t)](t) is the Kohn-Sham (KS) Hamiltonian, ϕ ≡ {ϕm }N m=1 are the KS orbitals, N is the number of electrons, and n is the oneelectron density, obtained from n(~r, t) =

N X X

|ϕm (~rσ, t)|2 .

(2)

σ=↑,↓ m=1

The Kohn-Sham Hamiltonian is a linear Hermitian operator, that can have an explicit timedependence (e.g., if the atoms are moving, or in the presence of a laser field), and an implicit time-dependence though the density. As the density (2) is written in terms of the KohnSham orbitals, Eqs. (1) are indeed a set of nonlinear equations. Moreover, the KS Hamiltonian at time t depends on the full history of the density at all times t0 ≤ t, and not only on its value at time t. These “memory” effects are rather important in several circumstances (for example, for multiple excitations), and have been extensively studied. 8 Unfortunately, there is a lack of memory-including exchangecorrelation functionals, and the dependence on the full history make the solution of the TDKS equations rather complex. Therefore, almost all applications of real-time TDDFT invoke the adiabatic approximation, that states that the KS Hamiltonian at time t only depends on the instantaneous density at the same time, as we already assumed in Eqs. (1). Upon discretization of the electronic Hilbert space, the TDKS equations fall into the category of systems of initial-value first-order ordinary differential equations (ODEs), i.e. they have the general form: ϕ(t) ˙ = f (ϕ(t), t) , ϕ(t0 ) = ϕ0 .

(3) (4)

Note that if history were to be considered, the TDKS equations would no longer be an ODE system: they would belong instead to the more general family of delay differential equations, or

ACS Paragon Plus Environment

2

Journal of Chemical Theory and Computation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

with the exponential of the operator that defines the system. Quantum problems without an explicitly time-dependent Hamiltonian belong to this class. The problem of the quantum propagator can therefore be reduced to finding a good algorithm to compute the action of the exponential of an operator. Various alternatives exist: a truncation of the Taylor expansion, 27 the Chebychev 28 and Krylov polynomial expansions, 29,30 Leja and Pad´e interpolations, 31 etc. For non-autonomous linear systems (e.g. quantum problems with time-dependent Hamiltonians), a time-ordered exponential must substitute the simple one. By using short-enough time-steps, however, a constant Hamiltonian can be applied within each interval, and the simple exponential methods mentioned above may suffice. Otherwise, one can resort to Magnus expansions. 32 Perhaps the most used one is also the simplest: the second-order Magnus expansion, also known as the exponential midpoint rule. More sophisticated (higher order) expansions require the computation of commutators of the Hamiltonian at different times, a costly operation. Recently, commutator-free Magnus expansions have also been proposed. 33 Other recent options essentially based on the exponential (and tested for TDDFT) are the non-recursive Chebychev expansion of William Young et al, 34 or the three-term recurrence of Akama et al. 18 An old-time favourite in condensed matter physics is the split-operator formula. 35 It belongs to the wide class of splitting techniques, whose simplest members are the Lie-Trotter 36 and Strang 37 splittings. In chemistry and physics, these use the usual division of the Hamiltonian into a kinetic and a potential part, as both can be treated exactly in the proper representation – the main computational problem is then reduced to the transformation to and from real and Fourier space. More sophisticated splitting formulas have also been developed (see e.g. Refs. 38–41). The TDDFT Hamiltonian may also be divided into a linear and a non-linear part. The non-linear part must of course include the Hartree, exchange, and correlation potentials.

Page 4 of 22

The kinetic term is almost always included in the linear term. This is considered to be the term responsible for the possible stiffness of the equations. It is difficult to give a precise definition of stiffness, and a pragmatic one is generally accepted: “stiff equations are equations where certain implicit methods perform better, usually tremendously better, than explicit ones”. 42 Implicit methods require the solution of nonlinear algebraic equations. Besides outperforming explicit methods for stiff cases, some of them may also have the advantage of preserving structural properties of the system, such as symplecticity – a topic that we will discuss later on. For cases in which one part of the equation requires an implicit method, but another part does not, the implicit-explicit (IMEX) methods were invented. 16,43,44 Another recent approach that relies on the separation of a linear and a non-linear part are the exponential integrators. 45–48 There are various subfamilies: “integrating factor” (IF), “exponential time-differencing” (ETD) formulas, exponential RK, etc. These techniques have not been tested for non-equilibrium electron dynamics in general, or TDDFT in particular, until very recently. 16 An alternative that has been followed by several groups is the transformation of the system to the adiabatic eigenbasis, or to a closely related one (a “spectral basis”, generally speaking). In that appropriately chosen basis, the dimension of the system is small, and any method can do the job. The burden of the task is then transferred to the construction and update of the basis along the time evolution, an operation that involves diagonalization. Refs. 15,17,49– 51 are some recent examples, some of them based on Houston states, 52 that report notable speed-ups over conventional methods. This result seems, however, to depend on the type of problem, implementation details, etc. The former list of algorithms, though long, was not exhaustive: for example, we can also mention Fatunla’s algorithm, 30,53,54 or the very recent semi-global approach of Schaefer et al. 55 based on the Chebychev propagator. It becomes evident that the list of options is extensive, making the identification of the most

ACS Paragon Plus Environment

3

Page 5 of 22 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Journal of Chemical Theory and Computation

efficient, accurate, or reliable algorithm a hard task. Some of us presented in 2003 a performance analysis of various propagation methods for the TDKS equations; 13 it is the purpose of this Article to continue along those lines, by investigating other promising propagation schemes and by providing several benchmarks in order to assert their efficiency in realworld applications. In particular, we look here at multi-step based propagators, exponential RK integrators (along with the standard RK), and a commutator-free version of the Magnus propagator. We implemented these propagation schemes in our code octopus, 56,57 a general purpose pseudopotential, real-space and realtime code. The remaining of this article is organized in the following way: first we study in Section 2 the theory regarding the propagation schemes and its relation with the KS equations, paying special attention at the issue of symplecticity. Then in Section 3 we show the benchmarks obtained for the different propagation schemes. Finally, in Section 4 we state our conclusions.

2 2.1

[Eqs. (3) and (4)]; it is defined as Φt (y(t − ∆t)) = y(t) .

(7)

This is the object that must be approximated through some algorithm – an algorithm that of course takes the form of a linear operator whenever employed on linear systems. To choose a numerical method to propagate the TDKS equations one is usually concerned by its performance and stability. Performance is loosely speaking related to the computer time required to propagate the equations for a certain amount of time. Stability, on the other hand, is a measure on the quality of the solution after a certain time. For linear systems (or for propagators applied to linear systems), it is possible to give a simple mathematical definition of stability. A propagator is stable below ∆tmax if, for any ∆t < ∆tmax and n > 0, Uˆ n (t + ∆t, t) is uniformly bounded. One way to assure that the algorithm is stable is by making it “contractive”, which means that ||Uˆ (t + ∆t)|| ≤ 1. Of course, if the algorithm is unitary, it is also contractive and hence stable; but if the algorithm is only approximately unitary, it is better if it is contractive. We can also talk about unconditionally stable algorithms if their stability is independent of ∆t and of the spectral characˆ teristics of H. Clearly, in many cases stability can be enhanced by decreasing the time-step of the algorithm, i.e., by decreasing its numerical performance. In other cases, however, long-time stability is almost impossible to achieve for some methods. A common strategy to develop stable numerical methods is to request that these obey a number of exact features (although this does not ensure the stability or the performance). There are a series of exact conditions that can be easily derived. For example, it is well known that, for linear systems with Hermitian Hamiltonians, the propagator is unitary

Exact properties The propagator

If Eqs. (1) were linear, their solution could be written as ϕm (t) = Uˆ (t, t−∆t)ϕ(t−∆t)m ,

m = 1, . . . , N , (5) for some discrete time step ∆t (that we will consider to be constant along the evolution in this work). The evolution operator is given by   Z t ˆ ) , (6) Uˆ (t, t − ∆t) = T exp −i dτ H(τ t−∆t

i.e. it is the time-ordered evolution operator. The non-linearity, however, implies that a linear evolution operator linking ϕm (t − ∆t) to ϕm (t) does not exist. We may however still assume the existence of a nonlinear evolution operator, that is usually called a flow in the general case,

Uˆ † (t, t − ∆t) = Uˆ −1 (t, t − ∆t) .

(8)

This property ensures that the KS wavefunctions remain orthonormal during the time-

ACS Paragon Plus Environment

4

Journal of Chemical Theory and Computation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

evolution. Algorithms that severely violate (8) will have to orthogonalize regularly the wavefunctions, a rather expensive (N 3 ) operation, especially for large systems. Note that for the TDKS equationss it is not, strictly speaking, correct to speak of unitarity due to the nonlinear character of the propagators even if the orthogonality condition still holds among the KS orbitals (see the discussion in Ref. 58). For systems that do not contain a magneticfield or a spin-orbit coupling term (or any other term that breaks time-reversal symmetry), the evolution operator fullfils ˆ −1

Uˆ (t, t − ∆t) = U

(t − ∆t, t) .

tion ∂H(p, q) , ∂pi ∂H(p, q) , p˙i = − ∂qi q˙i =

i

(9)

(12b)

d ˆ |Ψ(t)i = H|Ψ(t)i , dt |Ψ(0)i = |Ψ0 i .

(13a) (13b)

forms a Hamiltonian system, 60 and is therefore symplectic. It is possible to perform the derivation in coordinate space, but the proof is somewhat simpler if we expand the wave-function in a given basis set X |Ψ(t)i = ci (t)|Ψi i , (14)

Symplecticity

The geometrical structure of an ODE system, as well as that of its numerical representation (i.e. the propagator), is another important issue to consider. 12 In this context, an important property is symplecticity. A differentiable map g : R2n → R2n is symplectic if and only if   ∂g T ∂g 0 I J =J, J= . (10) −I 0 ∂y ∂y

i

where {|Ψi i} forms an orthonormal basis and ci (t) = hΨi |Ψ(t)i are the time-dependent expansion coefficients. The Schr¨odinger equation is thus transformed into: c˙ = −iHc , ci (0) = hΨi |Ψ0 i ,

Given any system of ODEs, the flow is a differentiable map. The first requirement for a flow to be symplectic is that the system is formed by an even number of real equations. Any complex system, however, may be split into its real and imaginary parts, and is equivalent to a system with an even number of real equations. The system of equations is also required to be Hamiltonian: a system is Hamiltonian if it follows the equation of motion y˙ = J −1 ∇H(y) ,

(12a)

with qi and pi elements of the vectors q and p. The flow of a Hamiltonian system is symplectic. Roughly speaking, the inverse is also true. 12,59 One can easily prove that the (usual) Schr¨odinger equation

This relation is rather important in order to ensure stability of the numerical propagator, and it is often violated by many explicit methods.

2.2

Page 6 of 22

(15a) (15b)

where the Hamiltonian matrix H defined by Hij = hΨi |H|Ψj i, and c is the vector of the coefficients. We now split the coefficients ci of the wave-function into their real and imaginary parts (16) ci = √12 (qi + ipi ) , √ √ i.e., qi = 2