<<

Linear and non-linear response phenomena of molecular within -dependent density functional theory

Doctoral thesis submitted by Xavier Andrade for the degree of Doctor of Physics

Supervisors: Prof. Angel Rubio and Dr. Silvana Botti June 2010 2 A Carolina 4 Agradecimientos

Antes que nada, quiero agradecer a todos quienes de una u otra manera me han ayudado durante mi doctorado y tesis, con sus consejos y discusiones. Son muchos para nombrarlos a todos, pero sin su ayuda esta tesis no ser´ıala misma: muchas gracias. Especialmente quiero agradecer a mi director de tesis, Angel, que siempre ha estado cerca para responder mis preguntas, hacer correcciones, sugerencias y toda clase de comentarios que enriquecieron mi trabajo. Mi tesis no hubiera sido posible sin su constante apoyo y entusiasmo. Tambi´en es importante para m´ıagradecer a Silvana y Miguel (y Samuelito), por su amistad, por su apoyo y por ayudarme a concretar resultados en los momentos que hac´ıafalta. Ellos, junto con Angel, son quienes guiaron esta tesis. Un lugar especial en mis agradecimientos es para los miembros presentes y pasados del grupo de Angel, con quienes me ha tocado compartir cada d´ıa y que me han ayudado con sugerencias y consejos, adem´asde interesantes discusiones cient´ıficas.Extra˜nar´elas cenas y las salidas a Mandr´agorade los jueves. Doy especiales gracias a Daniele, Michel y Micael que me ayudaron a integrarme al grupo, cuando solo ´eramosunos pocos. Particularmente quiero reconocer el esfuerzo de Nicole, que ti˜n´o1 de rojo las versiones preeliminares de esta tesis con sus comentarios y correcciones. Ciertamente mejor´omucho gracias a ellos. Tambi´en me gustar´ıareconocer a Lucia Reining y su grupo, que me aco- gieron en Palaiseau durante el primer a˜node esta tesis y en particular a Matteo Gatti, que me ayud´omucho cuando llegu´epor primera vez a Europa, sin entender mucho ni hablar franc´es. Agradezco a quienes me han acogido durante las muchas visitas que he hecho durante mi doctorado. He tenido oportunidad no solo de conocer

1te˜nir:f¨arben

5 6 gente con quien estoy muy contento de haber trabajado, sino que gracias a su hospitalidad he llegado a conocer lugares que nunca hubiera imaginado. Aunque pueda olvidarme de alguien, me gustar´ıadar las gracias a Fernando Nogueira, Kazuhiro Yabana y Al´anAspur´uy por supuesto, tambi´ena los integrantes de los grupos que dirigen. Quiero adem´asagradecer a las personas con quien he colaborado y hemos compartido interesantes discusiones: Roberto Olivares, David Strubbe, Jose Luis Alonso, Pablo Echenique y John Rehr. A los desarrolladores de Octopus, con quienes he trabajado los ´ultimos cuatro a˜nos y han soportado pacientemente el spam debido a mis commits y bugs, Alberto Castro, Florian Lorenzen, Heiko Appel, Micael Oliveira, Arto Sakko, Danilo Nitsche: mil gracias. Finalmente quiero agradecer a mi familia, en especial a mis padres, que me han apoyado desde Chile. Abstract

In this thesis we develop, implement and apply the formalism of time-de- pendent density functional theory (TDDFT) to the description of non-linear electronic and ionic phenomena of complex structures. This is framed in the general context of having an efficient formalism able to describe both the electronic and magnetic dynamical response properties of nanoscopic sys- tems beyond the linear regime, including time-resolved spectroscopies. As we are focusing on the modelling of realistic systems, emphasis is placed on developing formalisms that are suitable for efficient numerical implementa- tion. Two novel basic formulations are considered in this work: propagation in real-time of the TDDFT equations for arbitrary external perturbation and the frequency-dependent Sternheimer equation for linear and non-linear dynamical susceptibilities. The real-time TDDFT formulation, already a popular method for the calculation of optical absorption spectra, is extended in the present work to deal with other responses like the chiro-optical activity. A particular fundamental contribution in the thesis is the realisation of modified Ehrenfest dynamics, a mixed classical-quantum dynamics where the ions are treated as classical particles. In the adiabatic regime this new ab-initio molecular dynamics approach becomes competitive with the widely used Car-Parrinello and Born-Oppenheimer methods. The scheme is ideally suited for massive parallel implementations and allows handling of thousands of atoms. The Sternheimer equation is an alternative method for linear response in the frequency domain that, as the previous time-propagation scheme, does not need unoccupied states or response functions. It is based on the solution of a self-consistent set of linear equations for each frequency. In this work we present a dynamic version of the Sternheimer formalism that can be used to calculate response in the resonant and non-resonant regimes. We apply this formalism to calculate different properties, including the magnetic response

7 8 and the non-linear optical response. This thesis has a major component in algorithm development and code implementation to reach the goal of handling, from first principles, the non- equilibrium properties of systems with a large number of active particles, electrons and/or ions. This numerical implementation phase of the work is also discussed in detail, including the aspects required for efficient sim- ulations: the discretization of the problem based on a real-space grid, the algorithms used to solve the different equations and the optimization and parallelization of the code. Finally, some examples of applications are shown, where the methods are used to calculate different properties of physical systems of interest, including small molecules and nano-clusters, highlighting the impact of the present work for future applications in nano and bio-sciences. Conventions used in this thesis

Units The equations and magnitudes presented in this thesis are in . In this unit three fundamental physical constants are all unity by definition2:

• The reduced Planck constant ~. • The electronic charge e.

• The electron mass me.

The unit of energy in this system is the Hartree (abbreviated Ha) and the unit of length is the Bohr radius (abbreviated b). In some cases we will switch to more convenient units to present the results, in particular inverse centimetres (cm−1 = 4.56 × 106Ha) for vibrational frequencies and electron- volts (eV = 3.67 × 10−2Ha) for optical frequencies.

Notation Throughout this thesis we follow some conventions for quantities and indices:

• The imaginary unit is denoted byι ˙.

• Real-space vectors and tensors are typed in boldface and individual components are represented by letters i, j and k. So a represents a vector, a its norm, and ai the i-th component of it. Explicit components are denoted by indices x, y and z.

2 Additionally, we do not include any constant in the Coulombian force, so 0 = 1/4π.

9 10

• r is used to represent real-space electronic coordinates. For many- body quantities rK and rM are the coordinates of electrons K and M, respectively. The total number of electrons in a system is labelled Ne. • R represents ionic coordinates. Indices I and J are used for labelling i ions. RI is the i-th coordinate of the position of atom I. Ionic masses are labelled as MI and ionic charges as ZI . Na represents the total number of atoms in a system.

• Many-body wave-functions are represented by ψ and single-particle wave-functions by ϕ. Indices m and n are used for labelling energy levels and orbitals. Sums over these indices, unless explicitly noticed, are assumed to be over the set of occupied wave-functions. Contents

1 Introduction 17

2 Theory 23 2.1 Electrons: Density functional theory ...... 24 2.1.1 Ground-state density functional theory ...... 24 2.1.2 Time-dependent density functional theory ...... 26 2.1.3 Approximations for exchange and correlation ...... 26 2.2 Nuclei: Molecular dynamics ...... 27 2.2.1 Ehrenfest dynamics ...... 31 2.2.2 Ehrenfest-TDDFT ...... 34 2.2.3 Modified Ehrenfest-TDDFT formalism ...... 35 2.2.4 Calculations of forces ...... 40 2.3 Real-time formulation ...... 41 2.4 Sternheimer perturbation theory ...... 42 2.4.1 Sternheimer for non-linear response ...... 44 2.5 Electric response ...... 47 2.5.1 Optical response ...... 47 2.5.2 Second-order optical response ...... 48 2.5.3 Optical response and real-time TDDFT ...... 49 2.5.4 Electric response in the Sternheimer formalism . . . . . 50 2.6 Magnetic fields ...... 50 2.6.1 Magnetic response terms ...... 51 2.6.2 Gauge invariance and non-local potentials ...... 52 2.7 Optical activity ...... 53 2.7.1 Circular dichroism in TDDFT ...... 55 2.8 Vibrational modes ...... 56 2.8.1 Infrared spectroscopy ...... 56

11 12 Contents

2.8.2 Vibrational and infrared spectroscopy from real-time propagation ...... 57 2.8.3 Linear response for vibrational spectroscopy ...... 58 2.9 Vibrational Raman spectroscopy ...... 59

3 Numerical methods 63 3.1 Discretization: Real-space grids ...... 64 3.2 Pseudopotentials ...... 67 3.2.1 The pseudopotential approximation ...... 67 3.2.2 Forces ...... 68 3.2.3 Aliasing and pseudo-potential filtering ...... 69 3.3 Numerical algorithms ...... 76 3.3.1 Ground-state calculation ...... 76 3.3.2 Time propagation ...... 76 3.3.3 Numerical solution of the Sternheimer equation . . . . 78 3.4 Optimization and Parallelization ...... 80 3.4.1 Optimization of grid operations ...... 80 3.4.2 Optimization of non-local differential operations . . . . 81 3.4.3 Multi-level parallelization ...... 84 3.4.4 Parallelization in states ...... 86 3.4.5 Parallelization in atoms ...... 88 3.4.6 Parallelization in domains ...... 88 3.4.7 OpenMP ...... 90

4 Applications 91 4.1 Modified fast Ehrenfest dynamics ...... 91 4.1.1 Nitrogen molecule ...... 92 4.1.2 Benzene ...... 93 4.1.3 Fullerene molecule ...... 95 4.1.4 Conclusions ...... 95 4.2 Linear response ...... 99 4.2.1 Calculation of van der Waals coefficients ...... 99 4.2.2 Electromagnetic properties of boron fullerenes . . . . . 105 4.2.3 Optical activity ...... 113 4.2.4 Conclusions ...... 122 4.3 Non-linear response ...... 123 4.3.1 (Hyper)polarisabilities of small molecules ...... 123 4.3.2 The hyperpolarisability of chloroform ...... 130 Contents 13

4.3.3 Conclusions ...... 139

5 Conclusions 141 14 Contents About this thesis

The work presented in this document was carried out by Xavier Andrade, in collaboration with other researchers and with his supervisors Silvana Botti and Angel Rubio, between April 2005 and December 2009. Part of the work has been published in 8 peer review articles that in total have received more than 120 citations.3 This is the complete list of articles:

1. F. D. Vila, D. A. Strubbe, Y. Takimoto, X. Andrade, A. Rubio, S. G. Louie, and J. J. Rehr, Basis set effects on the hyperpolarizability of CHCl3 : Gaussian-type orbitals, numerical basis sets and real-space grids, Journal of Chemical Physics 133, 034111 (2010).

2. S. Botti, A. Castro, N. N. Lathiotakis, X. Andrade and M. A. L. Mar- ques, Optical and magnetic properties of boron fullerenes, Physical Chemistry Chemical Physics 11, 4523 (2009), 6 citations.

3. D. Varsano, L. A. Espinosa Leal, X. Andrade, M. A. L. Marques, R. di Felice, and A. Rubio, Towards a gauge invariant method for molecular chiroptical properties in TDDFT, Physical Chemistry Chemical Physics 11, 4481 (2009), 3 citations.

4. X. Andrade, A. Castro, D. Zueco, J. L. Alonso, P. Echenique, F. Fal- ceto, and A. Rubio, A modified Ehrenfest formalism for efficient large scale ab-initio molecular dynamics, Journal of Chemical Theory and Computation 5, 728 (2009), 2 cita- tions.

5. J. L. Alonso, X. Andrade, P. Echenique, F. Falceto, D. Prada-Gracia, and A. Rubio, Efficient Formalism for Large-Scale Ab Initio Molecular

3Citations until September 2010.

15 16 Contents

Dynamics based on Time-Dependent Density Functional Theory, Physical Review Letters 101, 96403 (2008), 5 citations.

6. S. Botti, A. Castro, X. Andrade, A. Rubio, and M. A. L. Marques, Cluster-surface and cluster-cluster interactions: Ab initio calculations and modeling of asymptotic van der Waals forces, Physical Review B 78, 035333 (2008), 4 citations.

7. X. Andrade, S. Botti, M. A. L. Marques, and A. Rubio, A time- dependent density functional theory scheme for efficient calculations of dynamic (hyper)polarizabilities, Journal of Chemical Physics 126, 184106 (2007), 17 citations.

8. A. Castro, M. A. L. Marques, H. Appel, M. Oliveira, C.A. Rozzi, X. Andrade, F. Lorenzen, E. K. U. Gross, and A. Rubio, octopus: a tool for the application of time-dependent density functional theory, Physica Status Solidi (b) 243, 2465 (2006), 88 citations. Chapter 1

Introduction

Prediction of the structural and electronic properties of complex electronic systems, like surfaces, polymers, nano-structures, biomolecules, etc. has seen a tremendous advance in the last 20 years [1,2], in part due to the evolution of computer power, but more importantly due to the development of exchange and correlation functionals that brought density functional theory (DFT) to chemical accuracy [3, 4]. Right now many computer software packages are available to study properties of molecular and crystalline systems such as structures, phase transitions, vibrational and deformation properties, etc. with applications in geophysics, astrophysics, biophysics and nano-science in general [5–9]. The fact that ground-state properties have reached a maturity in their description by first-principles techniques does not mean that all problems are solved. In particular, there is a big need for new and better approxi- mations that can treat properly weakly bond systems, charge transfer, and open quantum systems. Also, algorithmic and theoretical methods need to be developed to handle all properties appearing at different scales in time and size, bridging from femtoseconds to hours and from atoms to solids and macromolecules. However, in order to monitor all these phenomena experimentally we need to bring the system out of equilibrium by an external perturbation (electric, magnetic, optical, mechanic, etc.). Therefore, it is fundamental to have a proper development of the theory to study the response of electronic systems to general external perturbations. This is the scope of the present PhD work, that builds on the work done by the Nano-bio spectroscopy group over the last 15 years. The whole subject of electronic excited-state properties has

17 18 Chapter 1. Introduction seen a considerable advance due to the efforts of several research groups [10] that have put forward the concept of theoretical spectroscopy. Still, the de- velopment of the field is far from being at the level of ground-state DFT or quantum chemistry approaches. In the present work, we have made a substantial step forward in our understanding, both theoretical and compu- tational, of linear and non-linear phenomena of complex systems. When we are interested in understanding and exploiting the nanoscopic world, its reactions to external perturbations are essential. Most of the stud- ies done up to now focus on linear optical properties, the response to a low intensity electromagnetic field. However, response properties to other type of external perturbations or higher intensities offer a more complex phe- nomenology that can better describe what we see in nature and that is more suitable for technological applications. As these effects tend to be more com- plex, they pose a real theoretical challenge as, besides being more involved mathematically, they require a much larger computational cost when treated by numerical simulations. In many cases the experimental description is also challenging, which increases the importance of having predictive theoretical tools to complement, guide and extract insight from the experimental data. We can characterize response phenomena as the combination of the type of perturbation applied to the system and the type of response of the system that we look at. For example, in an optical absorption experiment, we apply light (the external perturbation) and we look at the light that comes back from the system (the response). In this particular case both correspond to the same type of perturbation, but this does not have to be the case, we might as well look at the magnetic field induced by an electric field or other kind of mixed responses. It is important to notice that, from the theoretical point of view we do not make a distinction between applied and observed fields1. We can also describe the response when more than one perturbative field is applied (non-linear response might be considered as a particular case, when a perturbative field acts more than once). In Table 1.1 we give a non- extensive but illustrative overview of how some linear and non-linear response properties come up as mixing of different perturbations. There are, however, other types of spectroscopies that cannot be directly describe in this manner. In particular, spectroscopies where either the incoming or outgoing particle

1At least in the instantaneous response regime. When addressing time resolved spec- troscopies, where the system is probed by a field that is delayed with respect to the pumping field, we need to make a distinction between the two fields. 19 is an electron, ion, or atom. In this thesis, we explore the theoretical description of linear and non- linear phenomena in a way that is precise enough to make quantitative pre- dictions while keeping the numerical cost low enough to be able to treat large realistic systems. The long term goal is to lay the basis for a gen- eral theoretical description of response that could be applied to all types of perturbations and observables for any kind of electronic system (molecules, clusters, nano-structures, and extended systems). Time-dependent density functional theory (TDDFT) [11,12] offers an ideal framework to accomplish this objective, it is a first-principles theory that gives a simple theoretical picture with a moderate computational cost and, in comparison with many- body approaches yields results that are reasonably accurate for most cases. Within the general TDDFT framework a proper mathematical formula- tion must be chosen, which determines the objects that we have to calculate and the equations that we have to solve. The standard perturbation theory approach, based on sum over states and response functions, while well suited for theoretical analysis is not the best approach for large scale numerical sim- ulations as it becomes computationally prohibitive for high-order non-linear response.2 Two alternative (equivalent) approaches to standard perturbation theory are explored in the present work. The first one is the real-time prop- agation of TDDFT equations, where one or more arbitrary time-dependent perturbations can be included and all non-linear response terms are auto- matically treated. This approach is very well suited for parallel computer architectures. The challenge in this method comes from the difficulties in extracting the physical information from the resulting time resolved quan- tities. The second approach is Sternheimer linear response, a formulation of perturbation theory based on the solution of a set of linear equations,3 a simple task, in principle, for a computer. This methodology has been successfully applied to the calculation of static properties like polarisabili- ties or vibrational modes. In this work we extend its application to general time-dependent response. As it is a reformulation of the perturbation theory

2For example, in the non-interacting case the number of sums over states to calculate a non-linear response coefficient increases with the order of the coefficient. So the numerical n cost for the nth-order response is proportional to NgNKS, with Ng the number of basis sets coefficients and NKS the number of occupied and unoccupied wave-functions, usually a large number for a properly converged calculation. 3In fact, from the numerical point of view, sum over states techniques are equivalent to solving a linear problem by matrix diagonalization rather than inversion. 20 Chapter 1. Introduction al .:Nnehutv ieradnnlna epnepeoeata a ecie sacombination a as described can that phenomena response non-linear perturbations. and different linear of Non-exhaustive 1.1: Table Deformation Vibration Magnetic Electric ffc,Nwv mix- ing. N-wave Kerr effect, effect, Pockels generation, Harmonic Non-linear scat- tering. Rayleigh tion, absorp- Polarisation, Linear Electric : : resonance. magnetic nuclear ity, susceptibil- Magnetic circular dichroism Magnetic Non-linear activity. Optical Linear Magnetic : : Anharmonicity. Non-linear modes, phonons. vibrational Linear hyper-Raman scatter- scattering. ing, Raman spec- Non-linear troscopy. Infrared Linear vibration Ionic : : : : on modulus Young magnetostriction Piezomagnetism, Piezoelectricity Deformation 21 picture, different response orders are treated explicitly giving more control over the system, facilitating the extraction of physical relevant quantities, at the cost of a more complicated formulation than time propagation. The implementation of the new theoretical developments of this thesis has been done within the Octopus code [13, 14]. Real-time propagation was already included in this package and it has been successfully applied to the calculation of several excited state properties of nano-structures and bio- molecules [15, 16]. In the case of the Sternheimer formalism, the full im- plementation of the formalism has been performed, addressing in detail the efficiency of the implementation and the optimization and parallelization of the code. This thesis is organized as follows. In Chapter 2 we present the theo- retical framework for this work. We start by showing the basic theory for electrons and ions in which we base our work. Then we introduce the general formalisms for response to an arbitrary perturbation. Two methods are dis- cussed: real-time propagation and Sternheimer linear response. We conclude by showing how these formalisms can be particularized for different response properties that involve electric, magnetic and vibrational perturbations (and some combinations of them). The next section, Chapter 3, is devoted to the details of the numerical implementation of the theoretical developments pre- sented in the previous chapter. First, we show how we deal efficiently with the numerical representation of the wave-functions, potentials, densities, and forces by real-space grid discretization and pseudo-potentials. Then we de- scribe the algorithms and techniques required to solve the different equations introduced in the theory chapter. Finally, we show the new parallelization and optimization techniques that were implemented to make the code more efficient and scalable to a massive number of processors. Chapter 4 con- tains the application of the theory and the numerical methods to calculate and study different properties of realistic physical systems. This chapter is divided in three subsections. First we describe the implementation of our new scheme for ab-initio molecular dynamics calculations. Then linear re- sponse is used to calculate relevant effect is nano-science like van der Waals forces, magnetic susceptibilities, and dichroic spectra. Finally, we calculate non-linear optical response properties of small molecules. We present the conclusions in Chapter 5 and briefly discuss extensions of the present work to more complex systems as liquids, solids and large biomolecules. 22 Chapter 1. Introduction Chapter 2

Theory

This chapter is devoted to defining the theoretical framework used in this work, a choice that determines the accuracy of our results, the range of applicability, and numerical complexity. While the interactions of atomic systems with light can be properly described within Quantum Electrody- namics [17], the complexity of this theory makes it unusable for realistic calculations of electronic systems. Therefore, we need to rely on several ap- proximations. The first level of approximation is to describe the light as a classical electromagnetic field which is a reasonable approximation for stan- dard electromagnetic fields (it will fail in cases where single photon processes play a fundamental role). For electrons and ions we assume then that they are governed by the non-relativistic Schr¨odingerequation1 d Hˆψ({r}, {R}, t) =ι ˙ ψ({r}, {R}, t) , (2.1) dt where ψ is the many-body wave-function, {r} and {R} are the sets of elec- tronic and ionic coordinates, respectively, and t is the time coordinate. Hˆ is the many-body Hamiltonian operator, usually divided into a kinetic part, T,ˆ and a potential part, V.ˆ Even at the level of non-relativistic quantum mechanics, the exact nu- merical simulation of realistic systems is prohibitively expensive [18], so an alternative approach is required. In this work we use density functional theory (DFT) [3, 4, 18, 19], which is an exact reformulation of quantum me- chanics in terms of the ground-state density, rather than the ground-state

1It is possible to include relativistic effects for the electrons such as spin-orbit interac- tion corrections.

23 24 Chapter 2. Theory wave-function.2 For practical calculations certain approximations need to be made since the exact functional that yields the energy for a given density is unknown. We introduce density functional theory, both the ground-state and time-dependent versions, in section 2.1. Also the quantum mechanical description of the nuclear ions would be too expensive, so to include nuclear dynamics in our system we need to ap- proximate the ions as classical point-like particles. This approximation gives rise to the Ehrenfest molecular dynamics framework described in section 2.2.

2.1 Electrons: Density functional theory

In this section we give a brief account of density functional theory, both at the ground-state level and the more general time-dependent case. We refer the reader to the excellent books and reviews available to get a more detailed introduction into this topic [1,2,12,15,19–21].

2.1.1 Ground-state density functional theory In 1965 Hohenberg and Kohn [3] proved that the ground state energy of a quantum system of Ne identical particles is a unique functional of the probability density, n, giving the formal basis of density functional the- ory. Later, Kohn and Sham [4] showed that, under certain conditions of v-representability, it is possible to construct that density by solving a non- linear set of single-particle equations

1  ˆp2 + ˆv + ˆv [n] |ϕ i =  |ϕ i , (2.2) 2 ext eff m m m

Ne X ∗ n(r) = ϕm(r)ϕm(r) , (2.3) m=1 where ˆpis the single particle momentum operator, ˆvext is the external po- tential, and the Kohn-Sham (KS) orbitals, |ϕmi, and eigenvalues, m, are

2In this work, we use the term exact for results that reproduce the ones of non- relativistic many-body quantum mechanics, which are, in practice, very accurate but not exact (a scientific theory can never be an exact representation of nature). 2.1. Electrons: Density functional theory 25 auxiliary quantities without any direct physical meaning3. The non-linearity is introduced by the fact that the effective potential, veff , depends on n. The advantage of Kohn Sham DFT for numerical calculation is that it re- places a 3Ne-dimensional object, the many-body wave-function, with Ne + 1 3-dimensional objects, the density and the auxiliary orbitals, lowering the complexity of the quantum problem from exponential to quadratic4. How- ever, there is a high price to pay for this simplification. In standard quantum mechanics the equation that the wave-function must satisfy is well known. In DFT the single-particle potential that reproduces the same density as the solution of the many-body Schr¨odingerequation is not known5 and must be approximated. In general, the effective single-particle potential is divided into two terms

veff [n](r) = vHartree[n](r) + vxc [n](r) , (2.4)

The first term is called the Hartree term and accounts for the classical elec- tric interaction between electrons (R dr0 n(r0)/ |r − r0| in free space). The second one, called the exchange and correlation potential, includes the quan- tum mechanical effects of exchange and correlation as well as the correlation contribution to the single particle kinetic energy. The first approximation for vxc, known as the local density approximation (LDA), was proposed in 1965 by Kohn and Sham [4]. Within this approxi- mation one assumes that the exchange and correlation potential at a certain point in space only depends on the value of the density at that point. The functional form is taken from the exchange and correlation potential of a homogeneous electron gas with that density (i.e. at each point in space we locally substitute an inhomogeneous system with a homogeneous one with the same density). More general approximations have been proposed which include additional information in the effective potential. Including the lo- cal gradients of the density leads to the generalized gradient approximation

3It has been proven that, in exact DFT, the eigenvalue of the uppermost occupied KS orbital equals the exact ionization potential [22]. 4However, due to orthogonalization, the standard solution methods for the KS equation require a number of operations that scales cubically with the system size. But using locality principles it is possible to reduce it, in some cases, to a linear scaling [23]. 5In principle, the quality of a theory should be measured against experimental results, but in this case we already have a precise theory to compare against. However, one should have in mind that it is legitimate to validate the quality of an approximation by its predictions of physical properties. 26 Chapter 2. Theory

(GGA) [24–26]), supplying that with the kinetic energy density yields the meta-GGA [27]. The use of the Kohn-Sham orbitals in the approximation results in the so-called orbital functionals which include the self interaction correction [28] and exact exchange [29,30]. Going beyond local potentials by including the Hartree-Fock exchange operator in the approximation leads to hybrid functionals [31,32].

2.1.2 Time-dependent density functional theory In 1984 Runge and Gross [11] extended the Hohenberg-Kohn theorem to a time-dependent density n(r, t) and showed that a time-dependent quantum system can be mapped to a single-particle system that produces the same density over a given period of time. The single-particle equations for this system read as

d 1  ι˙ |ϕ (t)i = ˆp2 + ˆv (t) + ˆv [n] + ˆv [n] |ϕ (t)i , (2.5) dt m 2 ext Hartree xc m

Ne X ∗ n(r, t) = ϕm(r, t)ϕm(r, t) , (2.6) m=1 and are usually called the time-dependent Kohn-Sham (TDKS) equations. Again, the exact ˆvxc is not known and is even more complicated than in ground-state DFT: it is a functional that depends on the density at all previ- ous (memory effect) and on the initial conditions (the many-body state at t = 0). The usual approximations are based on neglecting the memory effect by assuming that the exchange-correlation potential at a certain time only depends on the density at that time. The value is then given by one of the approximations used in DFT, yielding the adiabatic LDA (ALDA) or adiabatic GGA approximations. Similarly, one can extend orbital functionals to TDDFT.

2.1.3 Approximations for exchange and correlation The use of adiabatic functionals in TDDFT is a well studied approxima- tion, which is quite reliable in the prediction of many properties of finite and extended systems [33]. However, it has major deficiencies [34]. One im- portant defect, that we will observe in some of the results presented in this 2.2. Nuclei: Molecular dynamics 27 work, is in the wrong asymptotic part of the LDA exchange-correlation po- tential, which, neutral systems, decays exponentially instead of falling as −1/r. This usually leads to an underestimation of HOMO-LUMO gaps which implies that systems are too polarisable, in contrast to Hartree-Fock where the gap is larger and the magnitudes of the polarisabilities are un- derestimated. The situation is particularly problematic in the case of long molecular chains [35–39], where standard exchange-correlation functionals can greatly overestimate polarisabilities when compared to many-body ap- proaches. Note, however, that this is not a deficiency of DFT but of the LDA approximation (and of many exchange-correlation functionals). Such prob- lems can, in principle, be treated in DFT [40–42] by using more sophisticated orbital functionals like the self-interaction corrected LDA [28] or exact ex- change [43]. However in present orbital functionals there is still a significant correlation contribution that is not taken into account and is responsible for the discrepancies with experimental results. Other problems of the adiabatic approximations in TDDFT include, for example, the description of double excitations [44,45], charge transfer excitations [46] or the optical response of bulk insulators [47–49].

2.2 Nuclei: Molecular dynamics6

For many properties it is assumed that the dynamics of the nuclei that com- pose the system are not relevant. Simulations in this context are performed in a clamped ion approximation, where the ions are fixed and the electrons move in the fixed classical potential generated by them. This approximation is justified by the large nuclear mass, compared with the electronic one, and that theoretical predictions are done at zero temperature (neglecting the zero point motion). However, the nuclear motion, including zero-point vibrations, is essential for many properties, such as infrared and Raman spectroscopy for example. The inclusion of the movement of the atoms is, in principle, a complicated task, and a description of electrons and nuclei in terms of a many-body wave-function is numerically impractical. Usually, two approximation steps, justified by the large ratio between the ionic mass and the electronic one, are

6This section is adapted from the article X. Andrade et al, A modified Ehrenfest for- malism for efficient large scale ab-initio molecular dynamics, Journal of Chemical Theory and Computation 5, 728–742 (2009). 28 Chapter 2. Theory done to reduce the complexity of the problem (besides the ones made for the electronic part)

• Separate the wave-function in two parts, one that depends on the nu- clear coordinates and one on the electronic ones.

• Assume that the atoms are classical point-like particles described by their positions and velocities.

This approximation reduces the computational cost considerably at the price of introducing some errors related to the flow of energy between the classical ions and the quantum electrons. The idea of treating atoms as classical particles lead to the concept of molecular dynamics (MD) [50]. In order to follow the dynamics of a system of atoms or molecules in time, “one could at any instant calculate the force on each particle by considering the influence of each of its neighbours. The trajectories could then be traced by allowing the particles to move under a constant force for a short-time interval and then by recalculating a new force to apply for the next short-time interval, and so on.” This description was given in 1959 by Alder and Wainwright [51] in one of the first reports of a computer-aided MD calculation. We can still use this description to broadly define the scope of MD, although many variants and ground-breaking developments have appeared over the past fifty years. They mainly address two key issues: the limitations in the number of particles and the time ranges that can be addressed, and the accuracy of the interaction potential. The former issue was already properly stated by Alder and Wainwright: “The essential limitations of the method are due to the relatively small num- ber of particles that can be handled. The size of the system of molecules is limited by the memory capacity of the computing machines.” This statement is not obsolete, although the expression “small number of particles” has to- day, of course, a very different meaning – linked as it is to the exponentially growing capacities of computers. The latter issue – the manner in which the atomic interaction poten- tial is described – has also developed significantly over the years. Alder and Wainwright used solid impenetrable spheres in the place of atoms; nowadays, in the realm of the so-called “classical” MD one makes use of force fields: simple mathematical formulae are used to describe atomic interactions; the expressions are parameterized by fitting either to reference first-principles 2.2. Nuclei: Molecular dynamics 29 calculations or experimental data. These models have become extremely so- phisticated and successful, although they are ultimately bound by a number of limitations. For example, it is difficult to tackle electronic polarisation ef- fects and one needs to make use of polarisable models, whose transferability is very questionable, but they are widely used with success in many situations. Likewise, the force-field models are constructed assuming a predetermined bond arrangement, disabling the option of chemical reactions – some tech- niques exist that attempt to overcome this restriction [52], but they are also difficult to transfer and must be carefully adapted to each particular system. The road towards precise, non-empirical inter-atomic potentials reached its destination when the possibility of performing ab initio molecular dy- namics (AIMD) was realized [53, 54]. In this approach, the potential is not modelled a priori via some parameterized expression, but rather generated “on the fly” by performing accurate first-principles electronic structure cal- culations. The accuracy of the calculation is, therefore, limited by the level of theory used to obtain the electronic structure – although one must not for- get that underlying all MD simulations is the electronic-nuclear separation ansatz, and the classical limit for the nuclei. The use of very accurate first-principles methods for the electrons implies very large computational times, and, therefore, it is not surprising that AIMD was not really born until DFT became mature – since it provides the neces- sary balance between accuracy and computational feasibility [3,4,18,19]. In fact, the term AIMD, in most occasions, refers exclusively to the technique proposed by Car and Parrinello in 1985 [55], which is based on DFT, but which also introduces an ingenious acceleration scheme based on a fake elec- tron dynamics. However, the term AIMD encompasses more possibilities – and, in fact, in the present section we discuss one of them. As a matter of fact, the most obvious way to perform AIMD would be to compute the forces on the nuclei by performing electronic structure cal- culations on the ground-state Born-Oppenheimer potential energy surface. We call this procedure ground-state Born Oppenheimer MD (gsBOMD). It implies a demanding electronic minimization at each time step. The Car- Parrinello (CP) technique is a scheme that allows to propagate the KS or- bitals with a fictitious dynamics that nevertheless mimics gsBOMD – bypass- ing the need for the expensive minimization. This idea has had an enormous impact, allowing for successful applications in a surprisingly wide range of ar- eas (see the special issue in Ref. [56] and references therein). Still, it implies a substantial cost, and many interesting potential applications have been 30 Chapter 2. Theory frustrated due to the impossibility of attaining the necessary system size or simulation time length. There have been several efforts to refine or redefine the CP scheme in order to enhance its power: linear scaling methods [57] attempt to speed-up any electronic structure calculation; the use of a local- ized orbital representation (instead of the much more common plane-waves utilized by CP practitioners) has also been proposed; recently, K¨uhne and coworkers [58] have proposed an approach which is based on CP, but allows for sizable gains in efficiency. In any case, the cost associated with the orbital orthonormalization which is required in any CP-like procedure is a potential bottleneck that hinders its application to very large-scale simulations. Another possible AIMD strategy that fits naturally into the TDDFT framework, is Ehrenfest MD, which we present in detail in the following section. Here, one still uses the electron-nuclei separation ansatz and the Wentzel-Kramers-Brillouin [59–61] (WKB) classical limit. However, the elec- tronic subsystem is not assumed to evolve adiabatically on one of the po- tential energy surfaces (PES). This permits the electrons to move between different PES, and to evolve into linear combinations of adiabatic states. As a drawback, the time-step required for a simulation in this scheme is de- termined by the maximum electronic frequency, and is about three orders of magnitude smaller than the time step required to follow the nuclei in a gsBOMD. If one wants to do Ehrenfest-MD, the traditional ground-state DFT is not enough, and one must rely on TDDFT or any other quantum mechan- ical scheme to describe excited states of many-electron systems. Coupling TDDFT to Ehrenfest MD provides an orthogonalization-free alternative to CP AIMD – plus it allows for excited-states AIMD. If the system is such that the gap between the ground state and the excited states is large, Ehrenfest- MD tends to gsAIMD. The advantage provided by the lack of need of or- thogonalization is unfortunately diminished by the smallness of the required time-step. We start the next section with a revision of the mathematical route that leads from the full many-particle electronic and nuclear Schr¨odingerequation to the Ehrenfest MD model. Next, we clear up some confusions sometimes found in the literature related to the application of the Hellmann-Feynman theorem, and we discuss the integration of Ehrenfest dynamics in the TDDFT framework. Then we introduce a simple modification of Ehrenfest dynamics that, when applied to adiabatic molecular dynamics, allows to increase the time step, making the method a competitive alternative for AIMD. 2.2. Nuclei: Molecular dynamics 31

2.2.1 Ehrenfest dynamics The starting point is the time-dependent Schr¨odingerequation, Eq. (2.1),  for a molecular system described by the wave-function ψ rK , RI , t . The complete molecular Hamiltonian operator for electrons and ions is defined as

ˆ X 1 2 X 1 2 X 1 X ZI X ZI ZJ H = − ∇I − ∇K + − + , 2MI 2 |rK − rM | |RI − rK | |RI − RJ | I K K

X ZI ˆvn−e(rK , RI ) = − , (2.8) |RI − rK | I,j and the electronic Hamiltonian

ˆ X 1 2 X 1 He(rj, RI ) = − ∇j + ˆvn−e(r, R) + . (2.9) 2 |rj − rM | j j

The initial conditions of Eq. (2.1) are given by

0 ψ = ψ(rK , RI , 0) , (2.10) and we assume that ψ(rK , RI , t) vanishes for rK ,RI → ∞ for all times. In order to derive the quantum-classical molecular dynamics known as Ehrenfest molecular dynamics from the above setup, one starts with a sep- aration ansatz for the wave-function ψ(rK , RI , t) between the electrons and the nuclei [62, 63], leading to a set of time-dependent self-consistent-field equations [53, 64]. The next step is to approximate the nuclei as classical point particles via short wave asymptotics, through the WKB approxima- tion [53, 59–61, 64, 65]. The resulting Ehrenfest MD scheme is contained in the following system of coupled differential equations [64,65]

˙ ˆ ι˙ψ(rK , t) = He(rK , RI )ψ(rK , t) , (2.11a) Z h i ¨ ∗ ˆ  MJ RJ (t) = − dr ψ (rK , t) ∇J He rK , RI (t) ψ(rK , t) , (2.11b)

where ψ(rK , t) is the wave-function of the electrons. 32 Chapter 2. Theory

The initial conditions in Ehrenfest MD are given by

0 ψ = ψ(rK , 0) , (2.12a) 0 ˙ 0 ˙ RI = RI (0) , RI = RI (0) , (2.12b) and we assume that ψ(rK , t) → 0 with rK → ∞ for all times. Since {RI , ψ} is a set of independent variables, we can rewrite Eq. (2.11b) as Z ¨ ∗ ˆ  MJ RJ (t) = −∇J dr ψ (rK , t)He rK , RI (t) ψ(rK , t) (2.13) which is similar in form but unrelated to the Hellmann-Feynman theorem7. As pointed out by Tully [70], it is likely that the confusion about whether Eq. (2.13) should be used to define the Ehrenfest MD, or the gradient must be applied to the electronic Hamiltonian inside the integral, as in Eq. (2.11b), has arisen from applications in which ψ(rK , t) is expressed as a finite ex- pansion in the set of adiabatic basis functions, ηm(rK , RI ), defined as the 8 ˆ eigenfunctions of He(rK , RI ): ˆ He(rK , RI )ηm(rK , RI ) = Em(RI )ηm(rK , RI ) . (2.14)

As a result of the expansion, ψ(rK , t) seems to depend on R in which case Eqs. (2.11b) and (2.13) are no longer equivalent. As we have emphasized, there exists no explicit dependence of ψ on the nuclear positions RI , and a precise notation is necessary to avoid any confusion. Although the approach underlying Ehrenfest MD is clearly a mean-field theory, transitions between electronic adiabatic states are included in the scheme. This can be made evident by performing the following change of 0 coordinates from {ψ, RI } to {c, RI }

∞ X 0  ψ(rK , t) = cm(t)ηm rK , RI (t) , (2.15a) m=1 0 RI (t) = RI (t) , (2.15b)

7Perhaps the first detailed derivation of the so-called Hellmann-Feynman theorem was given by G¨uttinger[66]. The theorem had nevertheless been used before that date [67]. The derivations of Hellmann [68] and Feynman [69], who named the theorem, came a few years afterwards. 8 In general, {ηm(rK , RI )} contains a discrete and a continuous part. However, in this manuscript, we only consider the discrete part in order to simplify the mathematics. 2.2. Nuclei: Molecular dynamics 33

where ηm(rK , R) are known functions given by (2.14) and, even if the trans- 0 formation between RI and RI is trivial, we have used the prime to emphasize that there are two distinct sets of independent variables. This is very impor- tant if one needs to take partial derivatives, since a partial derivative with respect to a given variable is only well defined when the independent set to which that variable belongs is specified9. If we perform the change of variables described in Eq. (2.15) to the Ehren- fest MD, Eq. (2.11), and we use that ˆ 0 ˆ 0 ∇J He(rK , RI ) = ∇J He(rK , RI ) , (2.16) we see that we have to calculate terms of the form Z ∗ 0  0 ˆ 0  0  dr ηm rK , RI (t) ∇J He rK , RI (t) ηn rK , RI (t) , (2.17) which can be easily extracted from the relation Z 0 ∗ 0 ˆ 0  0  0 0  ∇J dr ηm rK , RI (t) He rK , RI (t) ηn rK , RI (t) = ∇J Em RI (t) δmn . (2.18) In this way, we obtain the following Ehrenfest MD equation for the nuclei

¨ 0 X 2 0 0  MJ RJ (t) = − |cm(t)| ∇J Em RI (t) m X ∗  0  0  mn 0  − cm(t)cn(t) Em RI (t) − En RI (t) dJ RI (t) , (2.19) m,n where the non-adiabatic couplings are defined as Z mn 0  ∗ 0  0 0  dJ RI (t) = dr ηm rK , RI (t) ∇J ηn rK , RI (t) . (2.20)

To obtain the electronic Ehrenfest MD equation for cm(t), we perform the change of variables in Eq. (2.11a), multiply the resulting expression by ∗ 0  ηn rK , RI (t) , and integrate over the electronic coordinates rK . Proceed- ing in this way, we arrive at " # 0  X X ˙ 0 mn 0  ι˙~ c˙m(t) = Em RI (t) cm(t) − ι˙~ cn(t) RJ (t) · dJ RI (t) . (2.21) n J

9In the development of the classical formalism of thermodynamics this point is crucial. 34 Chapter 2. Theory

In the nuclear equation (2.19), we can see that the term depending on 2 the moduli |cm(t)| directly couples the population of the adiabatic states to the nuclear trajectories, whereas interferences between these states are ∗ included via the cm(t)cn6=m(t) contributions. Analogously, in the electronic equations above, the first term represents the typical evolution of the coef- ficient of an eigenstate of a Hamiltonian. Differently from the full quantum case, however, in Ehrenfest MD, the second term couples the evolution of all states with each other through the velocity of the classical nuclei and the non-adiabatic couplings. Moreover, Ehrenfest MD is fully (quantum) coher- ent, since the complex coefficients cm(t), are the ones corresponding to the quantum superposition in the electronic wave function. A proper theory that treats the electronic process of coherence and decoherence realistically is of fundamental importance to properly interpret transition rates and to have control over processes happening at the attosecond/femtosecond time scales. At finite temperature, it is known that Ehrenfest MD cannot account for the Boltzmann equilibrium population of the quantum subsystem [71–73]. The underlying reason of this failure is the mean-field approximation in Eq. (2.11b) which neglects the nuclear response to the microscopic fluctu- ations in the electronic charge density.

2.2.2 Ehrenfest-TDDFT

TDDFT offers a natural framework to implement Ehrenfest MD. In fact, starting with an extension [74] of the Runge-Gross theorem [11] to arbitrary multicomponent systems, one can develop a TDDFT [15] for the combined system of electrons and nuclei. Then, after imposing a classical treatment of the nuclear motion, one arrives at an Ehrenfest-TDDFT dynamics. Formally, this scheme can also be generated from the following Lagrangian [15, 75, 76] for time-dependent KS wave-functions, ϕ, and the ionic positions, R,

X MI Lϕ, ϕ,˙ R, R˙  = R˙ · R˙ − E ϕ, R 2 I I KS I ι˙ X Z + dr [ϕ∗ (r, t)ϕ ˙ (r, t) − ϕ˙ ∗ (r, t)ϕ (r, t)] . (2.22) 2 m m m m m 2.2. Nuclei: Molecular dynamics 35

2.2.3 Modified Ehrenfest-TDDFT formalism10 In some situations the contribution of the electronic excited states to the nuclear dynamics is negligible, i.e., situations in which one is interested in performing ground-state Born-Oppenheimer molecular dynamics [53]. By modifying the electronic equations of motion of Ehrenfest dynamics, we can obtain a molecular dynamics formalism that allows for a much larger time step, significantly reducing the computational cost.

Lagrangian and equations of motion The new scheme can be obtained from the following Lagrangian

X MI L[ϕ, ϕ,˙ R, R˙ ] = R˙ · R˙ − E [ϕ, R] 2 I I KS I ι˙ X Z + µ d r [ϕ∗ (r, t)ϕ ˙ (r, t) − ϕ˙ ∗ (r, t)ϕ (r, t)] . (2.23) 2 m m m m m Note that the only modification with respect to the Ehrenfest-TDDFT La- grangian in Eq. (2.22) is the presence of a parameter µ that introduces a re-scaling of the electronic velocities (Ehrenfest-TDDFT is recovered when µ = 1). The equations of motion of the new Lagrangian, Eq. (2.23), are

δEKS[ϕ, R] 1 2 ι˙ µϕ˙ m(r, t) = ∗ = − ∇ ϕm(r, t) + vKS[ϕ, R](r, t)ϕm(r, t) , δϕm 2 (2.24a) ¨ MI RI = −∇I EKS[ϕ, R] , (2.24b) where vKS is the time-dependent KS effective potential. We compare with the gsBOMD Lagrangian

X MI L [ϕ, R, R˙ ] = R˙ · R˙ − E [ϕ, R] BO 2 I I KS I Z  X BO ∗ + Λmn drϕm(r, t)ϕn(r, t) − δmn , (2.25) mn

10This corresponds to the work presented in the article J. L. Alonso, X. Andrade, et al, Efficient Formalism for Large-Scale Ab Initio Molecular Dynamics based on Time- Dependent Density Functional Theory, Physical Review Letters 101, 96403 (2008). 36 Chapter 2. Theory

BO BO where Λ = (Λmn ) is a Hermitian matrix of time-dependent Lagrange multi- pliers that ensure that the orbitals ϕ form an orthonormal set at each instant of time. The corresponding equations of motion are

1 X − ∇2ϕ (r, t) + v [ϕ, R]ϕ (r, t) = ΛBOϕ (r, t) , (2.26a) 2 m KS m mn n n Z ∗ drϕm(r, t)ϕn(r, t) = δmn , (2.26b) ¨ MI RI = −∇I EKS[ϕ, R] . (2.26c)

BO The Euler-Lagrange equations corresponding to Λmn , Eq. (2.26b), are exactly the orhonormality constraints, and, together with Eq. (2.26a), constitute the time-independent KS equations. Therefore, assuming no meta-stability issues in the optimization problem, the orbitals ϕ are completely determined11 by the nuclear coordinates R, being in fact the BO ground state, ϕ = ϕgs(R). This allows us to write the equations of motion for gsBOMD in a much more compact and familiar form

¨  gs  MI RI = −∇I EKS ϕ (R),R . (2.27)

We can also compare the dynamics introduced in Eqs. (2.24) with the CP scheme, whose Lagrangian reads

X MI L [ϕ, ϕ,˙ R, R˙ ] = R˙ · R˙ − E [ϕ, R] CP 2 I I KS I 1 X Z + µ dr|ϕ˙ (r, t)|2 2 CP m m Z  X CP ∗ + Λmn drϕm(r, t)ϕn(r, t) − δmn , (2.28) mn

11This fact is not in contradiction with the above discussion about independent coordi- nates. The difference between Ehrenfest MD and gsBOMD is that in the Lagrangian for the latter, the orbital ‘velocities’ϕ ˙ do not appear, thus generating Eqs. (2.26a) and (2.26b), which can be regarded as constraints between ϕ and RI . 2.2. Nuclei: Molecular dynamics 37 and the corresponding equations of motion are

1 X µ ϕ¨ (r, t) = − ∇2ϕ (r, t) + v [ϕ, R] + ΛCPϕ (r, t) , CP m 2 m KS mn n n (2.29a) Z ∗ drϕm(r, t)ϕn(r, t) = δmn , (2.29b) ¨ MI RI = −∇I EKS[ϕ, R] , (2.29c)

CP CP where Λ = (Λmn) is again a Hermitian matrix of time-dependent Lagrange multipliers that ensure the orthonormality of the orbitals ϕ, and µCP is a fictitious electron ‘mass’ which plays a similar role to the parameter µ in our new dynamics. Before discussing, in detail, the main concepts of the present dynamics it is worth to state its main advantages and deficiencies. When applied to per- form gsBOMD the method can be considerably faster than Ehrenfest MD, it preserves exactly both the total energy and the wave-function orthogonal- ity, and allows for a very efficient parallelization scheme that requires low communication. However, the speed-up comes at a cost, as it increases the non-adiabatic effects.

Symmetries and conserved quantities In the following we discuss the conserved quantities associated to the global symmetries of the Lagrangian in Eq. (2.23) and compare them with those of gsBOMD and CPMD. We also investigate a gauge symmetry that is the key to understand the behavior of Eq. (2.23) in the limit µ → 0 and its relation with gsBOMD. The first symmetry we want to discuss is the time translation invariance of (2.23). This is easily recognized as L does not depend explicitly on time. Associated to this invariance there is a conserved ‘energy’. Namely, using the Noether theorem [77,78], we find that Z   X δL δL ∗ X ∂L ˙ p E = dr ϕ˙ m(r, t) + ∗ ϕ˙ m(r, t) + p RI − L δϕ˙ m(r, t) δϕ˙ (r, t) ˙ m m I,p ∂RI X 1 = M R˙ 2 + E [ϕ, R] (2.30) 2 I I KS I 38 Chapter 2. Theory is constant under the dynamics given by Eq. (2.24). Notice that E does not depend on the unphysical parameter µ and actually coincides with the exact energy that is conserved in gsBOMD. The situation is different in CPMD. There, we also have time translation invariance but the constant of motion reads Z X 1 E = dr µ ϕ˙ ∗ (r, t)ϕ ˙ (r, t) + E, (2.31) CP 2 CP m m m which depends directly on the unphysical ‘mass’ of the electrons, µCP, and its conservation implies that the physical energy E varies in time. Still, this drawback has a minor effect, since it has been shown that the CP physical energy follows closely the exact gsBOMD energy curve [53]. The second global symmetry we want to consider is the change of or- n thonormal basis of the space spanned by {ϕm}m=1. Namely, given a Hermi- tian matrix Smn, we define the following transformation

0 X −ιS˙  ϕm = e mn ϕn . (2.32) n P 2 The Lagrangian in (2.23) depends on ϕ only through ρ = m |ϕm| and P ∗ m ϕmϕ˙ m. Provided the matrix S is Hermitian and constant in time, both expressions are left unchanged by the transformation. Hence, we can invoke again the Noether theorem to obtain a new conserved quantity that reads

X Z  δL δL  − ι˙ dr S ϕ (r, t) − S ϕ∗(r, t) = δϕ˙ (r, t) mn n δϕ˙ ∗ (r, t) mn n m,n m m Z X ∗ µ drϕm(r, t)Smnϕn(r, t) . (2.33) m,n Observe that we have a constant of motion for any Hermitian matrix S. This permits us to combine different choices of S such that Z ∗ drϕm(r, t)ϕn(r, t) = const. (2.34)

In other words, if we start with an orthonormal set of wave functions ϕ and the system evolves according to (2.24), the family of wave functions maintains its orthonormal character in time. We would like to mention here that the above property is sometimes substantiated erroneously on a supposed unitarity of the evolution opera- tor. Simply noticing that the evolution of ϕ is not linear as both (2.24a) 2.2. Nuclei: Molecular dynamics 39 and (2.24b) are non-linear equations, and that unitary evolution requires linearity, one can discard the unitarity argument from the start. There is, however, a delicate point here that is worth discussing. The issue is that the µ → 0 limit of our dynamics should correspond to gsBOMD in Eq. (2.26) (which includes Lagrange multipliers to keep orthonormalization), but the Lagrangian in (2.23) does not contain any multipliers and in fact they are unnecessary, as our evolution preserves the orthonormalization. This may rise some doubts on the equivalence between gsBOMD and the limit of vanishing µ of our dynamics. To settle the issue, we introduce the additional dynamical fields Λ = (Λmn), corresponding to Lagrange multipliers, into our Lagrangian in Eq. (2.23), i.e., Z  ˜ ˙ ˙ X ∗ L[ϕ, ϕ,˙ R, R, Λ] = L[ϕ, ϕ,˙ R, R] + Λmn drϕm(r, t)ϕn(r, t) − δmn . mn (2.35) This modification has an important consequence: the global symmetry in (2.32) becomes a gauge symmetry with time-dependent matrix elements. Actually, one can easily verify that L˜ is invariant under

ϕ0 = e−ιS˙ ϕ , (2.36a) d Λ0 = e−ιS˙ ΛeιS˙ − ιµe˙ −ιS˙ eιS˙ . (2.36b) dt

This implies that, for µ 6= 0, the fields Λmn can be transformed to any desired value by suitably choosing the gauge parameters Smn(t). Their value is therefore irrelevant and one could equally well take Λ = 0, as in (2.23), or Λ = ΛBO (the value it has in gsBOMD) without affecting any physical observable. This solves the puzzle and shows that the µ → 0 limit of the dynamics of Eq. (2.24) is in fact the exact gsBOMD.

Physical interpretation of the new dynamics If we take equation (2.24a) and write the left-hand side as dϕ dϕ µ = , (2.37) dt dte the resulting equation can be seen as the standard Ehrenfest method in terms of a fictitious time te. Two important properties can be obtained from this transformation. 40 Chapter 2. Theory

On the one hand, it is easy to see that the effect of µ is to scale the TDDFT (µ = 1) excitation energies by a 1/µ factor. So for µ > 1 the gap of the artificial system is decreased with respect to the real one, while for small values of µ, the excited states are pushed up in energy forcing the system to stay in the adiabatic regime. This gives a physical explanation to the µ → 0 limit shown before. On the other hand, given the time step for standard Ehrenfest dynamics, ∆t (µ = 1), from (2.37) we obtain for the time step as a function of µ

∆t (µ) = µ ∆t (µ = 1) . (2.38)

Therefore, for µ > 1 the propagation will be µ times faster than the normal Ehrenfest propagation. By taking into account these two results we can see that there is a trade-off in the value of µ: low values give physical accuracy while large values produce a faster propagation. The optimum value, µmax, is the maximum value of µ that still keeps the system near the adiabatic regime. It is reasonable to expect that this value will be given by the ratio between the electronic gap and the highest vibrational frequency in the system. For many systems, like some molecules or insulators, this ratio is large and we can expect large improvements with respect to standard Ehrenfest MD. For other systems, like metals, this ratio is small or zero and our method will not work well. We note that a similar problem appears in the application of CP to these systems.

2.2.4 Calculations of forces

The calculation of forces in both the Born-Oppenheimer (ground state) and the Ehrenfest-TDDFT schemes requires the evaluation of the derivative of 12 the energy with respect to the ionic position RI

" # ∂E ∂ X Z F = − = − dr ϕ∗ (r)v (r − R )φ (r) . (2.39) I ∂R ∂R m n−e I m I I m

12For simplicity we have considered local ionic potentials but our results are valid for non-local pseudo-potentials as well. 2.3. Real-time formulation 41

This expression can be directly evaluated as the expectation value of the derivative of the ionic potential Z X ∂vn−e(r − RI ) F = − drφ∗ (r) φ (r) . (2.40) I m ∂R m m I

We can rewrite the forces such that the formula does not include the deriva- tive of the potential but the gradient of the orbitals as13:

X Z ∂φ∗ (r)  F = − dr m v (r − R )φ (r) + c.c. . (2.41) I ∂r n−e I m m

As we show in section 3.2.2, this last form has advantages for the numerical implementation and for the precision of the result.

2.3 Real-time formulation

Many excited states properties can be obtained by directly solving the TDDFT equation (2.5) given an initial condition and a time-dependent external po- tential. The initial condition is usually taken to be the ground-state density (and its associated KS orbitals) but other initial conditions could be used,14 including the density and orbitals associated to an excited state (the prob- lem is that we do not known how to build them for the general case). The perturbation can be any time-dependent electric field, magnetic field or any other time-dependent term in the Hamiltonian. We can also include ionic motion in the Ehrenfest scheme previously introduced. In this case the ionic motion can also be treated as a perturbation and can induce excitations in the electronic part. From the propagation, observables can be obtained as time-resolved quan- tities. Normally, we are interested in the dipole moment which gives informa-

13This formula can be obtained by changing the integration variable in Eq. (2.39) to 0 r = r − RI , taking the derivative with respect to RI , and then changing back to r as integration variable. Physically, this is equivalent to keeping the atom fixed while moving the rest of the system. 14If we do not start from the ground state, the exact time-dependent exchange and correlation potential depends on the initial conditions [79–82]. So we are making additional approximations if we do not consider this dependency. 42 Chapter 2. Theory tion on the induced electric field, but other observables can be calculated.15 When performing a combined TDDFT and Ehrenfest dynamics calculation, we can also obtain information from the ionic movements (for example, the vibrational modes of a molecule). Non-linear response is natural in the context of time-propagation, since the perturbative field is always finite and all response orders are automat- ically included. However, the extraction of non-linear response coefficients can be problematic.

2.4 Sternheimer perturbation theory

In textbooks, perturbation theory is formulated in terms of sum over states and response functions. These are useful theoretical constructions that per- mit a good description and understanding of the underlying physics. How- ever, this is not a good description for numerical applications, since it involves the calculation of a large number of eigenvectors, infinite sums and the rep- resentation of functions that depend on more than one spatial variable. A very interesting approach, that essentially solves the problems men- tioned above, is the reformulation of standard perturbation theory in terms of differential equations for the variation of the wave-functions (to a given order), this is what is named in the literature as Sternheimer equation [84]. Although a perturbative technique, it avoids the use of empty states, and has a quite good scaling with the number of atoms. This method has al- ready been used for the calculation of many response properties [85] like atomic vibrations (phonons), electron-phonon coupling, magnetic response, etc. In the domain of optical response, this method has been mainly used for static response, although a few first-principles calculations for low frequency (far from resonance) (hyper)polarisabilities have appeared [86–89]. Recently, an efficient reformulation of the Sternheimer equation in a super operator formalism was presented [90]. When combined with a Lanczos solver, it al- lows to calculate very efficiently the first order polarisability for the whole frequency spectrum. However, the generalization of this method to higher orders is not straightforward. Here, we present a modified version of the Sternheimer equation that

15The problem is that, while in TDDFT all observables are functionals of the time- dependent density, in many cases we do not know how to calculate them. This is the case, for example, for ionization [83] probabilities. 2.4. Sternheimer perturbation theory 43 is able to cope with both static and dynamic response in and out of reso- nance [91]. The method is suited for linear and non-linear response; higher order Sternheimer equations can be obtained for higher order variations. For second-order response, however, we can apply the 2n + 1 theorem to get the coefficients directly from first-order response variations. This theorem states that the nth-order variations of the wave functions (and the lower-order ones) are enough to obtain the 2n + 1 derivative of the energy [85,92].16 The the- orem also holds for the dynamic case [93]. To derive the Sternheimer formalism we start by considering a monochro- matic perturbative field λδv(r) cos (ωt). If we assume that the magnitude, λ, is small, we can use perturbation theory to expand the Kohn-Sham wave- functions in powers of λ. To first-order the KS orbitals read h λ λ i ϕ¯ (r, t) = e−ι˙(m+λδm)t ϕ (r) + eιωt˙ δϕ (r, ω) + e−ιωt˙ δϕ (r, −ω) , m m 2 m 2 m (2.42) ˆ where ϕm(r) are the wave-functions of the static Kohn-Sham Hamiltonian H obtained by taking λ = 0 ˆ Hϕm(r) = mϕm(r) , (2.43) and δϕm(r, ω) are the first order variations of the time-dependent Kohn- Sham wave-functions. From Eq. (2.42) and the definition of the time-dependent density, Eq. (2.6), we can obtain the time-dependent density λ λ n¯ (r, t) = n (r) + eιωt˙ δn(r, ω) + e−ιωt˙ δn(r, −ω) , (2.44) 2 2 with the definition of the first-order variation of the density

occ. X n ∗ ∗ o δn(r, ω) = [ϕm (r)] δϕm(r, ω) + [δϕm(r, −ω)] ϕm (r) . (2.45) m By replacing the expansion of the wave-functions (2.42) in the time- dependent Kohn-Sham equation (2.5), and picking up the first-order terms in λ, we arrive at a Sternheimer equation for the variations of the wave-functions

16We must keep in mind that the nth derivative of the energy accounts for (n − 1)th order response, as one order accounts for the outgoing field. For example, the static polarisability is proportional to the second-order derivative of the energy and corresponds to the linear (order 1) response term. 44 Chapter 2. Theory

nˆ o ˆ H − m ± ω +ιη ˙ δϕm(r, ±ω) = − Pc δH(±ω)ϕm(r) , (2.46) with the first order variation of the Kohn-Sham Hamiltonian Z δn(r0, ω) Z δH(ˆ ω) = δˆv(r) + dr0 + dr0 f (r, r0, ω) δn(r0, ω) . (2.47) |r − r0| xc

Pc is the projector onto the unoccupied subspace and η a positive infinitesi- mal, essential to obtain the correct position of the poles of the causal response function, and, consequently obtain the imaginary part of the polarizability.17 The projector Pc effectively removes the components of δϕm(r, ±ω) in the subspace of the occupied ground-state wave-functions. In linear response, these components do not contribute to the variation of the density18, and therefore we can safely ignore the projector for first-order response calcula- tion. This is important for large systems as the cost of the calculation of the projections scales quadratically with the number of orbitals. The first term of δH(ˆ ω) comes from the external perturbative field, while the next two represent the variation of the Hartree and exchange-correlation potentials. The exchange-correlation kernel is a functional of the ground- state density n, and is given, in time-domain, by the functional derivative

δv [n](r, t) f [n](r, r0, t − t0) = xc . (2.48) xc δn(r0, t) Equations (2.45) and (2.46) form a set of self-consistent equations for linear response that only depend on the occupied ground-state orbitals.

2.4.1 Sternheimer for non-linear response Here, we present the derivation of a second-order response scheme in the Sternheimer formalism for the many-body Schr¨odingerequation. As ex- plained later in this section, this derivation is not necessary in some cases, as

17Furthermore, using a small but finite η allows us to solve numerically the Sternheimer equation close to resonances, as it removes the divergences of this equation. 18This is straightforward to prove by expanding the variation of the wave-functions in terms of the ground-state wave-functions, using standard perturbation theory, and then replacing the resulting expression in the variation of the density, Eq. (2.45). 2.4. Sternheimer perturbation theory 45 the 2n+1 theorem can be used. But it is useful to illustrate how second-(and higher) order response appears as a mixing of the perturbative fields. We assume that the perturbation is a combination of two monochromatic potentials, ˆv1 and ˆv2, oscillating at frequencies ω1 and ω2, respectively (this is general for any type of perturbation, not only electric fields). The perturbed Hamiltonian is ¯ˆ ˆ H = H + ˆv1 cos(ω1t) + ˆv2 cos(ω2t) ˆv1 X ˆv2 X = Hˆ + eισω˙ 1t + eισω˙ 2t . (2.49) 2 2 σ=± σ=±

Neglecting higher order terms, the wave-function will have the form19

¯ −ιεt˙ X ι˙(−ε+σω1)t X ι˙(−ε+σω2)t |ψi = e |ψi + e |δψ(σω1)i + e |δψ(σω2)i σ=±1 σ=±1

X X ι˙(−ε+σ1ω1σ2ω2)t + e |δψ(σ1ω1 + σ2ω2)i . (2.50)

σ2=±1 σ1=±1

Now, we insert Eqs. (2.49) and (2.50) in the Schr¨odinger equation,

∂ ι˙ |ψ¯i = H¯ˆ |ψ¯i . (2.51) ∂t The resulting expression contains terms that oscillate with different frequen- cies. These can be separated, obtaining a different equation for each fre- quency. For ε we get the ground-state Schr¨odingerequation

ε|ψi = Hˆ|ψi . (2.52)

For the frequencies ε ± ω1 and ε ± ω2 we get the first order Sternheimer equations for each perturbation

  ˆ 0 H − ε ± ω1 |δψ(±ω1)i = −ˆv1|ψ i , (2.53)   ˆ 0 H − ε ± ω2 |δψ(±ω2)i = −ˆv2|ψ i . (2.54)

19We should also consider the terms that are quadratic in each perturbation, but we can ignore them without loss of generality, since this case is recovered by setting ω1 = ω2 and ˆv1 = ˆv2. 46 Chapter 2. Theory

Finally, for frequencies of the form ε+σ1ω1 +σ2ω2, with σ1 = ± and σ2 = ±, we get the second order Sternheimer equation20

ˆ  H − ε + σ1ω1 + σ2ω2 |δψ(σ1ω1 + σ2ω2)i ˆv ˆv = − 2 |δψ(σ ω )i − 1 |δψ(σ ω )i . (2.55) 2 1 1 2 2 2 Now, if we look at the evolution of an observable associated to an operator oˆ, that for example could be the dipole moment,

hψ¯|oˆ|ψ¯i = hψ|oˆ|ψi

X  ισω˙ 1t −ισω˙ 1t  + e hψ|oˆ|δψ(σω1)i + e hδψ(σω1)|oˆ|ψi σ=±1

X  ισω˙ 2t −ισω˙ 2t  + e hψ|oˆ|δψ(σω2)i + e hδψ(σω2)|oˆ|ψi σ=±1

X X ι˙(σ1ω1+σ2ω2)t + e (hψ|oˆ|δψ(σ2ω2 + σ1ω1)i+hδψ(−σ1ω1)|oˆ|δψ(σ2ω2)i)

σ1=±1 σ2=±1

X X −ι˙(σ1ω1+σ2ω2)t + e (hδψ(σ2ω2 + σ1ω1)|oˆ|ψi+hδψ(σ2ω2)|oˆ|δψ(−σ1ω1)i)

σ1=±1 σ2=±1 (2.56) we see that there is a static part, hψ|oˆ|ψi, and an induced time-dependent part. The first two time-dependent terms have the frequency of the external fields and correspond to linear response. The following one is the second order response term and oscillates with two frequencies: ω1 +ω2 and ω1 −ω2. As a particular case, we can recover the high-order response to a single monochromatic field by considering that both perturbative fields are equal. We have ω1 = ω2 = ω, so there is a part of the non-linear response that is static (zero frequency) and a part that oscillates with twice the applied frequency, 2ω (in the optical case they correspond to optical rectification and second harmonic generation effects, respectively). In general from the order N response we get multiples of the base frequency, with a maximum of Nω.21

20In this equation and the first order ones we can also add a small imaginary part to the frequency as we did for Eq. (2.46). 21 PN Since the frequency has the form ωind = i σiω, with σi = ±1, the parity of the multiples is the same of the order of the response. An even order will produce harmonics of frequencies 0, 2ω, . . . , (N − 2)ω, Nω while an odd order produces ω, 3ω, . . . , (N − 2)ω, Nω. 2.5. Electric response 47 2.5 Electric response

When an electric field is applied to a system the result is a different electric field, the total one, that is the sum of the applied field and the induced field produced by the system. The induced field is due to the rearrangement of charges inside the sys- tem which can result in a macroscopic electric field. To first order, this macroscopic induced field is generated by the electric dipole moment of the system.22 If the external field is small, the induced dipole of the system can be expanded in powers of the Fourier components of the applied field23

Z X pi(t) = pi(0) + dω αij(ω)Ej(ω) cos(ω) j 1 Z X + dωdω0 β (−ω − ω0; ω, ω0)E (ω)E (ω0) cos(ωt) cos(ω0t) 2! ijk j k j,k 1 Z X + dωdω0dω00 γ (−ω − ω0 − ω00; ω, ω0, ω00) 3! ijkl j,k,l 0 00 0 00 × Ej(ω)Ek(ω )El(ω ) cos(ωt) cos(ω t) cos(ω t) + .... (2.57)

2.5.1 Optical response In principle, to study the interaction of light with an electronic system the effects of both the electric and magnetic fields must be considered. However, as the magnetic field is much weaker we can usually neglect it,24 and the optical properties of a material are essentially determined by the response of the electrons to an external electric field. This makes the electric response one of the most important and interesting properties to predict. In the linear regime the electric response is determined by the polar- isability, α(ω). The quantity most easily accessible experimentally is the

22Higher order multi-polar terms could be considered as well. 23There are several conventions for the definition of the (hyper)polarisabilities, which are conveniently detailed in Ref. [94]. In this work we follow convention AB (where the prefactors 1/n! are explicitly included in Eq. (2.57)), that appears to be the most used by the theoretical community. All referenced values have been converted to this convention. 24When the polarisation of light is involved, as in the case of optical activity, treated in section 2.7, the magnetic field must be considered as well. 48 Chapter 2. Theory photo-absorption cross section, σ(ω), (the optical absorption spectrum) that can be evaluated directly from the polarisability 4πω σ¯(ω) = Im α¯(ω) , (2.58) c whereα ¯ is one third the trace of the tensor 1 X α¯(ω) = α (ω) . (2.59) 3 ii i Non-linear optics [95,96] is probably one of the most relevant applications of non-linear response. It involves effects as harmonic generation [97], Kerr effect [98], optical rectification [99], etc. In general, non-linear Nth order optical response will correspond to an N-wave mixing, where several beams of light interact through the medium to generate a light of a different fre- quency (where the frequency can be the sum or difference of the frequencies of incoming light beams).

2.5.2 Second-order optical response

The first hyperpolarisability tensor, β(ω3; ω1, ω2), corresponds to the mixing of two incoming fields (of frequency ω1 and ω2) to generate a third one (of frequency ω3 = ω1 + ω2 or ω3 = ω1 − ω2). It represents effects such as second harmonic generation (SHG), β(2ω; ω, ω), Pockels effect, β(ω; ω, 0), optical rectification β(0; ω, −ω) and sum-frequency generation, β(ω1 + ω2; ω1, ω2). The tensor has 27 components and is in general non-symmetric.25 Sec- ond harmonic generation in liquid or gas phase is usually measured using electric-field-induced second-harmonic generation (EFISH) [101, 102], where the quantity 1 X β = (β + β + β ) , (2.60) k i 5 ijj jij jji j is measured in the direction of the dipole moment.26 Different reduced quan- tities can be obtained from other experimental techniques as hyper-Rayleigh scattering (HRS) [101,102].

25However, the tensor will have some symmetries due to symmetries of the physical system [100]. In particular, for systems with inversion symmetry the tensor is zero. 26In an EFISH experiment both a static electric field, that partially aligns the molecules, and a laser field are applied to the system. The measured quantity is an effective second order hyperpolarisability (a third order response coefficient), γeff = γ + p · βk/3kT , from which βk is extracted. 2.5. Electric response 49

2.5.3 Optical response and real-time TDDFT In real-time TDDFT the key quantity for electric response is the time- dependent dipole that can be calculated directly from the electronic density and the atomic charges and positions

Z X p(t) = dr rn (r, t) − ZARA . (2.61) A

In this approach, to obtain the absorption spectrum one first excites the sys- tem from its ground state by applying a uniform electric field of the form Eext(r, t) = δ(t)E. The constant coefficient E should be small enough for the system to remain in the linear regime. In practice, it is more precise to apply the kick as a phase in the initial conditions ϕ(t = 0+) = e−ι˙E·rϕ(t = 0−). The Kohn-Sham equations are then propagated forward in real time, and the time-dependent density n(r, t) is readily computed. The polarisability is obtained by doing the propagation for three perturbations, one along each axis27, and then obtaining the time-dependent dipole moment for each one of them, hence building the whole pij(t) (the first index indicates the com- ponents of the dipole and the second the direction of the perturbation). The polarisability tensor is then calculated as a Fourier transform

1 Z α (ω) = dt [p (t) − δ p (0)] e−ιωt˙ . (2.62) ij E ij ij i

This approach has been used for a large variety of systems: metal and semi- conducting clusters [41, 104–106], aromatic hydrocarbons [107–109], or pro- tein chromophores [49,110]. Even though the time-propagation approach includes all orders of re- sponse,28 the extraction of the information is not direct, especially if the non-linear response coefficients are wanted.29

27Other directions could be chosen as well, in particular to exploit symmetries of the system, to reduce the number of propagations [103]. 28Actually, non-linear response might induce an error in the calculation of linear re- sponse from time propagation. This error can be removed by selecting a perturbation that is weak enough. 29An approach to extract the hyperpolarisability was recently proposed [111]. In con- trast to linear response where a single propagation yields the response for all frequencies, for the hyperpolarisabilites several propagations must be done, one for each frequency. 50 Chapter 2. Theory

2.5.4 Electric response in the Sternheimer formalism In the Sternheimer formalism, the perturbation is a monochromatic electric field δv(r, t) = E · r cos (ωt) . (2.63) To study the polarisability we apply three different perturbations, one along each direction i, and calculate the variation of the density δni(r, t). By inserting Eq. (2.45) in Eq. (2.61) and comparing with Eq. (2.57), obtaining the formula for the polarisability in terms of the variation of the density Z αij(ω) = dr riδnj(r, ω) . (2.64)

The first hyperpolarisability, β (see Eq. (2.57)), the leading non-linear order in the response is given in terms of the first order variations of the wave functions as [93]

( Z X X X ∗ βijk(−ω1; ω2, ω3) = −4 dr δψm, i(r, −ζω1)δHj(ζω2)δψm, k(r, ζω3) P ζ=±1 m occ. Z Z X ∗ ∗ − dr ψm(r)δHj(ζω2)ψn(r) dr δψn, i(r, −ζω1)δϕm, k(r, ζω3) m,n ) 2 Z Z Z − dr dr0 dr00 K (r, r0, r00)δn (r, ω )δn (r0, ω )δn (r00, ω ) , (2.65) 3 xc i 1 j 2 k 3 where the first sum is over the permutations P of the pairs (i, −ω1), (j, ω2), and (k, ω3). The second order exchange-correlation kernel, Kxc, written in the adiabatic approximation, reads δ2v [n](r) K (r, r0, r00) = xc . (2.66) xc δn(r0)δn(r00)

2.6 Magnetic fields

In the presence of a magnetic field B(r, t), generated by a vector potential A(r, t), some additional terms must be included in the Hamiltonian

1  1 2 Hˆ = pˆ − Aˆ + B · Sˆ . (2.67) 2 c 2.6. Magnetic fields 51

The first part is the orbital interaction with the field, and the second one is the Zeeman term that represents the coupling of the electronic spin with the magnetic field. In the following we consider a perturbative uniform static magnetic field B and zero total spin. In the Coulomb gauge the corresponding vector potential, A, is given as 1 A(r) = B × rˆ . (2.68) 2 In orders of B the perturbative potentials are 1 1 δˆvmag = (rˆ × pˆ) · B = L · B (2.69) 2c 2c and 1 δ2ˆvmag = (B × rˆ)2 . (2.70) 8c2 2.6.1 Magnetic response terms As in the electric case with the dipole, the induced magnetic moment can be expanded in terms of the external magnetic field which, to first order, reads

0 X ext mi = mi + χijBj , (2.71) j where χ is the magnetic susceptibility tensor. The permanent magnetic moment can be calculated directly from the ground-state wave-functions as

0 X mag m = hϕm|δvˆ |ϕmi . (2.72) m For the susceptibility, we need to calculate the first order response functions in presence of a magnetic field. This can be done in practice by using the magnetic perturbation, Eq. (2.69), in the Sternheimer equation, Eqs. (2.46) and (2.47). Since in this case the perturbation is purely imaginary30, it does not induce a change in the density and the Sternheimer equation is not self- consistent.31 We label the variation of the orbital m in the direction i as 30Since in real space pˆ = −ι˙∇. 31This is only valid for a static magnetic field. If we consider a time-dependent mag- netic field a variation in the density can appear. This is expected, as the variation of the density and the self-consistency process is necessary to shift from the Kohn-Sham excitation energies to the real ones. 52 Chapter 2. Theory

|δϕm , ii. From there, the magnetic susceptibility tensor χ is

X n mag mag 2 mag o χij = hϕm|δˆvj |δϕm , ii+hδϕm , i|δˆvj |ϕmi+hϕm|δ ˆvij |ϕmi . (2.73) m

2.6.2 Gauge invariance and non-local potentials In practical implementations, the gauge freedom in choosing the vector po- tential might lead to a poor converge with the quality of the discretization and to a dependence of the magnetic response on the origin of the simulation cell. In other words, an arbitrary translation of the molecule could intro- duce an unphysical change in the calculated observables. This broken gauge- invariance is well known in molecular calculations with all-electron methods that make use of localized basis sets, such as Gaussian type orbitals. In this case, the error can be traced to the finite-basis set representation of the wave- functions32 [115]. A simple measure of the error is to check for the fulfillment of the hyper-virial relation [116]

ι˙hϕm|pˆ|ϕni = (n − m)hϕm|rˆ|ϕni , (2.74) where m is the eigenvalue of the state ϕm. When working with a real-space mesh, this problem also appears, though milder, because the standard operator representation in the grid is not gauge- invariant. However, the error can be easily controlled by reducing the spacing of the mesh. On the other hand, our methods typically require the use of the pseudo- potential approximation (discussed in detail in section 3.2), where the electron- 0 ion interaction is described by a non-local potential vnl(r, r ). This, or any other non-local potential, introduces a fundamental problem when describ- ing the interaction with magnetic fields or vector potentials in general. To preserve gauge invariance, this term must be adequately coupled to the ex- ternal electromagnetic field, otherwise the results will (strongly) depend on the origin of the gauge. For example an extra term has to be included in the hyper-virial expression resulting in

ι˙hϕm|pˆ|ϕni = (n − m)hϕm|rˆ|ϕni + hϕm|[rˆ, ˆvnl]|ϕni . (2.75)

32Several techniques have been proposed over the past decades to solve the issue of the gauge dependence, such as the gauge including atomic orbital [112] (GIAO) or the individual gauge for localized orbitals [113, 114] (IGLO) methods. 2.7. Optical activity 53

In general, the gauge-invariant non-local potential is given by

R r0 A 0 0 ι/c˙ r A(x,t)·dx hr|ˆvnl|r i = vnl(r, r )e , (2.76)

There are two approaches to include this term that differ in the integration path taken. The first one was proposed by Ismail-Beigi, Chang, and Louie (ICL) in 2001 [117] and gives the following perturbation terms " !# 1 X δˆvmag = rˆ × pˆ + vˆnl · B (2.77) 2c I I and " # 1 X δ2ˆvmag = (B × rˆ)2 + R × rˆ · Dˆ nl · B × rˆ , (2.78) 8c2 I I I

nl  nl ˆ nl   nl nl with vˆI = −i rˆ, ˆvI and DIij = − rˆi, rˆj, ˆvI , where ˆvI is the non-local potential associated to atom I. In 2003, Pickard and Mauri [118] proposed the GIPAW method, where ! 1 X δˆvmag = Lˆ + R × vˆnl · B (2.79) 2c I I I and " # 1 X δ2ˆvmag = (B × rˆ)2 + R × R · Dˆ nl · B × R . (2.80) 8c2 I I I I I With the inclusion of either one of these methods, we recover gauge invariance in our formalism when pseudo-potentials are considered.

2.7 Optical activity

Chiroptical effects are based on the fact that some molecules interact dif- ferently with right- (R) and left- (L) circularly polarised light, so that the medium effectively has two refraction indices, nR and nL. Dichroism can be quantified by the difference between the two refraction indices, ∆n = nL−nR. 54 Chapter 2. Theory

Physically the real part of ∆n measures the rotation of the polarisation vec- tor of an incident linearly polarised field (ORD), whereas the imaginary part accounts for the difference in the absorption (ECD). For calculating changes of the polarisation, the magnetic field of the light cannot be neglected as we did for optical absorption. As we will see, optical activity can actually be considered a mixed electric-magnetic response. The starting point to study the interaction of an individual molecule with a monochromatic electric and magnetic field are the linear equations for the induced electric and magnetic moments in terms of the external field

X 1 X ∂Bk(t) p (t) = α E (t) − ξ , (2.81a) j jk k c jk ∂t k k X 1 X ∂Ek(t) m (t) = χ B (t) + ξ , (2.81b) j jk k c jk ∂t k k where α is the electric polarisability tensor, χ the magnetic susceptibility and ξ the crossed response tensor in the time derivative of the fields.33 By applying Maxwell equations in a medium that satisfies Eqs. (2.81) one can prove that the isotropic average of ξ,

1 X ξ¯ = ξ , (2.82) 3 jj j is proportional to the difference between the refractive indices for left and right polarised light34 8πNω ∆n = ξ¯ , (2.83) c where N is the molecular density of the medium. The tensor, ξ, is therefore the key quantity that must be calculated in order to predict the ORD and the ECD spectra. In the case of response to a polychromatic electric field we have to define a frequency dependent tensor ξ(ω), so that Eq. (2.81b), in the absence of an applied magnetic field,

33An additional term couples the induced electric dipole with the magnetic field and vice versa. This term is of higher order and we can safely neglect it in our formulation (see Eq. (55) in Ref. [119]). 34This expression is obtained while neglecting the electric field due to the neighbor- ing molecules: for a medium with randomly distributed molecules we obtain ∆n = 8πNω ¯n2+2 c ξ 3 , where n is the mean index of refraction. 2.7. Optical activity 55 becomes ι˙ X Z ∞ m (t) = − ξ (ω) ωE (ω)e−ιωt˙ dω . (2.84) j c jk k k −∞ As a particular case, we consider an electric field with equal intensity for all frequencies: E(r, ω) = κ/2π (in the time domain this corresponds to E(r, t) = κδ(t) ). By introducing this expression in Eq. (2.84) and per- forming an inverse half-Fourier transform (with an infinitesimal imaginary component δ in the frequency) we obtain Z ∞ ιc˙ ι˙(ω+iδ)t ξjk(ω) = mk(t)e dt . (2.85) ωκj 0 From Eq. (2.85) we see that ξ can be calculated from the time resolved electrically induced magnetic moment. From this general derivation we can now determine the rotational strength function 3ω R(ω) = Im ξ¯(ω) , (2.86) πc which physically characterizes the magnitude of the ECD.

2.7.1 Circular dichroism in TDDFT The scheme described above can be easily implemented in real-time TDDFT, as shown by Yabana and Bertsch [120]. We follow the same procedure as for optical response, but for each time we compute the magnetic moment using Eq. (2.72), including the proper gauge corrections discussed in section 2.6.2. The values for the three directions are inserted in Eq. (2.85) from which ξ(ω) is obtained in the energy range of interest. The circular dichroic response can also be computed in the Sternheimer linear response formalism. From the response functions to an electric per- turbation, ξ can be calculated as35 ι˙ X ξ (ω) = [hδϕ (−ω)|δˆvmag|ϕ i + hϕ |δˆvmag|δϕ (ω)i] . (2.87) jk 2ω m,j k m m k m,j m In contrast to some (TD)DFT implementations that directly use KS or- bitals, neglecting all self-consistency effects in the response, both real-time and Sternheimer formulations include these effects and are exact, provided that we know the exact exchange and correlation potential. 35This expression can be obtained by replacing the expansion of the time-dependent wave-function, Eq. (2.42), in Eq. (2.85). 56 Chapter 2. Theory 2.8 Vibrational modes

At low temperatures, the ions of a molecular system oscillate around their equilibrium positions.36 Under the harmonic approximation, this movement can be described as a superposition of collective oscillations, known as vi- brational or normal modes (or phonon modes in solid state physics). Each mode oscillates with a particular frequency. Formally, this implies that the ionic trajectories are written in the following form

X I RI (t) = cαQα cos(ναt + dα) , (2.88) α

I where α is an index that runs from 1 to 3Na, Qα are the vectors that represent each mode and να are the normal frequencies. The values cα and dα are the integration constants given by the initial conditions. The higher order terms that are neglected in Eq. (2.88) are responsible for anharmonic effects37. For most molecular systems, the frequencies of the vibrations are at least one order of magnitude smaller than the electronic excitations. This implies that the vibrations can be properly described by an adiabatic approxima- tion like Born-Oppenheimer, Car-Parrinello molecular dynamics, or by our modified Ehrenfest dynamics scheme described in section 2.2.3. However, if a certain molecule has a band gap that is small enough to be close to the frequency of the vibrational modes, the ionic motion is better described by Ehrenfest dynamics or more sophisticated semi-classical ions approaches. As with other properties, the vibrational properties, including an-harmonic effects, can be obtained from real-time methods, in this case molecular dy- namics, or linear response. The most widely used spectroscopies used to assess vibrational modes are infrared and Raman, that are described in more detail in the remainder of this section.

2.8.1 Infrared spectroscopy Infrared spectroscopy [121] is intimately related to vibrational modes. It is the direct emission of light by the ionic vibrations (or the equivalent and

36This includes the quantum effect of zero point motion, that cannot be described in the classical approximation for the ion dynamics. 37These effects become important at high temperatures or when the systems approaches conical intersections or electronic level crossing. Under those conditions the an-harmonic terms couple the equations of motion for different vibrational modes. 2.8. Vibrational modes 57 inverse process of absorption of light and excitation of a normal mode). This can be seen directly in the dipolar approximation by expanding the molec- ular dipole, p(t), around the equilibrium position to first order in the ionic displacement. Using Eq. (2.88) we obtain

o X X ∂pi I j pi(t) = pi + j Qα cα cos(ναt + dα) . (2.89) α I,j ∂RI

By defining X ∂pi I j Υα = j Qα (2.90) I,j ∂RI we rewrite the equation as

o X pi(t) = pi + cαΥα cos(ναt + dα) , (2.91) α from where it is clear that Υα represents the intrinsic infrared intensity of the normal mode α. If a component of Υα is zero, it means that for that particular mode the vibration leaves the dipole invariant and that it cannot interact with light. For example homo-nuclear diatomic molecules are not infrared active since the dipole, independently of the inter-atomic distance, is always zero.

2.8.2 Vibrational and infrared spectroscopy from real- time propagation In a time-resolved simulation, if the ions are allowed to move under a certain molecular dynamics formalism, it is possible to obtain the vibrational spectra by monitoring the velocities as a function of time. The spectrum is given by the Fourier transform of the velocity autocorrelation function [122, 123], defined as  P v (t) · v (t )  v¯(t) = I I I 0 , (2.92) P v (t ) · v (t ) I I 0 I 0 t0 where the h i denotes the average over all possible values of t < t. To t0 0 correctly obtain the relative intensities of the vibrational modes, the initial conditions must be given by a correct thermo-dynamical distribution of ve- locities. Similarly, it is possible to extract the infrared spectrum by following 58 Chapter 2. Theory the evolution of the time-dependent dipole, Eq. (2.61), and Fourier trans- forming Eq. (2.91). In this way, we mimic closely what happens in a real infrared experiment.

2.8.3 Linear response for vibrational spectroscopy Linear response, in the form of density functional perturbation theory (DFPT) [85, 124], is probably the most popular ab-initio method for the calculation of vi- brational modes. Here, the vibrational modes are given by the eigenvectors of the matrix of force constants, known as the Hessian. It is given by the second derivatives of the total energy with respect to the ion positions

1 ∂2E h = √ , (2.93) I i J j i j MI MJ ∂RI RJ where MI and MJ are the masses of ions positioned at RI and RJ . For Na ions the Hessian is a 3Na × 3Na matrix. The Hessian can be obtained directly from total energy calculations by finite difference approximation of the derivatives. Alternatively, more accu- rate results can be obtained by calculating analytically the derivatives of the energy as

2 2 " # 2 ∂ E ∂ Eion−ion X X ∂ vext = + hϕ |δˆv |δϕ i + c.c. + hϕ | |ϕ i , i j i j m I i m J j m i j m ∂RI RJ ∂RI RJ m m ∂RI RJ (2.94) the δˆvI i are the external perturbations that correspond to the derivatives of the ionic potentials with respect to the ionic positions38

∂ δˆvI i(r) = i vion(r − RI ) , (2.95) ∂RI and |δϕm J ji are the variations of the orbitals. They are obtained by solving a set of zero-frequency Sternheimer equations of the form

ˆ  ˆ H − m δϕm I i(r) = − Pc δHI iϕm(r) . (2.96)

38Additional terms might appear from non-linear core corrections in the pseudo- potential. 2.9. Vibrational Raman spectroscopy 59

The infrared intensity of each mode can be directly calculated from |δϕm J ji and Eq. (2.90) by using that

∂pi X j = [hϕm|ri|δϕm I ji + c.c.] . (2.97) ∂RI m To avoid the calculation of the derivative of the ionic potential in Eq. (2.95), we can use the same transformation as in the derivation of the forces, Eq. (2.41). With the transformation the perturbation becomes the following operator ∂ ∂ δˆvI i(r) = vion(r − RI ) − vion(r − RI ) , (2.98) ∂ri ∂ri where we have used the fact that the derivative operator is anti-Hermitian. Analogously, the transformation can also be applied to the last term of Eq. (2.94) to obtain that

∂2v hϕ | ext |ϕ i = δ [hϕ |v |∂ ∂ ϕ i + h∂ ϕ |v |∂ ϕ i] + c.c. . (2.99) m i j m IJ m I i j m i m I j m ∂RI RJ By this reformulation we completely eliminate the need to obtain the deriva- tives of the ionic potential with respect to the atomic positions, which makes implementation considerably simpler. Also, since the wave-functions are smoother than the external potential, calculations converge better with re- spect to the quality of the discretization. Note that the DFPT formulation we have presented here is an adiabatic approximation, as it does not include contributions from electronic exited states. The Sternheimer formalism provides a natural way to add non- adiabatic effects to the calculation of ionic vibrations by introducing a finite frequency in Eq. (2.96). However, since we do not know the vibrational fre- quencies a priori, the calculation would have to be done in a self-consistent iterative fashion.

2.9 Vibrational Raman spectroscopy

The vibrational Raman scattering process [121, 125, 126] occurs when light interacts with a molecular systems by exciting or de-exciting a vibrational mode and generating light with a shifted frequency, see Fig. 2.1. Within a classical description of the electric field we can understand this process by 60 Chapter 2. Theory looking at the dipole. Under the action of an external electric E cos(ωt) the induced field (the emitted light) is given by

o X pi(t) = pi + αik(ω)Ek cos(ωt) . (2.100) k If we consider the change in the polarisability due to molecular vibrations, by using Eq. (2.88) we obtain

o X pi(t) = pi + αik(ω)Ej cos(ωt)+ k

X X ∂αik(ω) I j j Qβ cβ cos(νβt + dβ)Ek cos(ωt) . (2.101) k,β I,j ∂RI By defining the Raman tensor, P , as

X ∂αik(ω) I j Pik β(ω) = j Qβ (2.102) I,j ∂RI and using the rule for the product of cosines yields

o X pi(t) = pi + αik(ω)Ek cos(ωt) + k 1 X + E c P (ω) [cos ((ω + ν )t + d ) + cos ((ω − ν )t + d )] . (2.103) 2 k β ik β β β β β k,β From this last equation, it is clear that the induced electric field has com- ponents with frequencies ω ± νβ, that correspond to Stokes and anti-Stokes peaks in experiments. In the non-linear response formalism developed in section 2.4.1 can also describe vibrational Raman scattering. We assume one perturbation is an electric field with frequency ω and the other is an ionic vibration with fre- quency ν. The observable to consider is the induced electric field given by the dipole. From Eq. (2.56) we see that the induced field oscillates with several frequencies that correspond to the different physical phenomena:

• ω: Rayleigh scattering, the emission of light of the same frequency of the external electric field. This corresponds to the electric response (section 2.5). 2.9. Vibrational Raman spectroscopy 61

virtual level

hω h(ω − ν) hω h(ω + ν)

vibrational level hν

ground state a b

Figure 2.1: Quantum mechanical picture of: a) Stokes Raman scattering, a system in its ground state absorbs a photon of frequency hω and emits a photon of frequency h(ω − ν) and stays in a vibrational level of energy hν. b) Anti-stokes Raman scattering, the system is initially in a vibrational level of energy hν, it absorbs a photon of frequency hω and emits a photon of frequency h(ω + ν) and stays in the ground state level.

• ν: Infrared spectroscopy as discussed in section 2.8.1.

• ω−ν: Stokes Raman scattering, where the incoming photon is absorbed and one of lower energy is emitted. The difference of energy is used to create a phonon (see Fig. 2.1a).

• ω+ν: Anti-Stokes Raman scattering, in this case a phonon is destroyed, so the emitted photon has a higher energy than the incoming one (see Fig. 2.1b).

In general, several approximations are performed when doing practical calculations of the Raman tensor in molecular and extended systems, in 62 Chapter 2. Theory order to simplify the formalism and the calculations. Besides the usual adi- abatic approximation for the vibrational modes (harmonic approximation), discussed in the previous section, the frequency of the external photon field is also considered to be zero (which is a good approximation as long as ω is well below any electronic excitation frequency of the system). Therefore, the formalism is not applicable for the resonant Raman case that is the most widely used tool for characterization of nano-structures. Still, even in the few cases that the finite optical frequency of the photon field is considered, the change of the response function at ω ± ν is not evaluated, i.e. these con- tributions to the intensity of the Stokes and anti-Stokes peaks in the Raman spectra are missing. This might give rise to important errors in near-resonant cases, where the shift due to the phonon frequency can change the dynamical electronic response of the system considerably. The formalism described in this section allows to cope, from first principles with the full-Raman response of the system both in resonance and out-of-resonance. The only remaining limitation is the assumption of the Born-Oppenheimer approximation for the decoupling of the electronic and ionic degrees of freedom. If this is not satis- fied non-adiabatic coupling beyond the ones described have to be included. Chapter 3

Numerical methods

Over the last years the numerical implementation phase of scientific codes has become increasingly relevant and cannot be considered a minor issue. This has been caused by several factors, among them:

• The drive towards realistic first principles modelling of complex and large systems requires efficient codes that combine, in different aspects of the simulation, the state of the art in numerical algorithms and techniques.

• The increasing complexity of hardware platforms which require sophis- ticated codes to run efficiently: while old supercomputers were single processor vector machines with fast memory access, current ones are massively parallel machines with distributed memory, complex inter- connection topologies, relatively slow memory access and several levels of cache. As a result, it has become more difficult to write efficient computer codes.

• Complexity of the code: due to the previous issues, scientific software packages become large and complex pieces of code that require devel- opers to be skilled not only in science, but also in the computer science techniques and tools suited to work with large software projects.

The selection of adequate algorithms and numerical techniques can make a difference of several orders of magnitude in the computational time re- quired for a simulation and can even determine the feasibility of a certain theoretical approach. In this chapter, we present the details of the numerical

63 64 Chapter 3. Numerical methods implementations that were considered during the development of this work and that are important for applying the theory developed in the previous chapter to realistic systems. The basis for the numerical implementation in this work is the Octopus code [13, 14], a software package for the simulation of electron dynamics of finite and extended systems. It is based on a real-space discretization of the wave-functions and the norm-conserving pseudopotential approximation for the electron-ion interaction. Octopus has been released under the GPL free software license, which means that the source code is available for anyone to use, study, modify and re-distribute (while retaining the same original conditions). Currently it consists of more than 140 thousand lines of Fortran and C code, and it is the fruit of the effort of more than 15 developers from several research groups.

3.1 Discretization: Real-space grids

In order to use our equations to predict properties of real systems we must perform an additional approximation: we have to discretize the equation to restrict the infinite degrees of freedom to a finite number that we can then treat numerically. The discretization determines the number of values that represent a function and the numerical cost required to perform the different operations. There are several strategies to discretize a problem, one possibil- ity is to select a discrete basis set and represent functions as the coefficients of a linear combination of these basis sets functions. The action of differen- tial operators is given by their action on the basis set functions. Of course, an ideal basis set would consist of the functions that are solutions of the problem we want to solve: in this representation the coefficients are very simple and there are very few of them. However, this is clearly impractical since the solutions are what we are looking for and we would still need an auxiliary representation for the basis functions, as we do not have a math- ematical expression for them. In many cases, basis sets that are simple but close to the expected solutions are used. For example, in quantum chemistry the calculations are done using a basis set composed of atomic orbitals cen- tered around the nuclei. Two different approaches are considered: one is to use Slater orbitals [127] in terms of a linear combination of Gaussian func- 3.1. Discretization: Real-space grids 65 tions [128,129]1 and the other to use numerical atomic orbitals [7,130]. Since typically only a few atomic orbitals are required for each atom, this method leads to a discretization with a small number of coefficients, but the price to pay is that basis functions are not orthogonal, the discretized operators are represented by dense matrices and that the discretization error is difficult to control. In condensed matter physics, plane-wave basis sets (that form the Fourier or reciprocal space) is the most common method, as they are the natural basis for the description of orbitals in the nearly free electron gas. In Fourier space the application of the kinetic term of the Kohn-Sham Hamiltonian is direct,2 but for other operations, like the application of the potential, it is necessary to go to a real space through the use of Fast Fourier transforms. Plane-wave basis sets automatically impose periodic boundary conditions, so to model finite systems a super-cell approach is required. The discretization method we use in this work is a real-space grid ap- proach. In this scheme functions are represented by their values on a series of points in real space. We only consider points uniformly distributed in a mesh (but more arbitrary distributions, including adaptive grids and lo- cal refinements, are also possible). The uniform distance between points is called the spacing of the grid and determines the quality of the discretiza- tion.3 Even though this approach might be seen as a basis sets consisting of Dirac delta functions centered at the grid points, this is not the case, as dif- ferentiation cannot be carried out by differentiating these “basis functions”. Differential operators must be approximated by a finite difference expression which calculates the derivatives of the function in one point using the val- ues of neighbouring points. In fact, the key to the success of the real-space method for electronic structure calculations was the introduction of high or- der finite difference expansions by Chelikowsky, Troullier and Saad [131] in 1994. These expansions yield a good level of numerical accuracy for relatively

1The principal reason for the use of Gaussian basis functions in molecular quantum chemical calculations is the Gaussian Product Theorem, which guarantees that the product of two Gaussian orbitals centered on two different atoms is a finite sum of Gaussians centered on a point along the axis connecting them. In this manner, four-center integrals can be reduced to finite sums of two-center integrals, and in a next step, to finite sums of one-center integrals. 2To calculate the Laplacian of a function at a certain reciprocal space point G, the function only has to be multiplied by G2. 3 2 A spacing, h, can be converted to an equivalent plane-wave cutoff via Ec = (π/2h) . 66 Chapter 3. Numerical methods large spacings. The main characteristics of the real-space discretization are:

• Simplicity: the concept of a real-space grid is simple to understand and the equations are simple to discretize.

• Boundary conditions: different types of boundary conditions can be used together with real-space grids. The most common ones are that functions are periodic or that they are zero at the boundaries of the domain.

• Uniform resolution: with uniform grids the quality of the discretization is the same over the whole space.

• Larger number of coefficients: due to the previous point, when com- pared to atomic orbitals, a real-space discretization requires a larger number of coefficients. Therefore, it is difficult to represent functions of two spacial variables, like the density matrix or the response func- tion.

• Systematic convergence: the effect of the discretization can be con- trolled by reducing the spacing of the grid and (in the case of finite systems) increasing the size of the region. In cases where the conver- gence is slow it is possible to extrapolate the result to zero spacing and/or infinite size.

• Sparse and simple operators: Linear operators, like the Hamiltonian, can be represented very efficiently. They are very sparse, and the few non-diagonal non-zero elements only take a few different values (the constant coefficients of the finite-differences expansion).

• Performance: Most operations on functions represented on the grid are local or semi-local, so, in general, it is possible to obtain good computational performance.

• Parallelizability: The locality can also be exploited for the paralleliza- tion of the operations by dividing the space in domains that are assigned to each processor. 3.2. Pseudopotentials 67 3.2 Pseudopotentials

Around the nuclei, the electronic problem presents serious challenges for uniform discretization approaches such as real-space grids or plane waves, as not only does the bare ionic potential −Z/|r − R| diverge4, but also the wave-functions oscillate strongly due to the orthogonality with core electrons.

3.2.1 The pseudopotential approximation

One way to solve the problem of the representation around the ions is to use pseudo-potentials, where both the core electrons and the hard Coulombian potential are replaced by a softer effective potential. This approach not only makes the potential smoother, but also saves the computational effort of representing the core electrons that remain inert in most chemical and optical processes. Even when there are no core electrons, or when core electrons must be included in the calculation, it is possible to devise pseudo-potentials that are smoother than the original ionic potential (see for example Fig. 3.1, where the original ionic potential for hydrogen is compared with a pseudo-potential for the same atom). There are different approaches for pseudo-potentials. The pseudo-potentials we use in this work are known as norm-conserving pseudo-potentials, and were first proposed by Hamman, Bachelet and collaborators [132, 133] and later improved by Troullier and Martins [134]. In general, norm-conserving pseudo-potentials are non-local operators: each angular momentum compo- nent of the wave-function sees a different potential. Mathematically, the operator can be written as a sum of projectors for each angular momentum component up to a certain maximum lmax. For numerical purposes it is bet- ter to write the pseudo-potential in a separable form, proposed by Kleynman and Bylander [135], where one of the components is chosen as local and con- tains the long-range part of the potential, while the projectors for the rest of the components are localized to a region of space around each atom

l l Xmax X vKB = vlocal + |lmihlm| . (3.1)

l6=lloc m=−l

4At r = R we can take an average of the potential to repair the divergence, but it still changes very rapidly 68 Chapter 3. Numerical methods

0

Ionic potential -1 Pseudopotential

-2 0

-3 -10 Potential [Ha] -20 -4

-30 -5

-40 0 0.25 0.5 0.75 1 -6 0 0.25 0.5 0.75 1 1.25 1.5 1.75 2 Radius [b] Figure 3.1: Comparison of the true ionic potential (black solid line) and a norm-conserving pseudopotential (blue segmented line) for hydrogen (inset at a different scale). The pseudo-potential is much softer and can be represented on a grid with much larger spacing.

3.2.2 Forces

In section 2.2.4 we introduced a formulation for the calculation of forces that does not involve the calculation of the derivatives of the potential, Eq. (2.40). This transformation has two advantages for numerical imple- mentations: First, it is not necessary to implement the derivative of the ionic potential, that can be quite complex and difficult to code, especially when relativistic corrections are included. The second advantage is that the representation of the derivative of the ionic potential requires a better dis- cretization than the potential itself, so the alternative expression of the force is more precise when discretized. We illustrate this second point in Fig. 3.2 where the forces obtained with the two methods are compared. While taking 3.2. Pseudopotentials 69 the derivative of the atomic potential gives forces with a considerable oscilla- tion due to the discretization (this point is discussed in detail in the following section), using the derivative of the orbitals gives a force that is smooth and equivalent to the one obtained by finite-differences with half the spacing.

2

Derivative of the potential (h=0.43) Derivative of the orbitals (h=0.43) Numerical derivative of the energy (h=0.43) Numerical derivative of the energy (h=0.215)

1 Interatomic force [a.u]

0

2 2.5 3 3.5 Interatomic distance [a.u.] Figure 3.2: Comparison of the force between two nitrogen atoms calculated in different ways: from the derivative of the ionic potential, Eq. (2.40), with a spacing of 0.43 a.u., from the derivatives of the orbitals, Eq. (2.41), with a spacing of 0.43 a.u., and as a finite-differences derivative of the total energy with two different spacings, 0.43 and 0.215 a.u. .

3.2.3 Aliasing and pseudo-potential filtering The pseudo-potential approximation leads to a reduction of the hardness of the ionic potential, consequently reducing the precision required for the representation of the wave-functions. However, the typical Troullier-Martins pseudo-potentials still contain high Fourier components that are costly to 70 Chapter 3. Numerical methods represent on a real-space grid or a plane-wave basis set. These components are usually small but they have a considerable effect due to aliasing. Aliasing occurs when a function that is sampled at finite intervals, h, has Fourier components with frequencies larger than 2π/h. As shown in Fig. 3.3, these high frequency components can be mistaken as a low frequency signal, spoiling the representation of the function in the whole spectrum.5

Figure 3.3: Example of aliasing of two sinusoidal functions: the two functions (red solid and blue dashed line) would have the same representation in the grid represented by the black squares.

In real-space grids, aliasing can cause several important problems. First of all, it causes a poor convergence of the total energy or other quantities with the spacing of the grid, decreasing the spacing required for properly converged calculations. Moreover, it induces an egg-box effect; Any physical description of a system must be invariant under a translation of the whole system, and, of course, the Kohn-Sham equations are invariant. However, in a real-space grid discretization this property is lost. For example, due to high Fourier components the discretized potential of an atom sitting on a grid point might be slightly different from the one when the atom is between points, so that a rigid displacement of the system produces an oscillation of the energy (if we plot the energy of the atom as a function of the position, it resembles an egg-box, hence the name). This affects mainly geometry optimization or molecular dynamics calculations, but it may also affect other types of calculations. The simplest way to deal with aliasing is to choose a resolution that is high enough so that all Fourier components of the potential are included. Nor- mally, this implies a spacing that is far too small for practical calculations

5For a spacing h, a component of frequency ω cannot be distinguished from components that have a frequency ω0 = ω + 2πn/h (with n any integer number). 3.2. Pseudopotentials 71 of large systems. Alternatively, we can filter out the high Fourier compo- nents of the pseudo-potentials. Although this sounds simple in principle, some special considerations must be taken into account: First, the pseudo- potential contains a long-range part that cannot be easily represented in Fourier space, so in order to filter this part the pseudo-potential must be separated in two: a smooth long-range component that is not filtered and a localized part that is filtered. Second, applying a direct cutoff in Fourier space is not possible, since it would induce long-range oscillations of the potential in real space, destroying the localization. A more sophisticated ap- proach which balances the removal of the high Fourier components and the localization of the pseudo-potential, is required. Several filtering techniques have been proposed, and we have selected the ones presented by Briggs, Sullivan and Bernholc (BSB) [136] and Tafipolosky and Schmid (TS) [137]. Computationally, the cost of the filtering process is negligible, as it is done over the one-dimensional radial functions of the potential and it is performed only once per run per pseudo-potential. To illustrate the effect of pseudo-potential filtering we took an N2 molecule and compared the calculated total energy and forces computed without fil- tering with the filters of BSB and TS. The first test was to check the effect in the convergence of the energy and the interatomic force with respect to the spacing, see Fig. 3.4. As we can see, the filtering process does not sig- nificantly improve the convergence with the spacing, although it makes it smoother. For large values of the spacing (larger than 0.5 a.u.) the value of the energy with the filter is farther from the converged value than the unfiltered case. We also studied the egg-box effect by rigidly shifting the N2 molecule with respect to the grid and calculating the energy and the inter- atomic force, Fig. 3.5. Here, we can see the filtering in action, the oscillation of the energy is reduced by both filtering schemes by one order of magnitude, close to what is obtained by halving the spacing (at a much larger numerical cost). For the forces, however, the filtering does not have a large effect, espe- cially when compared with the half spacing case. Our last test was to change the interatomic distance of the molecule, which is a challenging case for a real-space grid since the physical effect of separating the atoms is mixed with the change in the relative position of the atoms with the grid points. From Fig. 3.6 we can see that the filters do a good job eliminating the artificial oscillations that are noticeable in the unfiltered pseudo-potential calculation and that the TS filter is very close to the half-spacing calculation. For the forces both filters also manage to eliminate the wiggles of the unfiltered sim- 72 Chapter 3. Numerical methods ulation, but in this case the oscillations were already much smaller due to the scheme to calculate the forces, as discussed in Section 3.2.2 and shown in Fig. 3.2.

-18.5

No filter -19 BSB filter TS filter

-19.5 Energy [a.u.]

-20

0.3

0.2

0.1 Force [a.u.] 0

-0.1 0.2 0.3 0.4 0.5 0.6 Spacing [a.u.] Figure 3.4: Convergence with respect to the spacing of the total energy and the interatomic force for the N2 molecule: without pseudo-potential filtering, with the BSB filter [136], and the TS filter [137]. Interatomic distance of 2.06 a.u.

A more dramatic case was found in the calculation of the circular dichroic response, where a large difference, more than 60%, in the electric circular dichroism spectrum can be obtained by shifting the whole molecule by half the spacing, Fig. 3.7. In conclusion, the use of a filter is an inexpensive way to increase numer- ical precision without increasing the numerical cost. The major effect of the filter is to improve the consistency of the calculation is situations where the atoms change their position with respect to the grid. Even when a pseudo- potential filter is used, however, convergence with respect to the spacing must be ensured. 3.3. Numerical algorithms 73

0.04 No filter (h=0.215) No filter (h=0.43) 0.02 Filter BSB (h=0.43) Filter TS (h=0.43) 0 Energy [a.u.] ∆ -0.02

-0.04

0.005

0 Force [a.u.] ∆ -0.005

-0.01 0 0.1075 0.215 0.3225 0.43 Displacement [a.u.] Figure 3.5: Variation of the total energy and the interatomic force with respect to a rigid displacement for the N2 molecule: without pseudo-potential filtering (spacing of 0.43 and 0.215 a.u.), with the BSB filter [136], and the TS filter [137] (spacing of 0.43 a.u.). Interatomic distance of 2.06 a.u. 74 Chapter 3. Numerical methods

-19.25

-19.5

-19.75 Energy [a.u.]

-20

0.125 No filter (h=0.215) No filter (h=0.43) BSB filter (h=0.43) 0 TS filter (h=0.43)

-0.125 Force [a.u.]

-0.25

1.6 2 2.4 2.8 3.2 3.6 Interatomic distance [a.u.]

Figure 3.6: Total energy and interatomic force for the N2 molecule as a func- tion of the interatomic distance: without pseudo-potential filtering (spacing of 0.43 and 0.215 a.u.), with the BSB filter [136], and the TS filter [137] (spacing of 0.43 a.u.). 3.3. Numerical algorithms 75

Figure 3.7: Electric circular dichroism percentage difference in the rota- tory strength function of R-methyloxirane between two calculations in which the molecule is displaced by 0.06 A,˚ without and with TS pseudo-potential filtering. 76 Chapter 3. Numerical methods 3.3 Numerical algorithms

In this section we discuss the algorithms that we have implemented to solve numerically the equations that were introduced in chapter 2. We emphasize the new developments that allowed for a huge improvement in efficiency and parallelization.

3.3.1 Ground-state calculation Both for linear response and time-propagation calculations, we need to per- form a ground-state DFT calculation first. This is done by a self-consistent iterative procedure. Numerically, the central part is the solution of an eigen- value problem, that normally scales with the cube of the size of the system due to the necessity of orthogonalizing the wave-functions. For systems of less than one hundred atoms, the cost of the ground-state calculation is not important compared with the excited states one, and a basic conjugated gra- dient eigensolver (CG) [138] is fast enough. However, we found that for larger systems the cost of the ground-state calculation becomes considerable, so we had to look for better alternatives. We have found satisfactory results with the residual minimization - direct inversion in the iterative subspace (RMM- DIIS) eigensolver [139,140] following the implementation proposed by Kresse and Furthm¨uller [141]. As we can see from Fig. 3.8, the new eigensolver has a much lower computational cost than the CG eigensolver for large systems. In both cases the scaling is cubic, but in the RMM-DIIS solver the prefactor for the cubic term is two orders of magnitude smaller than in the CG solver. The core part of the RMM-DIIS algorithm is the independent minimization of each orbital in the residual subspace. As each state is independently opti- mized this is a highly parallelizable operation. In contrast, the CG algorithm is inherently serial, each orbital requires the calculation of the lower energy ones.

3.3.2 Time propagation The key part for the real-time solution of Eq. (2.5) is to approximate the propagation operator

|ϕ (t + ∆t)i = U(ˆ t + ∆t, t) |ϕ (t)i (3.2) 3.3. Numerical algorithms 77

20000

Method c2 c3 −3 −6 17500 RMM-DIIS 2.2 × 10 4.9 × 10 CG 1.4 × 10−2 2.9 × 10−4

15000

12500

10000

7500 Computational time [s]

5000

2500 RMM-DIIS CG

0 200 400 600 800 Number of atoms

Figure 3.8: Time required to calculate the ground state as a function of the system size. Comparison between the conjugated gradients (CG) and residual minimization - direct inversion in the iterative subspace (RMM-DIIS) eigen- solvers, as implemented in Octopus. The table shows the leading coefficients 2 3 for a cubic polynomial interpolation, y = c0 + c1x + c2x + c3x . The systems are artificial arrays of benzene molecules. The grid is composed of a sphere of radius 7 a.u. around each atom with a spacing of 0.6 a.u. (a smaller spacing would be required for a converged calculation). The tests were executed in 4 Xeon 5220 processor cores. 78 Chapter 3. Numerical methods in an efficient and stable way. There exist several different methods (see Ref. [142] for a review) and we have chosen the approximated enforced time- reversal symmetry (AETRS) method due to its efficiency. Within this method the propagator for a Hamiltonian H(ˆ t) is approximated by  ∆t   ∆t  U(ˆ t + ∆t, t) = exp −i H(ˆ t + ∆t) exp −i H(ˆ t) (3.3) 2 2 which is invariant under time-reversal. H(ˆ t + ∆t) is obtained from an in- terpolation from previous steps using a predictor-corrector procedure. For the calculation of the exponential in Eq. (3.3) a simple fourth order Taylor expansion is used (this particular order has advantageous numerical proper- ties [142]). The careful preservation of time reversibility is crucial to avoid unphysical drifts in the total energy. We have found (for the cases presented in this work and for our particular numerical implementation) the combi- nation of the AETRS approximation, together with the Taylor expansion representation of the exponential, to be the most efficient approach. For the modified Ehrenfest scheme, Eq. (2.24a), thanks to the transformation in Eq. (2.37), we can use the same propagation methods. For the Car-Parrinello scheme the electronic part is integrated by the RATTLE/Velocity Verlet al- gorithm as described in Ref. [143]. Since TDDFT propagation automatically preserves the orthogonality of the wave-function, it needs not be imposed and the numerical cost is propor- tional to NksNg (with Nks the number of orbitals and Ng the number of grid points or basis set coefficients). For comparison, other MD methods, such as CP or BO, require a re-orthogonalization at each time step, so the cost is 2 proportional to NksNg.

3.3.3 Numerical solution of the Sternheimer equation Central to our linear response approach is the numerical solution of the Stern- heimer equation (2.46). This equation has the form of a linear equation where the operator to be inverted is the shifted ground-state Hamiltonian. As the shift is complex, due to the iη term, this operator is not Hermitian. There- fore, we cannot use the standard techniques available in the community, like the simple conjugated gradients scheme, but we have to rely on more general linear solvers. Our choice is the biconjugate gradient stabilized method [144]. Close to the resonance frequencies, the Sternheimer equation becomes very badly conditioned, and the solution process turns out to be very costly. 3.3. Numerical algorithms 79

The problem can be eased by preconditioning. We have found that a smooth- ing preconditioner [145] can dramatically improve convergence in these cases. This is a very simple but effective preconditioner that filters out high fre- quency components by averaging the value of the function for each point with the value of its neighbours. Additionally, for small systems, the solu- tion process can be made less costly if we solve the Sternheimer equation in the space of the unoccupied wave-functions by orthogonalizing the right-hand side of the Sternheimer equation with respect to the occupied wave functions (this is not practical for large systems as the orthogonalization process be- comes very demanding). Even with these techniques, the process is much more costly for frequencies near resonance, requiring up to 10 times more computational time. As the right-hand side of the Sternheimer equation depends on the lin- ear variation of the density, the problem has to be solved self-consistently. We employ similar strategies as for the ground-state calculation, mixing the linear variation of the density using a Broyden scheme [146, 147] in order to speed up the convergence of the self-consistent cycle. In order to achieve self- consistency it is critical to re-orthogonalize the wave-functions after solving the Sternheimer equation and before the calculation of the variation of the density. This removes small components which belong to the occupied space that might appear due to the finite precision of the calculation. These com- ponents would otherwise induce a small random noise in the variation of the density that becomes significant at the end of the self-consistency process, when the changes in the density variation are small. In principle, the total cost of calculating the response is proportional to NksNgMω, where Nks is the number of Kohn-Sham orbitals, Ng is the num- ber of grid points, and Mω is the number of frequencies we desire (which is independent of the system size). However, to improve the numerical proper- 2 ties of the algorithm, we perform some operations that have O(NksNg Mω) cost. This scaling is still much better than for the approaches that rely on ex- pansions in particle-hole states, and similar to the ground-state calculation 2 which normally scales as O(NksNg ). Using this method, it should, there- fore, be possible to study (hyper)polarisabilities of very large systems, like nano-structures or molecules of biological interest. After obtaining the linear response, the evaluation of the hyperpolaris- 2 ability from Eq. (2.65) has a cost proportional to O(NksNgMω) but with a ˆ small prefactor. To speed up the calculation, terms like hϕm|δHj(±ω2)|ϕni 80 Chapter 3. Numerical methods

or hδϕn, i(∓ω1)|δϕm, k(±ω3)i, that are required several times, can be calcu- lated once and stored in memory, speeding up the calculation by at least two orders of magnitude.

3.4 Optimization and Parallelization

In this section we review several improvements that have been made to the Octopus code to increase its execution speed both in the serial and parallel cases.

3.4.1 Optimization of grid operations

In order to handle complex grids each grid point is assigned, internally, a number (see Fig. 3.9). Hence, discretized functions are represented by one- index vectors, where each value in this one-dimensional space corresponds to a grid position. Tables are used to map from the one-dimensional space to grid positions and back.6 Boundary points, required for the application of differential operators, are assigned numbers at the end of the array, so functions can be allocated with or without those points. The advantage of this approach is that any grid shape and boundary conditions can be considered, while codes based on three-dimensional grids typically can only work with parallelepipedic boxes. This also simplifies the code considerably since most operations can be done transparently over the one-index vectors with a single loop (or using Blas [148] routines). Particularly important operations are dot products, which we perform us- ing the Blas functions ddot and zdot. The performance of these operations, however, is limited by the large amount of memory access operations re- quired. So, when possible, we group several dot products together as matrix- vector or, ideally, matrix-matrix multiplications that can be performed more efficiently by Blas level 2 and 3 routines. For example, in this way the Gram- Schmidt orthogonalization required for the ground-state calculation can be executed at a considerable fraction of the peak performance of the processor.

6Since the mapping is complex to generate, it is done at once for all points at the beginning of the calculation. 3.4. Optimization and Parallelization 81

16 17 18 19 20 21 1 2 3 4 5 22 23 6 7 8 9 10 24 25 11 12 13 14 15 26 27 28 29 30 31 Figure 3.9: Example of the numbering of a 2D grid. Normal grid points are marked in solid black and boundary points in dashed blue. In green, neighbours required for the calculation of the order 1 discrete Laplacian.

3.4.2 Optimization of non-local differential operations The calculation of differential operators is based on high-order finite differ- ences approximations, where a differential operator is calculated as a sum of the values of neighbours involved in the calculation of the Laplacian in a 2D grid are shown.) The weights of the discretization only depend on the number and position of the points considered [149], so for a uniform grid they are the same for all points. Note that, here, the differential operators are approximated, while in basis set calculations differentiation is exact. If N is the order of the approximation and h the grid spacing, the error is proportional to hN , thus it can be reduced by increasing the order of the approximation or by reducing the spacing. In practice, with an order 8 approximation to the Laplacian the error is negligible in comparison with the error in the approximation of the ionic potential. Since we use a one-dimensional representation of the grid points, the numerical application of the differential operators is more complicated, as information from neighbouring points is required (see Fig. 3.10a). One option 82 Chapter 3. Numerical methods is to store the operator as a sparse matrix in compressed form [144], but in this way we cannot exploit the fact that the weights in the discretization are constant. The original approach taken in Octopus was to generate a table, B, where for each point we store an entry with the indices of its neighbours for each operator (see Fig. 3.10b), so that the action of the differential operator is calculated as N Xnb (Df)n = wl fB(l,n) . (3.4) l The problem with this approach is that, since the table of neighbours B is typically one order of magnitude larger than the arrays that contain the functions, it consumes a considerable amount of memory. Furthermore, the table must be loaded from memory to the processor each time, limiting the execution efficiency of the calculation of differential operators. It also forces the compiler and the processor to treat the access to memory as completely random, while in practice there is a certain regularity that could be exploited to increase execution performance. Therefore, reducing the size of this table is essential for improving the efficiency in the calculation of differential operators. This can be achieved by exploiting the redundancy in the information contained in the table. This redundancy becomes apparent if we write the table in terms of offsets, i.e. we subtract from each entry the value of the corresponding point

Bs(n, l) = B(n, l) − l . (3.5)

Since the order of the points is lexicographic, it is very likely for entries of consecutive points in this new table to be equal, the entries only differ when boundary points are involved (see Fig. 3.10c). Therefore, we can build a new table Br that contains only the non-repeated entries of Bs, complemented 7 by two arrays, nmin and nmax , that contain the information of the range of points for each entry of Br (see Fig. 3.10d). For typical grids, Br is about 10 or 20% of the size of the original B. The differential operator is now calculated as

nmax(m) N X X Xnb (Df)n = wl fn+Br(l,m) . (3.6)

m n=nmin(m) l

7 In practice, nmax(m) = nmin(m + 1) + 1, but a more general definition is practical to apply the operator over a non-contiguous range of indices. 3.4. Optimization and Parallelization 83

a b Full neighbors table: B Point Neighbors 1 16 21 1 2 6 2 17 1 2 3 7 16 17 18 19 20 3 18 2 3 4 8 4 19 3 4 5 9 21 1 2 3 4 5 22 5 20 4 5 22 10 6 1 2 6 7 11 23 6 7 8 9 10 24 7 2 6 7 8 12 8 3 7 8 9 13 9 4 8 9 10 14 25 11 12 13 14 15 26 10 5 9 10 24 15 11 6 25 10 12 27 27 28 29 30 31 12 7 11 10 13 28 13 8 12 10 14 29 14 9 13 10 15 30 15 10 14 10 26 31

Neighbors offsets table: Bs Point Neighbors 1 15 20 0 1 5 r c 2 15 -1 0 1 5 d Reduced neighbors table: B 3 15 -1 0 1 5 Range Neighbors 4 15 -1 0 1 5 1 1 15 20 0 1 5 5 15 -1 0 17 5 2 4 15 -1 0 1 5 6 -5 17 0 1 5 5 5 15 -1 0 17 5 7 -5 -1 0 1 5 6 6 -5 17 0 1 5 8 -5 -1 0 1 5 7 9 -5 -1 0 1 5 9 -5 -1 0 1 5 10 10 -5 -1 0 14 5 10 -5 -1 0 14 5 11 11 -5 14 0 1 16 11 -5 14 0 1 16 12 14 -5 -1 0 1 16 12 -5 -1 0 1 16 15 15 -5 -1 0 11 16 13 -5 -1 0 1 16 14 -5 -1 0 1 16 15 -5 -1 0 11 16

Figure 3.10: Example of the reduction process for a table of neighbours. a) Grid points and numbering scheme. Boundary points are in blue. The (red) arrows indicate the order in which neighbours are used in the calculation of the derivatives. b) Full table of neighbours. c) Table of neighbours written in terms of offsets, entries that are repeated are in green. d) Reduced table of neighbours, indicating the range of points for each entry. 84 Chapter 3. Numerical methods

Besides the size reduction, formula (3.6) has the additional numerical ad- vantage that for each m, Br(l, m) can be loaded outside of the sum over n. The access pattern for f is regular, hence, there is one continuous stream for each l, and this can be exploited by the processor, as long as there are sufficient values in range (nmin, nmax). To exploit this advantage in the im- plementation, the loop associated with the sum over m is unrolled [150] to a depth of 8 (4 in the complex case), and, if supported by the platform, the operations are vectorized8. We compare the performance of the different strategies and implementa- tions in terms of throughput, i.e. the number of floating point operations per unit of time. The compared versions are: using the full neighbours tables, Eq. (3.4), using the reduced table, Eq. (3.6), and the two optimized versions of this last one, the unrolled version and the vectorized (and unrolled) version. The results are shown, for two different platforms, in Figs. 3.11 and 3.12. As we can see, reducing the size of the table does not guarantee an immediate increase in the performance. On the contrary, the throughput is reduced for small grids, probably due to the overhead of the extra loop. However, using the optimized versions of the code yields considerable gains in performance. In particular, with the vectorized version we can achieve nearly 70% of the nominal peak performance of the processor in the calculation of a complex Laplacian. For real Laplacians the advantage of vectorization is smaller. This is caused by memory alignment issues.9 The loss in performance is less severe in the Core i7 processor (Fig. 3.12) which has improved support for non-aligned memory access.

3.4.3 Multi-level parallelization For the code to run optimally in different kinds of parallel systems, a mul- tilevel parallelization scheme has been incorporated in Octopus. For the

8The idea of vectorization is to work with blocks of values at a time, applying the same instructions over all of them. Some modern processors can work with short vectors (size 2 for double precision) and can operate considerably faster over them than over single values. The problem with vectorization is that it is not supported by programming languages and that it is difficult for the compiler to vectorize efficiently. In our case we use special, platform-dependent, extensions to the C programming language to write explicit vectorial code for x86 processors (with SSE2 instructions) and for the IBM Blue Gene/P. 9Reading and writing vectors to memory is much faster when the access is guaranteed to be aligned in memory. For real values this is not the case, therefore, slower memory access instructions must be used. 3.4. Optimization and Parallelization 85

Real Laplacian Complex Laplacian

Full neighbors table 2500 Reduced neighbors table 62.5 Reduced table - Unrolled Reduced table - Vectorized

2000 50

1500 37.5 Throughput [MFlops] CPU peak throughput [%]

1000 25

500 12.5 10000 1e+05 1e+06 10000 1e+05 1e+06 Number of points Number of points Figure 3.11: Throughput of the Laplacian operator as a function of the number of grid points for different implementations. The processor is a Core 2 Duo at 2.0 GHz with a peak throughput of 4000 Mflops. moment three levels of parallelization are available for finite systems:10

• The processors are divided in groups and each group is assigned a num- ber of orbitals. This is a very efficient scheme for real-time TDDFT, since the propagation of each orbital is almost independent from the other orbitals. For other type of calculations the parallelization is not as straightforward. When doing molecular dynamics, the same groups are used for parallelization in atoms.

• The real-space is divided in domains assigned to different processors. This method is general and can be applied to any calculation performed by Octopus.

10In the case of crystalline systems or finite systems with spin polarisation, an additional level of parallelization can be used by assigning different K-points or spin-channels to different processors. 86 Chapter 3. Numerical methods

Real Laplacian Complex Laplacian 5000 75 Full neighbors table 4500 Reduced neighbors table Reduced table - Unrolled Reduced table - Vectorized 4000 60

3500

3000 45

2500 Throughput [MFlops] 2000 30 CPU peak thoughput [%]

1500

1000 15 10000 1e+05 1e+06 1e+07 10000 1e+05 1e+06 1e+07 Number of points Number of points Figure 3.12: Throughput of the Laplacian operator as a function of the number of grid points for different implementations. The processor is a Core i7 at 3.3 GHz with a peak throughput of 6600 Mflops.

• Each process can run several OpenMP threads.

While each parallelization level has its inherent limitations in the scala- bility, combining them in a multi-level scheme leads to less limitations. For example, if two independent levels scale to 16 processors with 80% efficiency, when combined they could scale to 256 processors with an efficiency of 64%. In Fig. 3.13, we show how Octopus can scale to more than 4000 proces- sors for a system with less than 700 atoms by combining all three levels of parallelization.

3.4.4 Parallelization in states In a real-time TDDFT calculation, it is natural to parallelize the problem by distributing the Kohn-Sham states over processors since the propagation of each orbital is fairly independent. Communication is only required once 3.4. Optimization and Parallelization 87

4000

3000

2000 Speedup

1000

0 0 1000 2000 3000 4000 Number of processors Figure 3.13: Scalability of Octopus up to 4096 processor cores in a Blue Gene/P system. Time propagation of a chlorophyll system with 650 atoms. Three levels of parallelization were used: states, domains, and threads.

per time-step to calculate quantities that depend on a sum over states: the time-dependent densities and the forces on the ions. Summing a quantity over several nodes is called a reduction and the communication cost grows logarithmically with the number of nodes. The main limitation to this paral- lelization mode comes from the number of available orbitals: for a reasonable performance, at least five orbitals per processor are usually needed. Unfortunately, for methods that rely on orthogonalization procedures, like ground-state calculations or Car-Parrinello molecular dynamics, the paral- lelization in states is not as effective and also more difficult to implement. For the case of the Sternheimer equation, the solution process is independent for each orbital, but the time required to solve it can be very different. Hence, a dynamic load balancing scheme is required for an efficient parallelization in states. 88 Chapter 3. Numerical methods

3.4.5 Parallelization in atoms When performing molecular dynamics simulations with parallelization in states, we observed that a considerable part of the computation time is spent in parts of the code that do not depend on the states (global quantities). The major contributions come from the re-generation of the ionic potential

ion X local v (r) = ˆvI (r − RI ) (3.7) I and the calculation of the forces due to the local part of the ionic potential

Z dρ (r) F local = dr ˆvlocal (r − R ) . (3.8) I dr I I

As explained by Amdahl’s law [151], these non-parallelizable parts spoil scal- ability. As these expressions depend on the atomic index I, we solve the scalability problems by inducing a complementary parallelization in atoms that uses the same processor division as the state parallelization. For exam- ple, to generate the ionic potential, each processor generates the potential for a subset of the atoms and then a reduction operation is performed to obtain the total ionic potential.

3.4.6 Parallelization in domains The basic idea of domain parallelization is to partition the physical space in several regions that are assigned to different processors, Fig. 3.14. This is practical in a real-space approach as almost all operations are local or semi-local in space. The typical communication operations the code has to perform in this parallelization scheme are:

• Reduction operations: a global sums of one or several values stored in each domain required for integrals and dot products.

• Communication of boundaries: As the differential operators require the values of neighbouring points, these values must be obtained from other processors for the application of the operator near the region boundaries. In practice, this is done by using ghost points, similar to boundary points, that contain copies of the values of other grids that must be updated before applying the operators, see Fig. 3.14. 3.4. Optimization and Parallelization 89

Domain A Domain B

Ghost Points of Domain B

Figure 3.14: Example of domain parallelization for a benzene molecule. The different colours show the different domains that are assigned to different processors. The enlarged section shows the ghost points in a domain paral- lelization.

The main challenge in a domain parallelization is the distribution of the points among processors, especially since the grid can have an arbitrary shape. The distribution should be such that each processor has an equiva- lent number of points and that the amount of points to be communicated by each processor is balanced. Fortunately, there exist software libraries to perform grid partitioning and Octopus has been interfaced to two of them, Zoltan [152] and METIS [153]11. Even with these sophisticated partition schemes, we have detected an unbalancing in the communication costs when a large number of partitions is used. This is due to an imbalance in both the number of neighbours (processors to whom we must communicate) and the number of ghost points. There are some strategies that we have included in Octopus to reduce the cost of communication:

• Grouping of reduction operations: In general, communication costs are highly non-linear with the amount of data sent, as the time required

11We have found that, for our applications, Metis is considerably faster and provides better partitions than Zoltan, even when Zoltan is parallel and we are only using the serial version of Metis (a parallel version, ParMetis is available but is not interfaced with Octopus at the moment). 90 Chapter 3. Numerical methods

to send a small message is dominated by the time required to set up the message: the latency. By grouping several reduction operations in a single one, we can reduce the total communication time considerably. This strategy works well for orthogonalizations, where the whole ma- trix of overlaps between orbitals can be reduced at once, and for the application of the non-local potential, where the action of all projectors on all atoms can be reduced together.

• Overlapping of computing and communication: In the case of the non- local differential operators that require the updating of ghost points we profit from the ability of many parallel platforms to communicate while computing. While we peform the update of the ghost points, we apply the finite difference operator to the points of the grid that do not require them. After the communication is finished we apply the operator to the remaining points. This approach reduces the communication costs considerably and hides, in part, the load unbalancing produced by the grid partitioning described earlier.

3.4.7 OpenMP OpenMP is a standard extension to Fortran, C, and C++ to write multi- threaded code in a simple and portable way. It is based on directives that are inserted in normal serial code and that instruct the compiler to generate parallel code for specific sections of the code. In Octopus, OpenMP is used at a very low level to parallelize inner loops, like the application of differential operators, the application of the local and non-local potentials, etc. Other operations, like orthogonalization need not be parallelized as they can profit from multi-threaded Blas implementations like GotoBLAS, IBM ESSL, or Intel MKL. One of the main advantages of OpenMP is that the memory consumption is almost independent of the number of threads, making it ideal for systems with SMP nodes that are limited in memory, like the Blue Gene/P system. Chapter 4

Applications

4.1 Modified fast Ehrenfest dynamics1

First principles molecular dynamics is usually performed in the framework of ground-state Born-Oppenheimer calculations or Car-Parrinello schemes. A major drawback of both methods is the necessity to enforce the orthogonal- ization of the wave functions, which can become the bottleneck for very large systems. In Section 2.2.3 we introduced a modified Ehrenfest scheme which exploits the fact that no orthogonalization is required in Ehrenfest dynamics and, at the same time, improves upon the size of the required time step. The latter is usually very small in the normal Ehrenfest scheme. This new approach, we recall, relies on the electron-nuclei separation ansatz, plus the classical limit for the nuclei taken through short-wave asymptotics. Then, the electronic subsystem is handled with time-dependent density-functional theory. The resulting model consists of two coupled sets of equations: the time-dependent Kohn-Sham equations for the electrons, and a set of Newto- nian equation for the nuclei. In this section we apply systems the modified Ehrenfest dynamics scheme to some benchmark systems. The objective is to illustrate the properties of

1This section is based on the following articles: X. Andrade, A. Castro, D. Zueco, J. L. Alonso, P. Echenique, F. Falceto, and A. Rubio, A modified Ehrenfest formalism for efficient large scale ab-initio molecular dynamics, Journal of Chemical Theory and Computation 5, 728–742 (2009), and J. L. Alonso, X. Andrade, P. Echenique, F. Falceto, D. Prada-Gracia, and A. Rubio, Efficient Formalism for Large-Scale Ab Initio Molecular Dynamics based on Time-Dependent Density Functional Theory, Physical Review Letters 101, 96403 (2008).

91 92 Chapter 4. Applications

Figure 4.1: KS potential energy EKS[ϕ, R] as a function of the internuclear distance R in N2 molecule simulations. Starting from below, the gsBO result [broken (black) line], and µ = 1 [solid (blue) line], µ = 10 [solid (green) line], µ = 20 [solid (red) line], µ = 30 [solid (violet) line]. Inset: vibrational frequencies from experiment [154] and calculated from the trajectory using different values of µ.

the new scheme and compare it to CP in terms of efficiency and physical accuracy. Unless stated otherwise, the calculations were performed using LDA approximation to the DFT exchange and correlation functional.

4.1.1 Nitrogen molecule

For the nitrogen molecule, N2, we calculate the ionic trajectories for different values of µ, the parameter introduced in Eq. (2.23) that controls the modified Ehrenfest dynamics scheme. We use as initial condition a bond length 10% larger than the equilibrium one and zero velocities. A time step of µ×0.0012 fs is used and the system is propagated for 242 fs. In Fig. 4.1 we plot the potential energy as a function of the interatomic distance during the 4.1. Modified fast Ehrenfest dynamics 93

Table 4.1: Selected vibrational frequencies (in cm−1) for the Benzene molecule, obtained using different values of µ.

µ = 1 398 961 1209 1623 3058 µ = 5 396 958 1204 1620 3040 µ = 10 391 928 1185 1611 2969 µ = 15 381 938 1181 1597 2862 trajectory for each run. In the inset we also give the vibrational frequency for the different values of µ, obtained as the position of the peak in the Fourier transform of the velocity auto-correlation function. One can see that for µ = 20 the simulation remains steadily close to the BO potential energy surface and there is only a 3.4% deviation of the vibrational frequency. For µ = 30 the system starts to strongly separate from the gsBO surface as we start to get strong mixing of the ground state BO surfaces with higher energy BO surfaces. This behaviour is consistent with the physical interpretation given in section 2.2.3 as for this system µmax ≈ 27.

4.1.2 Benzene Next, we applied the method to the Benzene molecule. We initialize the atoms in the equilibrium geometry with a random Maxwell-Boltzmann dis- tribution of the velocities corresponding to 300 K. Each run was propagated for ∼ 400 fs with a time step of µ × 0.001 fs which provides a reasonable convergence in the spectra. Vibrational frequencies were obtained from the Fourier transform of the velocity auto-correlation function. In Table 4.1, we show some low, medium, and high frequencies of benzene as a function of µ. The general trend is a red-shift of the frequencies with increasing µ with a maximum deviation of 7% between µ = 1 and µ = 15. To make a direct comparison with experiment, we computed the infrared spectra as the Fourier transform of the electronic dipole operator. In Fig. 4.2, we show how the spectra changes with µ. For large µ, besides the red-shift, spurious peaks appear above the highest vibrational frequency (not shown). This is probably due to non-adiabatic effect as µmax ≈ 14 if we consider the first virtual TDDFT excitation energy. We performed equivalent CP calculations for different values of µCP, and found that, as shown in 4.2, it is possible to find for each µ, a µCP such that the errors in the two methods are the same. Having established the link between µ and µCP we address the numerical 94 Chapter 4. Applications

Experiment

µ=1 µ =1 Ehrenfest CP Car-Parrinello

µ µ =5 CP=100

µ µ =10 CP=225 Infrared spectrum [arbitrary units]

µ µ =15 CP=750

0 1000 2000 3000 -1 Frequency [cm ] Figure 4.2: Calculated infrared spectrum for benzene for different values of µ, compared to CP dynamics and to experiment from Ref. [155]. performance of our new method in terms of system size compared to CP. To this end, we simulated several benzene molecules in a cell. We used a value of µ = 15 while µCP = 750, values that yield a similar deviation for the BO surface, according to Fig. 4.2. The time steps used were 3.15 a.u. and 7.26 a.u., respectively. The computational cost is measured as the simulation time required to propagate one atomic unit of time, as this is an objective measure for comparing different MD schemes. We performed the comparison both for serial and parallel calculations; the results are shown in Fig. 4.3. In the serial case, CP is 3.5 times faster for the smaller system, but the difference reduces to only 1.7 times faster for the larger one. Extrapolating the results we pre- dict that the new dynamics will become less demanding than CP for around 1100 atoms. In the parallel case, the performance difference is reduced, CP being only 2 times faster than our method for small systems, and with a 4.1. Modified fast Ehrenfest dynamics 95 crossing point below 750 atoms. This is due to the better scalability of the Ehrenfest approach, as seen in Fig. 4.3d. Moreover, in our implementation memory requirements for the Ehrenfest dynamics approach are lower than for CP: in the case of 480 atoms the ground state calculation requires a max- imum of 3.5 Gb whereas in the molecular dynamics, Ehrenfest requires 5.6 Gb while CP needs 10.5 Gb. The scaling of the memory requirements is the same for both methods and we expect the ratio of the memory requirements to remain the same for all system sizes.

4.1.3 Fullerene molecule To complete the computational assessment of the new formalism, we calcu- lated the infrared spectrum of a prototype molecule, C60, for which high qual- ity experimental data is available [156]. This time we employ the PBE [26] exchange and correlation functional since it should give slightly better vibra- tional properties than LDA [157]. For the simulation shown below we use a value of µ = 5 that provides a reasonable convergence in the spectra. The calculated IR spectra is in very good agreement with the experiment (see Fig. 4.4) for both low and high energy peaks. The latter are more sensitive to the values of µ, as seen in before in Fig. 4.2, which explains the small deviation from the experimental value for highest energy peaks. The result is robust and independent of the initial condition of the simulation. The splitting of the lowest energy peak in the IR spectrum starts to be resolved for simulation times longer than 2 ps.

4.1.4 Conclusions In this section we have shown how the modified Ehrenfest scheme preserves the desirable properties of conventional Ehrenfest scheme while allowing for a considerable increase of the time step and still keeping the system close to the Born-Oppenheimer surface. The automatically enforced orthogonaliza- tion is of fundamental importance for large systems because it reduces the scaling of the numerical cost with the number of particles and, in addition, allows for a very efficient parallelization, hence giving the method tremen- dous potential for applications in computational science. The introduced parameter µ controls the trade-off between the closeness of the simulation to the BO surface and the numerical cost of the calculation, analogously to the role of the fictitious electronic mass in CP. For particular values of µ either 96 Chapter 4. Applications

Figure 4.3: Computational performance of our method, with µ = 15, and CP, with µCP = 750, for an array of benzene molecules with finite boundary conditions and a spacing of 0.6 a.u. Performance is measured as the compu- tational time required to propagate for one atomic unit of time. a) Scheme of the benzene molecule array. b) Single processor computational cost for dif- ferent system sizes. Performed in one core of an Intel Xeon E5435 processor. Inset: Polynomial extrapolation for larger systems. c) Parallel computational cost for different system sizes. Performed in 32 × Intel Itanium 2 (1.66 GHz) processor cores of a SGI Altix. d) Parallel scaling with respect to the number of processor for a system of 480 atoms in a SGI Altix system. In both cases a mixed states-domain parallelization was used to maximize the performance. 4.1. Modified fast Ehrenfest dynamics 97 Infrared spectrum [arbitrary units] 400 600 800 1000 1200 1400 1600 -1 Frequency [cm ]

Figure 4.4: Infrared spectrum of C60. The (blue) dashed line corresponds to the calculated spectrum (µ = 5 and 2 ps of propagation time) while the black bars are the experimental values from Ref. [156].

Ehrenfest dynamics or Born-Oppenheimer dynamics are recovered. We have shown that for a certain range of values of µ the dynamics of the fictitious system is close enough to the Born-Oppenheimer surface while allowing for a good numerical performance. We have made direct comparisons of the numerical performance with CP, and, while quantitatively our results are dependent on the system and the implementation, they prove that our method can outperform CP for some relevant systems: large scale systems that are of interest in several research areas and that can only be studied from first principles MD in massively parallel computers. To increase its applicability it would be important to study if the improvements developed to optimize CP can be combined with our approach [58], in particular, techniques to treat small gap or metallic systems [158]. Note that the introduction of the parameter µ comes at a cost, as we change the time scale of the movements of the electrons with respect to the Ehrenfest case, which implies a shift in the electronic excitation energies. This must be taken into account to extend the applicability of our method for metallic, or small-gap systems, non-adiabatic MD and MD under elec- tromagnetic fields, in particular for the case of Raman spectroscopy, general resonant vibrational spectroscopy as well as laser induced molecular bond re- 98 Chapter 4. Applications arrangement. In this respect, we stress that in the examples presented in this work, we have utilized the new model to perform Ehrenfest dynamics in the limit where this model tends to ground state, adiabatic MD. In this case, as it became clear from the examples in this section, the attempt to gain com- putational performance by enlarging the value of the parameter µ must be done carefully, since the non-adiabatic influence of the higher lying electronic states states increases with increasing µ. We believe, however, that there are a number of avenues to be explored that could reduce this undesired effect; we are currently exploring the manner in which the ”acceleration” parameter µ can be introduced while keeping the electronic system more isolated from the excited states. Nevertheless, Ehrenfest dynamics incorporates, in principle, the possi- bility of electronic excitations, and non-adiabaticity. The proper incorpora- tion of the electronic response is crucial for describing a host of dynamical processes, including laser-induced chemistry, dynamics at metal or semicon- ductor surfaces, or electron transfer in molecular, biological, interfacial, or electro-chemical systems. The two most widely used approaches to account for non-adiabatic effects are the surface-hopping method and the Ehrenfest method implemented here. The surface-hopping approach extends the Born- Oppenheimer framework to the non-adiabatic regime by allowing stochas- tic electronic transitions subject to a time- and momenta-dependent hop- ping probability. On the other hand Ehrenfest successfully adds some non- adiabatic features to molecular dynamics but is rather incomplete. This approximation can fail either when the nuclei have to be treated as quan- tum particles (e.g. tunnelling) or when the nuclei respond to the microscopic fluctuations in the electron charge density (heating) [159] not reproducing the correct thermal equilibrium between electrons and nuclei. The latter constitutes a fundamental failure when simulating the vibrational relaxation of biomolecules in solution. We have briefly addressed these issues in sec- tion 2.2. As mentioned there, there have been some proposals in the literature to modify Ehrenfest in order to fulfill Boltzmann equilibrium [160–162]. 4.2. Linear response 99 4.2 Linear response

In this section we present this results of applying the linear response the- ory developed in Chapter 2 to the calculation of some molecular properties such as van der Waals coefficients, optical activity, optical absorption, and magnetic susceptibilities.

4.2.1 Calculation of van der Waals coefficients2 The van der Waals interaction is a common presence in the worlds of physics, chemistry, and biology. It is a dispersive force that results from the non-zero dipole-dipole attraction stemming from transient quantum dipole fluctua- tions. Hence, it acts between neutral bodies at large separations. It is the interplay between the electrostatic and dispersive interactions that deter- mines many interesting phenomena in nature, even in the macroscopic world. In fact, van der Waals interactions are responsible for the remarkable ability of geckos to hold on to surfaces [163]. But the realm of van der Waals forces, being quantum in nature, is the world of atoms and molecules — the nano world. In fact, these forces deter- mine the structure of DNA molecules and the folding and dynamics of pro- teins, the orientation of molecules or nano-structures on surfaces, etc. These forces are also key ingredients in the building and functioning of many of the systems relevant for the emerging fields of nano-technology and biotechnol- ogy. It is, therefore, not surprising that the number of theoretical studies of van der Waals interactions in these systems, has been steadily increasing over the past years. At the same time, the tools used in these studies have become increasingly sophisticated and precise. Typically, van der Waals interactions decay with an inverse power of the distance between the two bodies. The exponent depends on some char- acteristics of the bodies, like their dimensionality or their metallic charac- ter [164]. We illustrate the method with the calculation of C6 between silicon clusters. The clusters were cut from bulk silicon, and then saturated with hydrogens along the tetrahedral direction of the surface atoms. The geome- tries were optimized with the computer code Siesta, [7] employing a double

2This section is part of the following article: S. Botti, A. Castro, X. Andrade, A. Rubio, and M.A.L. Marques, Cluster-surface and cluster-cluster interactions: Ab initio calculations and modelling of asymptotic van der Waals forces, Physical Review B 78 035333 (2008). 100 Chapter 4. Applications

ζ with polarisation basis set, and the PBE parameterization [26] for the exchange-correlation potential. Calculations were performed at zero temper- ature and fixed geometries. The electron-ion interaction is described through norm-conserving pseudo-potentials [134] and the LDA [28] is employed in the adiabatic approximation for the exchange-correlation potential. We restrict ourselves to the more interesting non-retarded regime, i.e. when the inter- action between the two clusters is instantaneous. In this case, the van der Waals interaction energy has an expansion with respect to the inverse of the intermolecular distance, 1/R, in the form

∞ X Cn ∆E(R) = − . (4.1) Rn n=6

The first term C6 for a pair of molecules A and B, averaged over all possible orientations, can be obtained through the Casimir-Polder relation Z ∞ AB 3 (A) (B) C6 = du α (˙ιu) α (˙ιu) , (4.2) π 0 where α(X)(˙ιu) is the average of the dipole polarisability tensor of molecule X, α(X), evaluated at the complex frequencyιu ˙ 1 α(X)(˙ιu) = Tr[α(X)(˙ιu)] . (4.3) 3 The higher order terms in the expansion (4.1) can similarly be written in terms of higher order polarisability tensors. For example, the C8 coeffi- cient depends on the dipole-quadrupole dynamic polarisability (see, e.g., Ref. [165]). We focus on the leading term of the expansion, i.e. the Hamaker constant C6. The main ingredients to evaluate the van der Waals coefficients are there- fore the electronic polarisability α of the cluster evaluated at imaginary fre- quencies.3 We use the Sternheimer method presented previously, for the calculation of the polarisability at real frequencies. The efficiency of the

3Several different numerical approaches can be found in the literature to calculate α at imaginary frequencies within TDDFT. For example, linear response theory can be employed to calculate the density-density response function χ, from which α can be directly obtained. This approach is quite common and has been used for the calculation of the C6 coefficients of a wealth of molecules and clusters. Alternatively, one can work in real time. By propagating the Kohn-Sham equations in real time, it is immediate to obtain α(t). 4.2. Linear response 101

Sternheimer approach is illustrated by the size of the clusters studied in this section: up to ∼300 atoms, computed with relatively modest computer sys- tems. For the time-dependent exchange-correlation potential we used the adiabatic local density approximation, which has been proved to yield reli- able results for semi-conducting clusters.

380 hetero homo 340 ) (a.u.) B Si 300 x N A Si

/(N 260 6 C 220 0 40 80 120 160 A B 1/2 (NSi x NSi)

AB Figure 4.5: C6 Hamaker constants as a function of the square root of AB the product of silicon atoms in cluster A and B. As C6 scales basically as the product between the number of (silicon) atoms in A and B, we plot the AB Hamaker constants divided by this number. Values of C6 when A and B are the same cluster are plotted as red squares, otherwise they are plotted as orange dots.

A Laplace transformation of this quantity yields α(iu). A slightly different approach, is the polarisation propagation technique, whose extension to imaginary frequencies has been used to compute C6 coefficients [166–169]. For large molecules, Banerjee and Harbola have proposed the use of orbital free TDDFT, providing satisfactory results for large sodium clusters [170–172]. 102 Chapter 4. Applications

35 ω 0.42 1 α 0 34 0.4 33 0.38 32

0.36 31 /N (a.u.) α 0.34 30 29 0 40 80 120 160

NSi

Figure 4.6: London effective frequency ω1 for the silicon clusters under study as a function of the number of silicon atoms.

From previous experience with optical spectra calculations, we know that the results would not change significantly with the use of the more sophis- ticated GGAs. We used a spacing of 0.275 A˚ and the simulation box was formed from the union of spheres centered around the atoms with radius 4.5 A.˚ The integral in Eq. (4.2) was performed with a Gauss-Legendre quadra- ture using 6 frequency values. With these parameters, we estimate the accu- racy of our numerical calculations to be better than 5%.

In Fig. 4.5 we show our results for the C6 Hamaker constant between silicon clusters. As the value of C6 scales as the product of the number of A B atoms in cluster A (NSi) and in cluster B (NSi ), we divided the Hamaker con- A B stant by NSiNSi to eliminate this dependence. We show constants between two identical clusters (homo-molecular) as red squares and between different clusters (hetero-molecular) as orange dots. The values for homo-nuclear sys- tems are also given in Table 4.2, where we also include the results from the band polarisation model and the effective medium theory for comparison. 4.2. Linear response 103

We see that the largest C6 per atom appears for the smallest system which consists of two SiH4 clusters. Its value decreases rapidly until slightly above 220 a.u., where it saturates. The few clusters that fall far from the line are the most asymmetric, for which a description in terms of the average of the dipole polarisability tensor is not necessarily as good.

To our knowledge, there are no experimental data of C6 between Si clus- ters to compare to. In fact, it is very difficult to measure Hamaker constants in an experiment. However, we can be confident that our results are reliable as we have checked them with the few available experimental and theoretical data for similar C compounds [173]. The polarisability at imaginary frequencies can be modelled in the Lon- don approximation by introducing two adjustable parameters: the static polarisability α(0) and one effective frequency ω1

α(0) α(˙ιu) = 2 . (4.4) 1 + (u/ω1)

If we insert Eq. (4.4) in Eq. (4.2) we obtain a simplified expression for the homo-molecular Hamaker constant in terms of the two parameters

3ω C = 1 α2(0) . (4.5) 6 4

As we have calculated both C6 and α(0) within TDLDA, it is easy to extract ω1 from Eq. (4.5). The resulting effective frequencies are plotted in Fig. 4.6, together with the calculated static polarisabilities per number of Si atoms. We can observe that ω1 decreases with the number of Si atoms, but the dependence on the size of the cluster is rather weak, except for the singular case of the smallest aggregates. In the following, for our model calculations we use a constant effective frequency of 0.343 Ha. We have demonstrated how the leading terms of the van der Waals forces acting between nano-structures can be accurately and inexpensively com- puted from first principles. The key ingredients can be reliably obtained with state-of-the-art theoretical schemes and computational procedures. The dynamical polarisabilities of large nano-structures at imaginary frequencies, for example, can be safely computed with the Sternheimer reformulation of time-dependent density-functional theory. 104 Chapter 4. Applications

Table 4.2: Values for the static polarisability α(0), and for the Hamaker C6 coefficient. We show both the calculated values with (TD)DFT, as well as the values obtained using a bond polarisation model (BPM) or effective medium theory (EMT), and the respective percent errors.

−2 −4 α(0) × 10 C6 × 10 ∆C6/C6 [%] DFT BPM EMT DFT BPM EMT BPM EMT

SiH4 0.349 0.422 0.337 0.0386 0.0458 0.0340 19 -11 Si2H6 0.678 0.768 0.632 0.136 0.151 0.119 11 -9 Si5H12 1.71 1.80 1.52 0.806 0.836 0.686 4 -15 Si8H18 2.71 2.84 2.40 2.01 2.07 1.72 3 -14 Si10H16 3.12 3.30 2.86 2.68 2.80 2.45 4 -9 Si17H36 5.79 5.95 5.05 8.97 9.09 7.62 1 -15 Si20H30 6.36 6.52 5.68 10.8 10.9 9.64 1 -10 Si22H40 7.47 7.44 6.40 14.5 14.2 12.23 -2 -16 Si32H42 10.0 10.2 8.96 26.5 26.7 24.0 1 -10 Si35H36 10.7 10.8 9.59 29.9 29.8 27.49 -0.3 -8 Si38H42 11.6 11.8 10.5 35.5 35.9 32.8 1 -8 Si47H60 14.9 14.9 13.1 57.6 57.2 51.5 -1 -11 Si56H66 17.6 17.6 15.5 80.0 79.3 72.0 -1 -10 Si66H64 19.9 20.2 18.0 103 105 96.8 2 -6 Si71H84 22.4 22.3 19.7 128 128 116 0 -10 Si74H78 22.8 22.9 20.3 134 134 123 0 -8 Si82H72 24.6 24.8 22.2 156 158 147 1 -6 Si86H78 26.1 26.1 23.4 175 175 163 0 -7 Si87H76 26.2 26.3 23.6 177 177 166 0 -6 Si99H100 30.5 30.4 27.1 238 238 219 0 -8 Si106H120 33.8 33.1 29.3 289 281 256 -3 -11 Si116H102 34.9 35.1 31.4 314 316 295 1 -6 Si123H100 36.8 36.9 33.2 348 349 328 0.3 -6 Si130H98 38.4 38.6 34.9 381 384 363 1 -5 Si136H110 40.7 40.7 36.6 425 426 401 0.2 -6 Si136H120 40.9 41.1 36.9 431 434 406 1 -6 Si147H100 43.5 43.3 39.2 484 481 459 -1 -5 Si159H124 47.2 47.4 42.7 573 578 546 1 -5 Si166H122 49.6 49.2 44.5 627 623 590 -1 -6 Si172H120 50.8 50.8 45.9 661 662 630 0.2 -5 4.2. Linear response 105

4.2.2 Electromagnetic properties of boron fullerenes4 The hollow carbon clusters, or “fullerenes”, were theoretical predictions [174– 176] for two decades, until their discovery in 1985 [177]. Recently, Gonzalez Szwacki et al. [178,179] have predicted the existence of a boron doppelg¨anger of the C60 fullerene: a B80 cage whose experimental detection seems quite likely in the near future. Indeed, the nanotubular boron structures were also suggested by first-principles calculations [180], and later confirmed experi- mentally [181]. In the same vein, we should also mention the new boron sheets proposed in Ref. [182], and the corresponding nanotubes proposed in Ref. [183], that use the same fundamental motif as the B80 cluster. Like C60,B80 has a remarkable stability (as measured, for example, by its cohesive energy), a relatively large energy gap between the highest occupied and lowest unoccupied molecular orbitals (HOMO and LUMO, respectively), and, like C60, almost Ih symmetry. Even though the original work of Gon- zalez Szwacki et al. reported an icosaehedral shape, they acknowledged the existence of several close local minima at distorted geometries. Later it has been defended that the geometry of the most stable structure seems to be a slight distortion of the Ih configuration. Both Gopakamur et al. [184,185] and Baruah et al. [186] further investigated, in detail, the stability of the lowest energy isomers of B80, and claim that the icosahedral structure is unstable; the ground state configuration is reported to have, in fact, Th symmetry. However, the recent work of Sadrzadeh et al [187] has also investigated the issue, and report very small energy differences (lower than 30 meV) between the three lowest lying isomers (Ih, Th, and C1), with the icosahedral shape being, in fact, a close winner.

Unlike C60,B80 accomodates one boron atom in the center of each hexagon, accounting for the extra 20 atoms. This hexagon reinforcement is necessary to stabilize the otherwise unstable icosahedral B60 cage. In this manner, the Aufbau principle proposed by Boustani [188] is respected: stable homoatomic boron clusters are constructed with two basic bricks: hexagonal pyramids, B7 (characteristic of convex and quasi-planar clusters), or pentagonal pyra- mids, B6 (characteristics of open-spherical clusters, such as the prototypical B12). Alternatively, B80 can also be viewed as six interwoven B20 double- rings [178, 179]. The inclusion of staggered double rings in the structure of

4This section corresponds to the article by S. Botti, A. Castro, N. N. Lathiotakis, X. Andrade, and M. A. L. Marques: Optical and magnetic properties of boron fullerenes, Physical Chemistry Chemical Physics 11, 4523 – 4527 (2009). 106 Chapter 4. Applications boron clusters seems to enhance their stability, see Fig. 4.7, where, among other structures, both the B20 double-ring cluster and the B80 are depicted.

B20(ring) B38 B44

B80 B92

Figure 4.7: Structures of the boron cages studied in this work.

The existence of cage-like boron conformations should come as no sur- prise given the rich chemistry of this element: boron nano-structures have been found in very diverse forms – clusters, [189–196] nanowires [197], or nanotubes [181, 198, 199]. The family of boron nano-structures is unlimited, since boron has the property of catenation: it can form structures of arbi- trary size by linking covalent bonds with itself – a property only shared with carbon. In fact, a wide variety of polyhedral clusters containing boron have been known for a very long time, and have been used for a surprisingly large number of applications [200]. The rich diversity can be explained in terms of the high coordination number and the short covalent radius usually exhibited by boron, which leads to the possibility of creating strong directional bonds with many elements. Until experimentalists find a way to produce boron fullerenes, first-principle calculations remain the only route to understand their properties. In this work we report on the linear response signatures of B80 and some of the 4.2. Linear response 107 other stable fullerenes proposed by Gonzalez Szwacki et al.: dynamical po- larisabilities, static dipole polarisability, and magnetic susceptibilities. Furthermore, it is interesting to determine if boron fullerenes share the anomalous magnetic properties present in traditional carbon fullerenes. The nature and magnitude of the electronic ring currents that circulate around the carbon rings are intriguing; Elser and Haddon [201, 202] calculated the contribution of these ring currents to the magnetic susceptibility by making use of London’s theory [203]. The finding was surprising since this contribu- tion was found to be vanishingly small. This result was later backed by the experiment [204]. The measured susceptibility had almost the same value as the estimated local contributions to the diamagnetism, which implies a small ring current contribution. However, this fact does not imply that currents do not circulate around the carbon cycles. The truth is that fullerenes ex- hibit both diamagnetic and paramagnetic ring currents, which cancel each other [205]. This result is surprising if we attempt to explain the ring cur- rent induced magnetism with a more na¨ıve approach – such as Pauling’s model [206]. It also shows the subtlety of the phenomenon of ring currents and its effect on the magnetic susceptibility of clusters. Usually they are linked to the “aromatic” character of a molecule. The “spherical aromatic- ity” of fullerenes [207], in particular, demands for a careful theoretical study of the magnetic response. Boron clusters, including boron fullerenes, also contain rings of delocalized π orbitals, and its aromatic character has also been discussed [208, 209]. It is, therefore, in order to investigate, using an accurate theory, the magnetic properties of the newly proposed B80 and its family of fullerenes. We use the cluster geometries reported by Gonzalez Szwacki et al. [178, 179], which are optimized within the DFT framework with the PBE [26] parametrization. The core electrons were frozen thanks to the ultrasoft Van- derbilt pseudo-potentials [210]. The geometries, which we used without fur- ther relaxation, are depicted in Fig. 4.7. Besides the cage solutions, we include, for completeness, the prototypical B20 ring. We then performed a Sternheimer calculation, as depicted in section 2.4, in order to obtain the static magnetic susceptibilities and electric polarisabili- ties. The optical absorption spectra were obtained using real-time TDDFT.5 The grid spacing was chosen to be 0.18 A,˚ and the simulation boxes were

5The total propagation time was chosen to be 30 ~/eV ≈ 20 fs, and the time step 0.002 ~/eV ≈ 1.3 as. 108 Chapter 4. Applications

Table 4.3: HOMO-LUMO gaps (H-L in eV), ionization potentials calculated through total energy differences (IP in eV), magnetic susceptibilities (¯χ and ∆χ in cgs ppm/mol), static dipole polarisabilities (¯α and ∆α in A˚3), and static dipole polarisabilities per number of boron atoms for the selected boron clusters. For the two latter quantities, we present both average values (e.g., χ¯ = Tr χ/3) and anisotropies (e.g., ∆χ = p[3Tr χ2 − (Tr χ)2]/3).

H-L IPχ ¯ ∆χ α¯ α/N¯ ∆α B20 (r) 1.45 7.5 -250.2 330.1 44.0 2.20 18.2 B38 0.95 7.4 -468.3 37.7 73.8 1.94 12.3 B44 0.96 7.3 -614.4 156.3 83.1 1.89 15.0 B80 1.01 6.6 219.3 3.9 147.9 1.85 0.5 B92 1.07 6.5 -831.3 0.8 162.6 1.77 0.01 built large enough to ensure the convergence of the results – in practice, by placing the box boundaries at least 5 A˚ away from the closest atom. In all calculations, we approximated the exchange and correlation functional by the PBE [26] parameterization. The HOMO-LUMO gaps calculated in this way are shown in Table 4.3, and are in very good agreement with previously published results [178,179]. The magnetic susceptibilities (also given in Table 4.3), show that all clus- ters studied are diamagnetic, except B80, with the absolute value of the susceptibility increasing with the number of atoms. Furthermore, the mag- netic susceptibility tensor is quite isotropic for most fullerene-like clusters, reflecting the global symmetry of these systems. The exception is obvi- ously the ring isomer of B20, and to a lesser extent B44. For B80 we find a completely different situation, with the fullerene being slightly paramagnetic (¯χ = 219.3 cgs ppm/mol). The small absolute value for the susceptibility in- dicates that there is indeed a strong cancellation between the paramagnetic and diamagnetic currents. This value should be compared to C60 which has a susceptibility of about -260 cgs ppm/mol [204, 205]. In the C60 case, the reason for the small diamagnetism is the negligible value of the ring current susceptibility, i.e., the π-electron contribution to the susceptibility. The para- magnetic and diamagnetic ring currents circulating around the pentagons and hexagons, respectively, cancel each other. In the case of B80, the geometry is more complex with boron atoms occupying the center of the hexagons, complicating this simple picture, and leading to a slightly larger value of the 4.2. Linear response 109

4

6 B20 (ring) B38 ) 2 4 2 (Å σ 2

0 0 B B 6 3 44 80 ) 2 2 4 (Å σ 1 2

0 0 1 2 3 4 5 6 E (eV) B 92 9 ) 2 6 (Å σ 3

0 1 2 3 4 5 6 E (eV)

2 Figure 4.8: Absorption cross section (in A˚ ) for B20 (ring isomer), B38,B44, B80 (“slightly-off” Ih), and B92 as predicted by TDDFT. Most of the energy range shown below the calculated ionization potential of these clusters (see Table 4.3). 110 Chapter 4. Applications

HOMO-5 HOMO

LUMO LUMO+2

Figure 4.9: Kohn-Sham states of the B80 clusters. The states HOMO-1, HOMO-2, HOMO-3, and HOMO-4 are nearly degenerate with the HOMO, and very similar to the HOMO. Also, LUMO+1 is similar to LUMO, so it is not displayed here. The magenta (cyan) isosurface corresponds to the positive (negative) parts of the wave functions. 4.2. Linear response 111

paramagnetic current relative to the diamagnetic term. Like for C60, the total value for the magnetic susceptibility of B80 depends strongly on the ge- ometry and, in particular, on the ratio between different B–B bond lengths. Changing the bond lengths alters the equilibrium between the diamagnetic and paramagnetic contributions. Since these contributions are both large and of the same magnitude but with different signs, their sum depends strongly on small variations of their individual values. To study this effect, we calcu- lated the magnetic susceptibility for the three different geometries optimized with the B3LYP functional in Ref. [178]. We found 42.8 cgs ppm/mol for the Ih geometry, 46.2 cgs ppm/mol for the C1, and 29.7 cgs ppm/mol for the Th. The differences can be explained by looking at the different B–B bond lengths. For all structures the length of the bonds connecting the atoms in the center of the hexagons to their neighbors is around 1.70 A˚ (with some dispersion especially in the Th geometry). However, for the other two bond- lengths, dh measuring the side of the hexagons and dp measuring the side of the pentagons, we can see how the different exchange-correlation functionals influence the structure. For the cluster optimized with the PBE functional we find dh ∼ 1.68 A˚ and dp ∼ 1.73 A,˚ while the B3LYP yields a small con- traction of the side of the hexagon to ∼ 1.67 A˚ and a small expansion of the pentagons to ∼ 1.74 A.˚ These are very small differences but, due to the subtle cancellation between the paramagnetic and diamagnetic currents, they lead to a large difference in the susceptibility. Looking at the values for the static polarisability, see Table 4.3, we see that they increase essentially linearly with the number of boron atoms, with a slope of approximately 2 A˚3 per atom. The slope, however, decreases slightly with increasing number of atoms. This simple result reflects the fact that, as all boron atoms in these clusters have a similar chemical environment, the static polarisability is mainly additive and determined by the overall size of the cluster. More insight can be obtained from the dynamical polarisability, in partic- ular from the optical absorption cross section spectra given in Figs. 4.8. The low energy spectrum of the B20 “double ring” isomer [211] is characterized by well defined peaks, and is dominated by one sharp peak at around 4.8 eV – which originates from electron fluctuations perpendicular to the cylinder axis. The absorption strength is suppressed below 4 eV (with the exception of a couple of small peaks) as the low energy transitions are dipole forbidden. The spectra of B38,B44 are not so well defined – there are many peaks whose respective widths overlap, creating a broad, structureless response whose 112 Chapter 4. Applications onset is below 2 eV. This fact can also be rationalized by looking at their geometries: these clusters are less symmetric than all the other structures discussed here (distorted D3 and distorted D3h for B38 and B44, respectively), and have a larger distribution of bond lengths. The most stable of the clusters studied, B80, also has some weak absorption peaks in the visible, although the strongest peaks are positioned at energies higher than 3 eV. Finally, the absorption cross section of the largest fullerene studied here, B92, is qualita- tively similar to B80.

It is interesting to compare the results for B80 to the known absorption spectrum of its carbon counterpart C60. The latter is dominated by a π- plasmon at around 6.3 eV [212] and has a large optical gap of more than 3 eV. This is also the typical absorption spectrum of the planar polycyclic aromatic hydrocarbons [108, 109]. On the other hand, B80 exhibits a much smaller optical gap, of around 1.5 eV, and a much less structured spectrum. This can be explained by two factors. First, the HOMO-LUMO gap of C60 (around 1.6 eV) is larger than the one of B80 (around 1 eV). Looking at the Kohn-Sham states of B80 around the HOMO-LUMO gap reveals the second factor, see Fig 4.9. The HOMO state and the other four states immediately below are located around the three B20 rings and retain a certain “π-like” character, i.e. the wave-functions change sign going from outside to inside the cage. The first occupied state of different character is the HOMO-5, which is mainly located around the pentagons, but spreading considerably to other regions of the cluster. The situation is considerably more complicated for the LUMO states: they are not of “π-like” symmetry and extend over considerable regions of the cluster. It is then clear that the dipole matrix elements between the highest occupied and lowest unoccupied states do not vanish, as it happens, e.g., for the B20 ring. Therefore, absorption starts a bit above the HOMO-LUMO gap.

The physical properties of boron fullerenes, and in particular of the sta- ble B80 are by now fairly well described and understood through theoretical calculations. Unfortunately, these clusters have not been produced exper- imentally yet. It is, however, our belief that, like for C60 and the carbon nanotubes before, the experimental ingenuity will lead to the creation and detection of these interesting nano-structures in the near future. 4.2. Linear response 113

4.2.3 Optical activity6 Certain materials have the property of rotating linearly polarised light. This effect is usually referred to as optical activity and forms the basis of one of the most useful spectroscopic techniques in chemistry, biology and materials science: circular dichroism. In the simplest version of this technique, one probes either the optical rotatory dispersion (ORD) or the electronic circu- lar dichroism (ECD). The former approach consists in the measurement of the change in the angle of polarisation of the incident linearly polarised light as a function of the wavelength. In ECD measurements the target signal is the difference in absorption between right and left circularly polarised light is measured. Due to this difference, an originally linearly polarised light becomes elliptically polarised as it travels through the medium. Molecular chirality (left and right handedness) can, hence, be directly probed. Enan- tiomers, chiral molecules, play a fundamental role in the activity of living organisms, for example, sugars are right-handed and amino-acids are left- handed. Also, pharmaceutical science depends largely on chiral recognition, e.g., thalidomide in its R- specie is effective against morning headaches in pregnant women but the S- enantiomer produces fetal deformations. There- fore, the determination and control of the absolute configuration of chiral molecules is of paramount importance. For example, ECD in the ultraviolet is used to determine protein secondary structures [213] and the helical struc- ture of nucleic acids [214] in vacuo. This powerful and sensitive spectroscopic tool can be extended beyond chiral molecules by placing the target molecule in a magnetic field so that it becomes optically active. This technique is known as magneto-chiral dichroism or magnetic circular dichroism (MCD). It was early recognized that the formulation and implementation of an efficient and predictive theoretical scheme to address chiroptical properties in different molecular systems would be instrumental in important fields of science. In fact, experimental spectra are often hard to interpret, and their comparison to theoretical models becomes essential to unveil the relevant structural and dynamical information about the system. It is not surprising, therefore, that a considerable amount of effort has been devoted in the past decades in the development of such theoretical schemes [215–217].

6This section is part of the article by D. Varsano, L. A. Espinosa Leal, X. Andrade, M. A. L. Marques, R. di Felice, and A. Rubio: Towards a gauge invariant method for molecular chiroptical properties in TDDFT, Physical Chemistry Chemical Physics 11, 4481 – 4489 (2009). 114 Chapter 4. Applications

In the present work, we follow the approaches based on two different TDDFT formulations, real-time propagation and Sternheimer linear response as introduced in section 2.7. We show that the enforcement of gauge invari- ance, as introduced in section 2.6.2 is fundamental to get a reliable description of the molecular dichroic response. The two approaches, real-time and Sternheimer, are used for distinct purposes. For the calculation of ECD spectra, related to the imaginary part of ξ¯, the two methods give equivalent results. Here we present the results of the time-propagation, which is computationally more efficient than the Sternheimer approach. For the real part of ξ¯, related to the ORD, we used the Sternheimer approach, because time-propagation results lack the required numerical precision.7 For all systems we used the same set of simulation parameters that ensure a proper convergence of the results.8 We have observed that these parameters are more strict than what is required for total energy or optical absorption calculations. As a first test case, we have chosen the enantiomeric species methyloxi- rane (also known as propylene oxide). Methyloxirane is one of the most typical benchmarks for optical activity calculations, and it has been exten- sively studied in the past with different ab-initio techniques [219, 220]. The structure of R-methyloxirane was taken from Ref. [221], where it was opti- mized at the SCF level using a 4-31G* basis-set and considering all degrees of freedom, with the exception of the C–H bond length.9 The absorption and ECD spectra calculated in the time-propagation scheme are shown in Fig. 4.10. The spectra show the correct features ex- pected for two enantiomeric species, i.e. an identical absorption spectrum (top panel) and ECD spectra with opposite signs at all frequencies (bottom panel). When compared with experimental results (center panel in Fig. 4.10)

7The real part as obtained from a direct Fourier transform of the angular momentum is very unstable below the first excitation. This was also observed in Ref. [218] where a Kramers-Kroning transformation of the imaginary part was used to get the real part. 8The grid was constructed considering overlapping spheres with a radius of 8.0 A˚ cen- tered around each atom with a grid spacing of 0.20 A.˚ For the time-propagation scheme a Lanczos exponential method was used with a time-step of 0.02 ~/eV and a total time of 24 ~/eV. 9This structure was adopted so that our results are exactly comparable to those theo- retical data. However, we also computed the optical spectra for a structure relaxed at the (B3LYP/cc-pVTZ) level, obtaining no significant deviations relative to the results shown in Fig. 4.10. 4.2. Linear response 115 the calculations yield the correct shape and the correct sign in the ECD. The spectral positions of the peaks are underestimated by about 1.0 eV relative to the experimental data. This underestimation of the lowest excitation energies has already been discussed (see for example Refs. [219, 222] and Ref. [223]) and can be probably ascribed to the approximation in the exchange and correlation functional (we return to this point later). The real part of ξ was studied using the Sternheimer scheme for an en- ergy range between 0 and 4 eV. The results are detailed in Fig. 4.11, along with some reference theoretical and experimental data. In this case we have also studied the impact on the optical results of using different exchange- correlation functionals in the ground-state calculations. In particular, we have determined the ground state of the molecule by using two different functionals, namely LDA and exact exchange within the KLI approximation (EXX-KLI) [224, 225]. The adiabatic LDA kernel was used in both cases to take into account the exchange and correlation effects in the response. We can see in Fig. 4.11 that our calculations agree in shape and order of magnitude with the reference calculations and experimental results. The EXX-KLI/ALDA approximation is in agreement with the experimental value at 3.49 eV but not with the one at 2.1 eV, where B3LYP and Hartree-Fock calculations perform better, mainly due to the larger gap [226]. We now present the calculated ECD spectra for three different alkene molecules: trans-cyclooctene, β-pinene and α- pinene. These molecules were chosen due to availability of gas-phase experimental data of ECD in a large range of frequencies (5–9 eV)10 and of quantum-chemistry and TDDFT re- sults. Hence, they constitute a valid benchmark to evaluate the performance of the computational scheme described in this article. The structures of the molecules are taken from the supporting information of Ref. [230], and were obtained via Monte Carlo searching and subsequent relaxation using DFT at the B3LYP/6-31G* level. The calculated rotatory strength functions are shown and compared with experimental data in Figs. 4.12, 4.13, and 4.14. The most important bands that constitute the ECD spectra are indicated with capital letters. For all molecules studied here, the calculated rotational strength function presents a very good qualitative agreement for what concerns both the sign and the

10Our calculations do not take into account the solvent, while most experiments are done in solution. Therefore, for a benchmark of our theory the existence of experimental gas-phase data is compelling. 116 Chapter 4. Applications

0.24 (R)-methyloxirane 0.2 (S)-methyloxirane Exp. (R)-methyloxirane Exp. (S)-methyloxirane 0.16

0.12

0.08

Cross Section [Arb. Units.] 0.04

12 (R)-methyloxirane A

) 8 -1

cm 4 -1

0 (L M (S)-methyloxirane ∆ε -4

ECD -8 B

-12 A 4

) 2 3 (A

3 0

Rx10 -2

-4 B

5 6 7 8 9 Energy [eV]

Figure 4.10: Top panel: Calculated absorption spectrum for R- (red solid) and S- (blue dotted) methyloxirane. For comparison the experimental re- sults [221] (green dashed-dotted) are given. Center panel: Experimental results for the ECD of R,S-methyloxirane species (green-dotted-dashed and black-dotted, respectively) reproduced from Ref. [221]. Bottom panel: Cal- culated ECD of R,S-methyloxirane species (red solid and blue dotted lines, respectively). The results obtained with the Sternheimer equation are indis- tinguishable from those reported here from time-dependent propagation. 4.2. Linear response 117

0.003 ALDA KLI/ALDA 0.002 Experimental [34,35] Hartree-Fock [21] B3LYP [21] ]

4 0.001 [Å β

Re 0

-0.001

-0.002 0.5 1 1.5 2 2.5 3 3.5 4 Energy [eV] Figure 4.11: Calculated Re ξ¯(ω) for S-methyloxirane using two different exchange and correlation potentials, LDA (solid-blue) and EXX-KLI (dotted- red), for the ground state Hamiltonian (in both cases the adiabatic LDA kernel was used for the response). For comparison, experimental values at 2.1 eV [227] and 3.49 eV [228] (black dots), as well as Hartree-Fock (green- dashed) and B3LYP (indigo-dashed-dotted) [229] computed data, are given. shape of the spectra. The experimental peaks are often due to a superposi- tion of several electronic transitions, and for this reason the calculated spectra (bottom panels of Figs. 4.12–4.14) are shown for two values of broadening given by the parameter δ of Eq. (2.85): the larger one (solid red) is adopted to simulate the bandwidth of the experiments,11 the smaller one (dotted blue) is adopted to resolve the underlying excitations beneath each peak. Looking at the position of the excitation energies, we observe a systematic underesti- mation with respect to the experimental value, ranging from 0.7 eV to 0.8 eV

11Beside the superposition of different excitations that are not resolved in the experi- ment, the bandwidth is also determined by temperature and vibrionic effects that are not taken into account in our work 118 Chapter 4. Applications

40 A 30 Experiment 20 ) -1 10 B cm -1 0 (M Δε -10

ECD -20

-30 C 12 δ = 0.17 δ = 0.10 8 A

) 4 3 B (A

3 0

Rx10 -4

-8 C -12 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 Energy [eV]

Figure 4.12: Computed ECD Spectrum of S-trans-cyclooctene (bottom) and experimental results for the same molecular species in the gas phase (top). The theoretical rotatory strength function (red-dashed, blue-dotted) was calculated for two different values of the broadening, as detailed in the legend. The experimental data is reproduced from Ref. [231] 4.2. Linear response 119

15 Experiment A 10 )

-1 5

cm C -1 0 (M Δε -5 ECD

-10

B D 8 δ = 0.17 δ = 0.10 A 4 C ) 3 (A

3 0

Rx10 B -4

D -8

4 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 Energy [eV]

Figure 4.13: Computed ECD Spectrum of 1S,5S-β-pinene (bottom) and ex- perimental results for the same molecular species in the gas phase (top). The theoretical rotatory strength function (red-dashed, blue-dotted) was calcu- lated for two different values of the broadening, as detailed in the legend. The experimental data is reproduced from Ref. [231] 120 Chapter 4. Applications

10 B D 5 Experiment )

-1 0 cm

-1 A -5 (M Δε

-10 ECD

-15 C

4 δ = 0.17 δ = 0.10 D 2

) B 3 (A

3 0

Rx10 A -2 C -4

4.5 5 5.5 6 6.5 7 7.5 8 8.5 Energy [eV]

Figure 4.14: Computed ECD Spectrum of 1R,5R-α-pinene (bottom) and experimental results for the same molecular species in the gas phase (top). The theoretical rotatory strength function (red-dashed, blue-dotted) was cal- culated for two different values of the broadening, as detailed in the legend. The experimental data is reproduced from Ref. [231]. 4.2. Linear response 121 for the first peak, and a similar trend for the rest of the spectra. The effect of the ground state geometry on the ECD spectrum for these systems has been investigated in detail by McCann and Stephens [230], concluding that it plays only a minor role. This discrepancy should, therefore, be ascribed to another source. The most probable origin is the approximation used for the exchange and correlation functional. McCann and Stephens [230] also showed that the excitation energies strongly depend on the used functional for these molecules, observing a systematic underestimation by 0.3–0.4 eV relative to experimental data when the B3LYP functional is used. The same effect is observed for α-pinene in Ref. [232], where an underestimation by 0.53 eV and 0.33 eV is found using the BP86 [24, 233] and B3LYP [234] function- als, respectively. BHLYP [24,235] and post Hartree-Fock methods (Coupled Cluster CC2 and Multi-reference MP2) usually overestimate the frequencies of the peaks. It is not surprising that we observe the same trend of under- estimating the frequencies in our work. The lowest excitations of the alkene molecules, for example, contain a large participation of Rydberg states that are not well described by the functional used here due to the lack of the 1/r tail in the potential. Indeed using a potential behaving as 1/r, improved re- sults may be obtained, yet not in quantitative agreement with experimental data. In our case, what is remarkable is that, in spite of the fact that the spectra are shifted, the relative differences of excitation energies, as well as the relative intensities, are well reproduced. Apart from the systematic red- shift of the peaks, our method reproduces all the main experimental features for the studied molecules, even for the high-energy part of the spectrum. For the trans-cyclooctene molecule, Fig. 4.12, we obtain the main ex- perimental features, namely the positive peak A, the shoulder B and the huge negative peak C. Both B and C are critical to reproduce in calcula- tions. For instance, Diedrich and Grimme [236] were not able to reveal these fingerprints by a TDDFT calculation using the sum over states and the BH- LYP hybrid functional. Instead, in the same reference they attained a very good agreement with the experimental results by using a multi-reference CI method. Also, for the β and α-pinene, Figs. 4.13 and 4.14, we observe the correct sign and shape of the peaks. Our computed ECD spectrum for β-pinene is very similar to the results of a B3LYP calculation [230]. For α-pinene pre- vious B3LYP [230,232] and CC2 [232] calculations predicted a huge positive and negative peak, respectively, around 7 eV, which is not present in the experimental data. Instead, we are able to reproduce the plateau at high en- 122 Chapter 4. Applications ergy (D), which becomes evident by using a broadening factor of δ=0.2 eV. The better agreement is due to the several factors that differentiate our method from a sum over states formulation in a basis set representation: the systematic convergence of the discretization parameters that ensure that the electronic system will not be artificially constrained, the fact that the present method does not require unoccupied states, and finally, the inclu- sion of self-consistency effects of the Hartree and exchange and correlation kernels.

4.2.4 Conclusions We have presented several different applications of the linear response theory that we have developed and implemented. The applications cover a range of electromagnetic properties beyond the commonly calculated optical re- sponse. The two TDDFT formalisms we apply are complementary. In some cases it is more convenient to use time-propagation, e.g. when a full spec- trum is desired, and in other situations Sternheimer linear response is more appropriate, e.g. for low frequency or static properties. The results of our calculations are generally in good agreement with ex- periments when experimental data is available, especially looking at the shapes of the spectra. However, some of the shortcoming of TDDFT ap- pear, especially in the quantitative description of excitation energies where a better description of the exchange and correlation effects beyond present functionals is required in some cases. Note, however, that our method is general and not restricted to any given functional. In the future, we need to develop a method to treat the response to time-dependent magnetic per- turbations while including non-local pseudo-potentials. This will allow us to calculate dynamical magnetic susceptibilities or other dynamical response properties with a magnetic component. 4.3. Non-linear response 123 4.3 Non-linear response

In this section we apply our method for non-linear response calculations, introduced in section 2.5.2, to some small molecules for which experimental results are available. Given its importance, we explore the results for the chloroform molecule in detail.

4.3.1 Electric polarisabilities and hyperpolarisabilities of small molecules: CO, H2O and paranitroani- line12 We illustrate the implementation of the Sternheimer method for linear and non-linear electric response by applying it to some simple molecules that have been well studied both experimentally and theoretically: CO, H2O, and paranitroaniline (PNA). In all our calculations we took the experimen- tal geometries13 and selected the grid parameters so hyperpolarisabilities are converged to better than 1%.14 As expected, the simulation boxes required to converge the hyperpolarisabilities were much larger than the ones typically used in ground-state calculations, as these quantities have sizeable contribu- tions from the regions far away from the nuclei. The required simulation box size also depends on the frequency of the perturbation, being larger for higher frequencies. Finally, we used the LDA to approximate the exchange- correlation functional. We start our discussion with CO. The results for static properties are displayed in Table 4.4. The results fully agree with the other DFT-LDA calculations. Compared to more sophisticated quantum chemistry methods,

12This section is part of the article by X. Andrade, S. Botti, M.A.L. Marques, and A. Rubio, A time-dependent density functional theory scheme for efficient calculations of dynamic (hyper)polarizabilities, Journal of Chemical Physics 126 184106 (2007). 13 ˚ ˚ ˆ o rCO = 1.13 A; rHO = 0.957 A, ∠HOH = 104.5 ; the experimental geometry of PNA determined through X-ray crystallography can be found in Ref. [237]. There are two CH distances missing from the crystallographic data. For these we followed Ref. [238] and took their theoretical values (see Table 1 of Ref. [239]). In all cases, the dipole moment of the molecule was taken perpendicular to the z axis, for H2O the molecule was considered in the yz plane, and in the case of PNA it was taken in the xz plane. 14We used a simulation box composed of spheres centered at each atomic position, with a radius of 9.5 A˚ for CO, 7.4 A˚ for H2O and 5.3 A˚ for PNA. The points were distributed in a regular grid with spacing 0.20 A˚ for CO, 0.17 A˚ for H2O, and 0.19 A˚ for PNA. 124 Chapter 4. Applications

Table 4.4: Comparison of static polarisabilities and hyperpolarisabilities for CO. Results are in atomic units. aFinite differences results from Ref. [240]. bExperimental result from Ref. [241]. cLDA basis set results from Ref. [242]. dExperimental result from Ref. [243]. eLDA basis set results from Ref. [244].

This work LDA HFa MP4a CCSD(T)a Exp. µ 0.0631 -0.1052 0.0905 0.057 0.0481b αxx 12.55 11.25 12.00 11.97 αzz 15.82 14.42 15.53 15.63 α¯ 13.64 13.87c 12.31 13.18 13.19 13.09d e βxxz 8.35 8.24 5.0 8.3 8.4 e βzzz 33.34 33.52 31.1 28.3 30.0 e βk 30.03 30.00 24.8 27.0 28.0 the LDA overestimates the values for the polarisabilities and the hyperpo- larisabilities. This, as mentioned before, comes from a deficiency in the asymptotic region of the LDA potential. We now turn to the dynamic properties. In Fig. 4.15 we plot the ab- sorption cross section of the CO molecule obtained with our approach, and compare it to the spectrum obtained through the direct solution of the time- dependent Kohn-Sham equations in real-time. As expected, the two calcu- lations agree perfectly, which validates our numerical implementation of the Sternheimer equations. Note that, even if both methods have identical scal- ings, the solution of the Sternheimer equation still has a larger prefactor if the whole spectrum is required. This is due to the ill-conditioning of the linear system close to resonances. From Fig. 4.15 it is clear that the two theoretical results are red-shifted with respect to the experimental curve. In Fig. 4.16 we present our calculation of the second harmonic generation spectrum, β||(−2ω; ω, ω), of CO, together with the available experimental results [247] and previous theoretical data [238]. Our results agree very well with previous DFT results using the LDA. We can also see that the use of the generalized gradient approximation BLYP [24, 235] does not change signifi- cantly the results. Using a hybrid functional, the B3LYP functional [234], does reduce the error, while Hartree-Fock (HF) results underestimate the value for the hyperpolarisability. The best results are, as expected, obtained by coupled cluster calculations using singles and doubles (CCSD).

Now we turn to the H2O molecule. To test our implementation, we show, 4.3. Non-linear response 125

2.5 exp. (arb. units) 2 Sterheimer Real Time 1.5 [a.u.] 1 σ(ω)

0.5

0 0 2 4 6 8 10 12 ω [eV] Figure 4.15: Average photo-absorption cross section of the CO molecule, calculated within the adiabatic LDA. The line corresponds to the results obtained through the solution of the Sternheimer equation, while the dots are obtained by solving the time-dependent Kohn-Sham equation in real-time. Low resolution experimental absorption cross-section from Ref. [245]. For a more detailed comparison, the relevant experimental excitation energies are at: 8.51 eV (A1Π), 10.78 eV (B1Σ+), 11.40 eV (C1Σ+), and 11.53 eV (E1Π) [245,246]. 126 Chapter 4. Applications

1200 Exp. 40 This work 1000 LDA 35 BLYP 800 B3LYP HF

[a.u.] 30 600 CCSD 400 25 0 1 2 3 4 5 (−2ω;ω,ω)

|| 200 β 0 −200

0 2 4 6 8 10 12 2ω [eV]

Figure 4.16: Second harmonic generation β||(−2ω; ω, ω) of CO. The inset shows a comparison of the results of this work (TDLDA) with other available results. Exp: Experimental results from Ref. [247]; HF: Hartree Fock results from Ref. [238]; LDA, BLYP, B3LYP: DFT results from Ref. [238]; CCSD: Coupled cluster results from Ref. [238].

Table 4.5: Tensor components for second harmonic generation β(−2ω; ω, ω) a of H2O. Basis set calculations from Ref. [238]. ω =0.00 eV ω =1.79 eV ω =1.96 eV This work LDAa This work LDAa This work LDAa

βzzz -21.23 -19.14 -27.67 -25.22 -29.37 -26.81 βzxx -9.84 -8.82 -12.89 -11.45 -13.68 -12.11 βxxz -9.84 -8.82 -16.87 -15.57 -19.28 -17.90 βzyy -12.08 -11.67 -14.94 -14.39 -15.68 -15.09 βyyz -12.08 -11.67 -14.48 -13.99 -15.06 -14.56 4.3. Non-linear response 127

Table 4.6: Comparison of (hyper)polarisabilities of H2O for different DFT calculations, dynamic results for ω = 1.79 [eV]. CCSD(T) and experimental values are given as reference. aGrid based calculations from Ref. [89]; bBasis set calculations from Ref. [238]; cResults from Ref. [248]; dExperimental result from Ref. [249]; eExperimental result from Ref. [250];

α(0, 0) βk(0; 0, 0) βk(0; ω, −ω) βk(−2ω; ω, ω) This work (TDLDA) 10.51 -25.89 -28.33 -34.71 This work (KLI/ALDA) 8.61 -11.75 -12.43 -14.03 LDAa 10.5 -26.1 -28.6 -35.1 BLYPa 10.8 -27.9 -30.9 -38.8 LB94a 9.64 -17.8 -17.7 -20.3 LDAb 10.63 -23.78 -26.09 -32.12 BLYPb 10.77 -23.65 -26.11 -32.76 B3LYPb 9.81 -18.54 -20.11 -24.11 HFb 8.53 -10.73 -11.27 -12.52 CCSD(T)c 9.79 -18.0 -19.0 -21.1 exp. 9.81d -22±9e in Table 4.5, the different components of the hyperpolarisability tensor for ω = 0 eV, 1.79 eV, and 1.96 eV. We see that our results compare well to previous theoretical work [238]. The small difference can be explained by the different numerical methodologies, real-space grid and pseudo-potentials in our case and basis sets in Ref. [238]. In Table 4.6 we show the static polarisability, α(0, 0), the static first hy- perpolarisability, βk(0; 0, 0), the optical rectification, βk(0; ω, −ω), and sec- ond harmonic generation, βk(−2ω; ω, ω) for water. All dynamic values were calculated for ω = 1.79 eV. This time we have also included results with the orbital dependent exact-exchange potential, in the KLI approximation, combined with the ALDA exchange-correlation kernel. Concerning the LDA values, we can also see that our results fully agree with the results of Ref. [89] that also uses a grid based representation, while basis-set results from Ref. [238] differ by less than 10%. We can see that all LDA and BLYP values overes- timate the magnitude of (hyper)polarisabilities with respect to experiment and coupled cluster calculations. The use of more sophisticated exchange correlation functionals, like LB94 or B3LYP, improves significantly the re- sults, while the KLI/ALDA scheme underestimates the magnitude of (hy- 128 Chapter 4. Applications per)polarisabilities similar to Hartee-Fock results.

25000 70 20000 60 50

[a.u.] 15000 40 30 10000 20 (0;ω,−ω)

|| 0 1 2 3 4 5 −β 5000

0 0 2 4 6 8 10 ω [eV]

Figure 4.17: Calculated optical rectification βk (0; ω; −ω) of H2O.

To conclude the discussion of water results, we plot, in Fig. 4.17, the fre- quency dependence of the optical rectification in the visible and near ultravio- let regimes. It is clear that our method not only works for small non-resonant frequencies but also in the more complicated resonant regime.15 Finally, we turn to a larger molecule: paranitroaniline. Our results for the second harmonic generation process in this molecule are given in Fig. 4.18. There are two experiments available: i) a gas phase experiment [101] per- formed for a single frequency; and ii) paranitroaniline in solvent for sev- eral frequencies [251]. The latter were corrected for the presence of the solvent, but this correction is clearly incomplete as the value from Ref. [251], ω = 1.17 eV, is still 10% larger than the gas phase measurement [101]. We include also other theoretical values using DFT [244, 252] and CCSD [238].

15We note that we have not included the ionic contribution to the non-linear response and that might be large for water structures. 4.3. Non-linear response 129

15000 exp. solv. 10000 This work

5000 [a.u.]

0 (−2ω;ω,ω) ||

β −5000

−10000

0 1 2 3 4 5 2ω [eV]

6000 exp. solv. 5000 exp. gas 4000 This work LDA/ALDA

[a.u.] 3000 LB94/ALDA 2000 B3LYP

(−2ω;ω,ω) CCSD || β

1000

0 0.5 1 1.5 2 2.5 3 2ω [eV]

Figure 4.18: Second harmonic generation β||(−2ω; ω, ω) of paranitroaniline. Note that the y axis in the bottom panel is in logarithmic scale. exp. solv.: Solvent phase experimental results from Ref. [251]; exp. gas: Gas phase experimental results from Ref. [101]; LDA/ALDA, LB94/ALDA: DFT basis set results from Ref. [244]; B3LYP: DFT basis set results from Ref. [252]; CCSD: Coupled cluster results from Ref. [238]. Some references use a differ- ent convention to define hyperpolarisabilities, all the values shown here have been converted to convention AB [94]. 130 Chapter 4. Applications

We can observe that our results underestimate the solvent experimental re- sults by about 15% for all available frequencies. In comparison, B3LYP and CCSD results are seriously too small at high frequencies, with values that are around 40-50% smaller than experiment. We think that the reason for this discrepancy is the better description of the hyperpolarizabilities near resonance within our method. Furthermore, we use a grid based representa- tion that describes better the regions far from the nuclei in comparison with localized basis sets, allowing for larger flexibility in capturing the dynamic changes in the wave functions.

4.3.2 The hyperpolarisability of chloroform16

Chloroform (CHCl3) is a widely used solvent in measurements of non-linear optical properties of organic chromophores, using techniques such as electric- field-induced second-harmonic generation (EFISH) and hyper-Rayleigh scat- tering (HRS) [101, 102]. It is sometimes also used as an internal reference. Thus for calibration purposes either absolute measurements or ab initio cal- culations are needed to convert between the different combinations of ten- sor components of the hyperpolarisability measured in the EFISH and HRS experiments. However, older calculations which have been recognized as unsatisfactory by their authors [87] have heretofore been used for such con- versions [101]. Consequently, there is a need for more accurate ab initio calculations. Compared to typical experimental errors, the hyperpolarisability of chlo- roform is relatively small, and the available measurements have both positive and negative values, with large error bars [101,253]. Similarly, this non-linear property has proved to be quite difficult to calculate theoretically, and ex- hibits a large dependence on the quality of the basis set used, both for DFT and coupled-cluster methods [254, 255]. In this section we investigate the reasons for these difficulties using real-space grids. Our best results point to the need for a well balanced description of all

16This section is part of the article by F. D. Vila, D. A. Strubbe, Y. Takimoto, X. An- drade, A. Rubio, S. G. Louie, and J. J. Rehr, Basis set effects on the hyperpolarizability of CHCl3 : Gaussian-type orbitals, numerical basis sets and real-space grids, recently ac- cepted for publication in Journal of Chemical Physics (arXiv:1003.5878v1 [physics.chem- ph]). Here we only present the results based on our real-space grid implementation and refer to the publication for a comparison with calculation using basis sets (Gaussians and numerical atomic orbitals). 4.3. Non-linear response 131 regions of the system, i.e. the outlying regions of the molecule, the short C-H bond and the Cl atoms. A key finding is that the local contributions to the βzzz response of the Cl atoms and the C-H bond are of opposite sign and tend to cancel, thus explaining the relatively slow convergence of this component with respect to the basis-set size. This behavior, together with the near cancellation of the βyyz and βzzz components, leads to the relatively small value of βk of chloroform. By contrast, the HRS hyperpolarisability converges much more easily since it is an incoherent process and is mostly a sum of squares of tensor components that do not cancel. Unless noted explicitly, the experimental molecular geometry from Ref. [256] was used throughout this work: rCH = 1.080 A,˚ rCCl = 1.760 A,˚ and ∠HCCl = 108.23 deg. The center of mass of the molecule was located at the origin, and was oriented with the CH bond along the positive z-direction and one HCCl angle in the yz-plane. Since chloroform has C3v point-group symmetry, the following symmetry relations hold: αxx = αyy, βxxy = −βyyy, and βxxz = βyyz. In the static case Kleinman symmetry [257] also applies. Thus the αyy, αzz, βyyy, βyyz, and βzzz components fully describe the polaris- ability and hyperpolarisability tensors; all other permutations of the indices are equivalent. In the dynamic case at non-zero frequency, however, the com- ponents of βijk (−2ω; ω, ω) are not all equivalent: βyyz = βyzy 6= βzyy. We use the Taylor convention for hyperpolarisabilities [94]. From our data we can calculate the isotropically averaged polarisability 1 P α¯ = 3 i αii and the EFISH hyperpolarisability in the direction of the dipole 1 P moment βki = 5 j (βijj + βjij + βjji). In the C3v point group, these rela- 1 3 tions reduce toα ¯ = 3 (2αyy + αzz), βkz = 5 (2βyyz + βzzz). We also calculate the hyperpolarisability for hyper-Rayleigh scattering in the VV polarisation, as given by Cyvin et al. [100] for the static case (where Kleinman symmetry holds) and the generalization of Bersohn et al. [258] for the dynamic case. In the static case, for C3v symmetry,

2 8 1 24 12 βVV  = β2 + β2 + β2 + β β . (4.6) HRS 35 yyy 7 zzz 35 yyz 35 yyz zzz This quantity has only been measured for liquid chloroform [101]; measure- ments are not available for the gas phase. The polarisability and hyperpolarisability were calculated using a real- space grid by linear response via the Sternheimer equation and the 2n + 1 theorem as explained in chapters 2 and 3. The molecule was studied as a finite system, with zero boundary conditions on a large sphere surrounding 132 Chapter 4. Applications the molecule, as described below. Convergence was tested with respect to the spacing of the real-space grid and the radius of the spherical domain. The grid spacing required is determined largely by the pseudopotential, as it governs the fineness with which spatial variations of the wave-functions can be described, as well as the accuracy of the finite-difference evaluation of the kinetic-energy operator. The sphere radius determines the maximum spatial extent of the wave-functions. With tight numerical tolerances in solving the ground state and the Sternheimer equation, we can achieve a precision of 0.01 au or better in the converged values of the tensor components of β. For comparison to the non-linear experiments, which used incoming photons of wavelength 1064 nm (1.165 eV), we also performed dynamical calculations at this frequency.

Structure Although all the results, presented here, were obtained for the experimental geometry determined by Colmont et al. [256], we briefly discuss the effect of the structural parameters on the dielectric properties. We compare prop- erties obtained for experimental structures [256, 259] with theoretical struc- tures optimized using the PBE functional, one obtained with the 4Z basis in Gaussian03 [254], and the other with a real-space grid in Octopus. The parameters for each structure are listed in Table 4.7. Our calculations show that the dipole moment and polarisability are not affected much, but the hy- perpolarisability varies significantly with structure, see Table 4.8. Individual tensor components of the hyperpolarisability do not change by more than ∼30%, but since βk is a sum of large positive and negative components, it can change sign, and change by orders of magnitude depending on the struc- ture. Note, however, that all geometries give results consistent with the large relative error bar on the gas-phase experimental value of 1 ± 4 a.u. [101].

(Hyper)polarisabilities Convergence of the dipole moment, polarisability, and hyperpolarisability is illustrated in Table 4.9. The total energy was well converged for a spacing of 0.35 a0 (equivalent plane-wave cutoff = 20 Ry) and a sphere radius of 12 a0. The dipole moment was also well converged with that basis. However, to con- verge βk to better than 0.01 a.u., a spacing of 0.25 a0 (equivalent plane-wave cutoff = 40 Ry) and a sphere radius of 22 a0 was required. The convergence 4.3. Non-linear response 133

Table 4.7: Structural parameters used in the study of the variation of the dielectric properties of CHCl3 with structure. Bond lengths are in A˚ and angles in degrees. The experimental structure from Ref. [256] was used for all our subsequent calculations.

Source r(C-H) r(C-Cl) ∠ HCCl Jen expt. [259] 1.100 ± 0.004 1.758 ± 0.001 107.6 ± 0.2 Colmont expt. [256] 1.080 ± 0.002 1.760 ± 0.002 108.23 ± 0.02 PBE/4Z [254] 1.090 1.779 107.7 PBE/RS 1.084 1.769 107.6

of the tensor components of β is similar to that of βk in absolute terms, i.e. they are also converged to 0.01 a.u. or better with these parameters. Gen- erally, the magnitude of βk decreases with smaller spacing and larger radius as the cancellation between the tensor components improves. Finite-differences calculations were done with the converged grid spac- ing of 0.25 a0, and a sphere radius of 22 a0, for comparison to the Stern- heimer calculation with the same grid parameters. The differences between the linear-response and finite-difference calculations are small, showing that the field strength of 0.01 a.u. is indeed in the linear regime. The linear re- (1) sponse density ρz (r) and polarisability density αzz(r) are virtually identical between the finite-difference and linear-response calculations. Calculations at 1064 nm with the same grid parameters show increases of about 1% in the polarisability, and 10-20% in the hyperpolarisability, as compared to the static case. We find a small violation of Kleinman symmetry here, in that βyyz = -18.945 a.u. whereas βzyy = -19.448 a.u..

Linear and non-linear response densities The origin of the slow convergence of the response properties is difficult to determine just by analyzing their total values for different basis sets. We have found that the differences and similarities between those values can be visu- alized by computing the real-space distribution of the linear and non-linear response densities, as well as the associated polarisability and hyperpolaris- ability densities. The first-order response density is defined as

(1) ∂ρ ρz (r) = , (4.7) ∂Ez 134 Chapter 4. Applications ausaei tmcunits. atomic in are values nara-pc rdwt ais17 radius CHCl with ‡ for grid real-space structures a various on of properties Dielectric 4.8: Table e.[6]and [261] Ref. Structure B/S0376.5 7182.9 1.6 8946.4 .4 16.964 0.242 60.145 28.924 16.787 -14.262 -0.272 27.291 60.566 16.890 47.118 27.763 -0.209 17.443 66.658 -14.110 59.832 -3.485 27.231 28.471 59.680 0.409 47.349 -14.407 26.921 0.397 67.174 27.094 -16.363 47.224 27.123 66.136 46.995 0.401 66.022 0.395 Expt. 0.399 PBE/RS [254] PBE/4Z [256] expt. Colmont [259] expt. Jen ? e.[0] ftedpl oetadteeetoi otiuint h oaiaiiy All polarisability. the to contribution electronic the and moment dipole the of [101]) Ref. ± µ z 0.008 a 0 † n pcn 0.25 spacing and 61 α ± yy 5 ‡ 45 α ± zz 3 ‡ a 0 oprdwt h xeietlvle ( values experimental the with compared , β yyy 3 ecie nTbe47 scluae yDFT by calculated as 4.7, Table in described β yyz β zzz 56 ± β α ¯ 4 ‡ 1 ± k 4 † ? e.[260], Ref. β HRS VV 4.3. Non-linear response 135 VV HRS β ? z 4 k ± 1 ‡ 4 ¯ α β ± 56 ) on the components of the dielectric h zzz β yyz β and spacing R yyy β ‡ 3 zz ± α 45 ‡ Ref. [101]). All values in atomic units. 5 ? yy ± α 61 † 0.008 z calculated with the PBE functional and LDA kernel and compared with experimental ± Ref. [261] and ‡ 3 Ref. [260], † R h µ 1215 0.2517 0.2520 0.25 0.39822 0.25 0.39917 0.25 0.399 65.92117 0.35 0.399 46.924 66.01917 0.30 27.975 0.399 46.993 66.02217 -17.232 0.25 27.159 0.397 46.995 66.023 22.975 -16.401 0.20 27.123 0.399 46.995 66.023 59.589 26.758 -16.363 27.119 0.399 46.995 -6.921 66.032 59.677 26.921 -16.358 27.119 17.106 0.398 47.002 -3.629 66.029 59.680 26.940 -16.358 27.181 17.461 46.989 -3.485 66.022 59.680 26.940 -16.233 27.168 17.443 46.995 -3.469 66.021 59.680 26.921 -16.357 27.123 17.441 46.993 -3.468 59.689 26.893 -16.363 27.091 17.441 -3.351 59.683 26.921 -16.355 17.415 -3.492 59.680 26.903 17.455 -3.485 59.678 17.443 -3.488 17.427 Expt. 0.409 Table 4.9: Effect of the real-space-grid quality (radius properties of CHCl values ( 136 Chapter 4. Applications

and the linear polarisability density αzz (r) as

(1) αzz (r) = ρz (r) z. (4.8)

The second-order response density and associated hyperpolarisability density are defined similarly: 2 (2) ∂ ρ ρzz (r) = 2 , (4.9) ∂Ez (2) βzzz (r) = ρzz (r) z. (4.10) These response densities are all calculated by finite differences. Since the Sternheimer approach, as currently formulated, provides only the linear re- sponse density and polarisability density, but not the non-linear response and hyperpolarisability densities as defined here.17 (1) Figure 4.19 shows the linear response density ρz (r) and the polarisabil- ity density βzzz(r) calculated with the PBE functional. The polarisability density reveals the spatial contributions to the total polarisability. For the most part, this property is localized to within ∼ 6 a.u. of the center of the molecule, explaining its quick convergence with respect to the radius of the (2) box. The spatial distributions of the non-linear response density ρzz (r) and hyperpolarisability density βzzz(r) are shown in Figure 4.20. The hyperpo- larisability density is more delocalized than the polarisability, extending up to ∼ 8 a.u. from the center, thus stressing the importance of the description of a large region around the molecule. The discrepancy between the experimentally determined linear polaris- ability and our theoretical results, see Table 4.9, is essentially eliminated when the vibrational component is accounted for. Then the agreement is quite good. Our hyperpolarisability results are consistent with the experi- mental measurements for βk, even without taking into account vibrational contributions. Experimental results indicate that the vibrational contribu- tion is small for the hyperpolarisability: differences in the hyperpolarisability of isotopically substituted molecules show the vibrational contributions. Un- fortunately, measurements at the same frequency are not available for CHCl3 and CDCl3, but Kaatz et al. found that at 694.3 nm, CHCl3 has βk = 1.2

17Unlike the total properties, the spatial distributions of polarisabilities and hyperpo- larisabilities are not uniquely defined. For example, as defined above, they depend on the origin of coordinates. Throughout this work we chose a center-of-mass reference for the spatial distributions. 4.3. Non-linear response 137

(1) Figure 4.19: Linear response density ρz (r) and polarisability density αzz(r) on one of the HCCl planes of the molecule calculated using the PBE func- tional. The positions of the nuclei are indicated with black dots, and the black lines are isolines. All quantities are in atomic units. 138 Chapter 4. Applications

(2) Figure 4.20: Non-linear response density ρzz (r) and hyperpolarisability den- sity βzzz(r) on one of the HCCl planes of the molecule calculated using the PBE functional. The positions of the nuclei are indicated with black dots, and the black lines are isolines. All quantities are in atomic units. The non- linear densities extend much further into space than the linear densities. The contributions to the hyperpolarisability from the Cl atoms and the CH bond are of opposite sign and, as indicated by the non-linear response density, have contributions that extend even further into space. 4.3. Non-linear response 139

± 2.6 a.u.; at 1064 nm CDCl3 has βk = 1.0 ± 4.2 a.u. [101]. Given that the frequency dispersion of βk between zero frequency and 1064 nm is only about +15% in our calculations (much smaller than the error bars), this isotopic comparison shows that the vibrational contributions are smaller than the error bars. Therefore, vibrational contributions are not significant in com- paring the ab initio results to the available experimental measurements. We find, additionally, that the molecular structure has a significant influence on the calculated value of βk, and so it is crucial to use an accurate structure for theoretical calculations.

4.3.3 Conclusions We have shown the calculation of non-linear response for several small mole- cules, with special emphasis on the chloroform molecule. In all cases, there is a good quantitative agreement with experimental results if a careful con- vergence of the calculations is performed. The molecules non-linear response is quite extended in space and so real- space grids on a large domain are required to describe it properly. An ap- proach based on atomic orbitals would require very extended basis sets to replicate the results [262] (making the atomic orbitals less practical due to the numerical cost of the large basis set). This can be verified by looking at the spatial distributions of the linear and non-linear response densities, that provide a good visualization tool to understand the basis-set requirements for the simulation of linear and non-linear response. In most cases the frequency-dependence of the polarisability and hyper- polarisability is small, as verified by our time-dependent calculations, and so dispersion is not very important in comparing static theoretical results to experimental measurements. In the case of paranitroaniline however, the proper description of the resonant response appears to be essential for a precise reproduction of experimental data at high frequencies. 140 Chapter 4. Applications Chapter 5

Conclusions

In this PhD work we have presented the development and efficient implemen- tation of two formalisms, real-time propagation and the Sternheimer equa- tion, to extract response properties of many-body systems from TDDFT. Real-time TDDFT is already established as a standard method to calcu- late optical response and, when coupled with the Ehrenfest scheme, a tool to perform non-adiabatic MD. We have shown that, by introducing a small modification in the equations, Ehrenfest-TDDFT can also be a competitive tool for adiabatic MD. In the case of the Sternheimer equation, widely used for static DFT response properties, we have shown that in can also be used for dynamic response for both non-resonant and resonant cases. This results in a frequency-domain method for exploring excited states that does not require unoccupied states nor response functions (or other two point quantities). Consequently, the new method is more suitable for numerical applications than the standard perturbation theory approaches based on sum over states. The Sternheimer formalism is also suitable for non-linear properties, where higher response orders do not involve additional complexity: for each order we have to solve a new Sternheimer equation very similar to the first-order one. Moreover, we can apply the 2n + 1 theorem to save work and get the response properties to higher orders than the equations we solve. In this par- ticular case, we get the second-order response from the solution of the linear response equations. Similarly, from the second order Sternheimer equations we would be able to extract information up to fifth-order properties: in the electric case this would involve the second and third hyperpolarisabilities. The Sternheimer approach is not only practical for numerical calculations. As we have shown, phenomena like non-linear optics or Raman response ap-

141 142 Chapter 5. Conclusions pear naturally from the formulation, giving an insight into the physics of the process. The approaches were presented in a general form, so they can be applied to study the response of any observable to any type of external perturbation. As particular examples we have shown the calculation of different properties beyond the usual optical, purely electric, response: van der Walls coefficients, magnetic susceptibilities and optical activity (a mixed electromagnetic re- sponse). In the magnetic case it is necessary to include all the terms related to the magnetic vector potential and its coupling to the non-local potential to maintain the proper gauge invariance, essential to obtain correct results. As our formulation is general it might as well be used to study other linear and non-linear response properties. Different aspects of the numerical implementation in the Octopus code were also discussed. We started by introducing the real-space grid discretiza- tion and the pseudo-potential approximation. Then we have shown how we can combine them into a precise and efficient scheme. We also presented the different numerical algorithms and how we apply them to solve the equations that appear in the theory. It is important to notice how a purposely designed eigensolver, like RMM-DIIS, can give huge a performance improvement over a more simple and general approach like conjugate gradients. From this ex- perience, we expect that for the Sternheimer equation and time propagation considerable performance improvements could be obtained in the future from improvements in the solution algorithms. Given the efficiency of the Sternheimer method and the advantages of the real-space discretization, we were able to predict TDDFT linear and non- linear results for small molecules with great precision. The theoretical results approximate very well the experimental results and a good representation of the empty space is essential for non-linear response calculations. Since the scaling with the number of atoms of the Sternheimer approach is excellent, we expect that the method will be useful for the study of very large systems. A shortcoming of the Sternheimer method, that we put in evidence, is the poor convergence of the linear solver in the near-resonant case. Convergence issues come from a poor conditioning of the operator, so it is reasonable to think that they might be solved, or at least reduced, by a proper precondi- tioner. This will not only could make the TDDFT linear response calcula- tions faster, but it would be essential for the application of Sternheimer for GW [263] and other many-body perturbation theory approaches, avoiding the calculation of unoccupied states [264,265]. 143

An interesting extension is the generalisation of the formalism to the treatment of periodic systems in order to study crystalline systems or molecu- les in solvent or liquid phases. The case of liquids is particularly interesting1 since we could not only calculate properties, but also assess the approxima- tions that are done to connect the results for individual molecules (or the gas phase) with the results for liquids [101]. In general, the description of a periodic system is more complicated than the case of a finite system, since the potential associated to a periodic electromagnetic field is not necessarily periodic. One way to overcome this problem is to use the Berry-phase theory of polarisation [266] (that was applied to the calculation of dynamic hyper- polarisabilities of semiconductors in 1996 by Dal Corso et al. [93]). There exists also an alternative approach based on a vector potential representa- tion of the electric field that is suited for real-time TDDFT [267]. We still lack, however, a general theory for the response of periodic systems under an arbitrary perturbation2. This work opens the path to study large systems as the light harvesting complexes responsible for photosynthesis from an ab-initio point of view while including environment effects. Still, to bridge properly spatial and time scales (from femtoseconds to miliseconds) we need to develop a multiscale approach compatible with a TDDFT formulation. In this realm, we need to invest more efforts in bringing the Octopus code to massive (petascale) high-performance computing, including incorporation of new paradigms in computation like the use of graphical processing units or other types of highly parallel co- processors.

1D. Strubbe, X. Andrade, A. Rubio, The hyperpolarisabilty of liquid chloroform, to be submitted. 2X. Andrade, A. Rubio, K. Yabana, to be submitted. 144 Chapter 5. Conclusions Bibliography

[1] P. Geerlings, F. De Proft, and W. Langenaeker, Conceptual density functional theory, Chem. Rev. 103, 1793–1874 (2003).

[2] K. Capelle, A bird’s-eye view of density-functional theory, Braz. J. Phys 36, 1318–1343 (2006).

[3] P. Hohenberg and W. Kohn, Inhomogeneous electron gas, Phys. Rev. 136, B864–B871 (1964).

[4] W. Kohn and L. J. Sham, Self-consistent equations including exchange and correlation effects, Phys. Rev. 140, A1133–A1138 (1965).

[5] X. Gonze, B. Amadon, P.-M. Anglade, J.-M. Beuken, F. Bottin, P. Boulanger, F. Bruneval, D. Caliste, R. Caracas, M. Ct, T. Deutsch, L. Genovese, P. Ghosez, M. Giantomassi, S. Goedecker, D. Hamann, P. Hermet, F. Jollet, G. Jomard, S. Leroux, M. Mancini, S. Mazevet, M. Oliveira, G. Onida, Y. Pouillon, T. Rangel, G.-M. Rignanese, D. Sangalli, R. Shaltaf, M. Torrent, M. Verstraete, G. Zerah, and J. Zwanziger, Abinit: First-principles approach to material and nanosystem properties, Computer Physics Communications 180, 2582 – 2615 (2009).

[6] Y. Shao, L. F. Molnar, Y. Jung, J. Kussmann, C. Ochsenfeld, S. T. Brown, A. T. Gilbert, L. V. Slipchenko, S. V. Levchenko, D. P. O’Neill, R. A. DiStasio Jr., R. C. Lochan, T. Wang, G. J. Beran, N. A. Besley, J. M. Herbert, C. Y. Lin, T. V. Voorhis, S. H. Chien, A. Sodt, R. P. Steele, V. A. Rassolov, P. E. Maslen, P. P. Korambath, R. D. Adam- son, B. Austin, J. Baker, E. F. C. Byrd, H. Dachsel, R. J. Doerksen, A. Dreuw, B. D. Dunietz, A. D. Dutoi, T. R. Furlani, S. R. Gwalt- ney, A. Heyden, S. Hirata, C.-P. Hsu, G. Kedziora, R. Z. Khalliulin,

145 146 Bibliography

P. Klunzinger, A. M. Lee, M. S. Lee, W. Liang, I. Lotan, N. Nair, B. Peters, E. I. Proynov, P. A. Pieniazek, Y. M. Rhee, J. Ritchie, E. Rosta, C. D. Sherrill, A. C. Simmonett, J. E. Subotnik, H. L. W. III, W. Zhang, A. T. Bell, and A. K. Chakraborty, Advances in meth- ods and algorithms in a modern quantum chemistry program package, Physical Chemistry Chemical Physics 8, 3172–3191 (2006).

[7] J. M. Soler, E. Artacho, J. D. Gale, A. Garcia, J. Junquera, P. Ordejon, and D. Sanchez-Portal, The SIESTA method for ab initio order-N materials simulation, J. Phys.: Condens. Matter 14, 2745–2779 (2002).

[8] S. R. Bahn and K. W. Jacobsen, An object-oriented scripting interface to a legacy electronic structure code, Comput. Sci. Eng. 4, 56–66 (2002).

[9] J. J. Mortensen, L. B. Hansen, and K. W. Jacobsen, Real-space grid implementation of the projector augmented wave method, Phys. Rev. B 71, 035109 (2005).

[10] C. Marian, F. Neese, B. Engels, S. Grimme, and M. Peric, Theoretical spectroscopy and its impact on experiment, Chemical Physics 343, vii– ix (2008).

[11] E. Runge and E. K. U. Gross, Density-functional theory for time- dependent systems, Phys. Rev. Lett. 52, 997–1000 (1984).

[12] M. A. L. Marques, C. A. Ullrich, F. Nogueira, A. Rubio, K. Burke, and E. K. U. Gross, editors, Time-dependent density-functional theory, Springer-Verlag Berlin, Heidelberg (2006).

[13] M. A. L. Marques, A. Castro, G. F. Bertsch, and A. Rubio, octopus: a first-principles tool for excited electron-ion dynamics, Comput. Phys. Commun. 151, 60–78 (2003).

[14] A. Castro, M. A. L. Marques, H. Appel, M. Oliveira, C. A. Rozzi, X. Andrade, F. Lorenzen, E. K. U. Gross, and A. Rubio, Octopus: A tool for the application of time-dependent density functional theory, Phys. Status Solidi B 243, 2465–2488 (2006).

[15] E. K. U. Gross, J. F. Dobson, and M. Petersilka, Density-functional theory of time-dependent phenomena, In Nalewajski, editor, Density Bibliography 147

Functional Theory volume 181 of Topics in Current Chemistry pages 81–172. Springer-Verlag Berlin, Heidelberg (1996).

[16] A. Castro, M. Marques, D. Varsano, F. Sottile, and A. Rubio, The challenge of predicting optical properties of biomolecules: what can we learn from time-dependent density-functional theory, Comptes Rendus Physique 10, 469–490 (2009).

[17] R. Feynman, Quantum Electrodynamics, Westview Press Boulder, CO (1998).

[18] W. Kohn, Nobel lecture: Electronic structure of matter-wave functions and density functionals, Rev. Mod. Phys. 71, 1253–1266 (1999).

[19] C. Fiolhais, F. Nogueira, and M. Marques, editors, A Primer in Density Functional Theory, Lecture Notes in Physics. Springer-Verlag Berlin, Heidelberg (2003).

[20] W. Yang and R. G. Parr, Density-Functional Theory of Atoms and Molecules, Oxford University Press New York (1989).

[21] N. March, Electron Density Theory of Atoms and Molecules, Academic Press London (1992).

[22] C.-O. Almbladh and U. von Barth, Exact results for the charge and spin densities, exchange-correlation potentials, and density-functional eigenvalues, Phys. Rev. B 31, 3231–3244 (1985).

[23] D. R. Bowler, J.-L. Fattebert, M. J. Gillan, P. D. Haynes, and C.-K. Skylaris, Introductory remarks: Linear scaling methods, JPCMa 20, 290301 (2008).

[24] A. D. Becke, Density-functional exchange-energy approximation with correct asymptotic behavior, Phys. Rev. A 38, 3098–3100 (1988).

[25] J. P. Perdew and Y. Wang, Accurate and simple analytic representation of the electron-gas correlation energy, Phys. Rev. B 45, 13244–13249 (1992).

[26] J. P. Perdew, K. Burke, and M. Ernzerhof, Generalized gradient ap- proximation made simple, Phys. Rev. Lett. 77, 3865–3868 (1996). 148 Bibliography

[27] J. Tao, J. P. Perdew, V. N. Staroverov, and G. E. Scuseria, Climbing the density functional ladder: Nonempirical meta-generalized gradient approximation designed for molecules and solids, Phys. Rev. Lett. 91, 146401 (2003).

[28] J. P. Perdew and A. Zunger, Self-interaction correction to density- functional approximations for many-electron systems, Phys. Rev. B 23, 5048–5079 (1981).

[29] J. Harris, Adiabatic-connection approach to Kohn-Sham theory, Phys. Rev. A 29, 1648–1659 (1984).

[30] A. G¨orling, New KS method for molecules based on an exchange charge density generating the exact local KS exchange potential, Phys. Rev. Lett. 83, 5459–5462 (1999).

[31] A. D. Becke, A new mixing of Hartree-Fock and local density-functional theories, J. Chem. Phys. 98, 1372–1377 (1993).

[32] J. P. Perdew, M. Ernzerhof, and K. Burke, Rationale for mixing exact exchange with density functional approximations, J. Chem. Phys. 105, 9982–9985 (1996).

[33] M. A. L. Marques and E. K. U. Gross, Time-dependent density func- tional theory, Ann. Rev. Phys. Chem. 55, 427–455 (2004).

[34] K. Burke, J. Werschnik, and E. K. U. Gross, Time-dependent density functional theory: Past, present, and future, J. Chem. Phys. 123, 062206 (2005).

[35] S. J. A. van Gisbergen, P. R. T. Schipper, O. V. Gritsenko, E. J. Baerends, J. G. Snijders, B. Champagne, and B. Kirtman, Electric field dependence of the exchange-correlation potential in molecular chains, Phys. Rev. Lett. 83, 694–697 (1999).

[36] P. L. de Boeij, F. Kootstra, J. A. Berger, R. van Leeuwen, and J. G. Snijders, Current density functional theory for optical spectra: A po- larization functional, J. Chem. Phys. 115, 1995–1999 (2001). Bibliography 149

[37] M. van Faassen, P. L. de Boeij, R. van Leeuwen, J. A. Berger, and J. G. Snijders, Application of time-dependent current-density-functional the- ory to nonlocal exchange-correlation effects in polymers, J. Chem. Phys. 118, 1044–1053 (2003).

[38] P. Mori-S´anchez, Q. Wu, and W. Yang, Accurate polymer polarizabi- lities with exact exchange density-functional theory, J. Chem. Phys. 119, 11001–11004 (2003).

[39] S. K¨ummel, L. Kronik, and J. P. Perdew, Electrical response of molec- ular chains from density functional theory, Phys. Rev. Lett. 93, 213002 (2004).

[40] M. E. Casida and D. R. Salahub, Asymptotic correction approach to im- proving approximate exchange–correlation potentials: Time-dependent density-functional theory calculations of molecular excitation spectra, J. Chem. Phys. 113, 8918–8935 (2000).

[41] M. Marques, A. Castro, and A. Rubio, Assessment of exchange- correlation functionals for the calculation of dynamical properties of small clusters in time-dependent density functional theory, J. Chem. Phys. 115, 3006–3014 (2001).

[42] F. A. Bulat, A. Toro-Labb´e, B. Champagne, B. Kirtman, and W. Yang, Density-functional theory (hyper)polarizabilities of push-pull pi-conjugated systems: Treatment of exact exchange and role of corre- lation, J. Chem. Phys. 123, 014319 (2005).

[43] A. G¨orling and M. Levy, Exact Kohn-Sham scheme based on perturba- tion theory, Phys. Rev. A 50, 196–204 (1994).

[44] D. J. Tozer and N. C. Handy, On the determination of excitation energies using density functional theory, Phys. Chem. Chem. Phys. 2, 2117–2121 (2000).

[45] N. T. Maitra, F. Zhang, R. J. Cave, and K. Burke, Double excita- tions within time-dependent density functional theory linear response, J. Chem. Phys. 120, 5932–5937 (2004). 150 Bibliography

[46] O. V. Gritsenko and E. J. Baerends, The spin-unrestricted molecular Kohn-Sham solution and the analogue of Koopmans’s theorem for open- shell molecules, J. Chem. Phys. 120, 8364–8372 (2004). [47] N. T. Maitra, I. Souza, and K. Burke, Current-density functional theory of the response of solids, Phys. Rev. B 68, 045109 (2003). [48] F. Sottile, V. Olevano, and L. Reining, Parameter-free calculation of response functions in time-dependent density-functional theory, Phys. Rev. Lett. 91, 056402 (2003). [49] M. A. L. Marques, X. L´opez, D. Varsano, A. Castro, and A. Ru- bio, Time-dependent density-functional approach for biological chro- mophores: The case of the green fluorescent protein, Phys. Rev. Lett. 90, 258101 (2003). [50] G. Ciccotti, D. Frenkel, and I. McDonald, Simulations of liquids and solids: molecular dynamics and MonteCarlo methods in statistical me- chanics, North-Holand Amsterdam (1987). [51] B. J. Alder and T. E. Wainwright, Studies in molecular dynamics. I. General method, J. Chem. Phys. 31, 459–466 (1959). [52] A. Warshel and R. M. Weiss, An empirical valence bond approach for comparing reactions in solutions and in enzymes, J. Am. Chem. Soc. 102, 6218–6226 (1980). [53] D. Marx and J. Hutter, Ab initio molecular dynamics: Theory and implementation, In J. Grotendorst, editor, Modern Methods and Algo- rithms of Quantum Chemistry volume 1 pages 329–477 J¨ulich (2000). John von Neumann Institute for Computing. [54] M. E. Tuckerman, Ab initio molecular dynamics: basic concepts, cur- rent trends and novel applications, J. Phys.: Condens. Matter 14, R1297–R1355 (2002). [55] R. Car and M. Parrinello, Unified approach for molecular dynamics and density-functional theory, Phys. Rev. Lett. 55, 2471–2474 (1985). [56] W. Andreoni, D. Marx, and M. Sprik, A tribute to Michelle Parrinello: From physics via chemistry to biology, ChemPhysChem 6, 1671–1676 (2005), And references therein. Bibliography 151

[57] S. Goedecker, Linear scaling electronic structure methods, Rev. Mod. Phys. 71, 1085–1123 (1999).

[58] T. D. Kuhne, M. Krack, F. R. Mohamed, and M. Parrinello, Effi- cient and accurate Car-Parrinello-like approach to Born-Oppenheimer molecular dymamics, Phys. Rev. Lett. 98, 066401 (2007).

[59] G. Wentzel, Eine Verallgemeinerung der Quantenbedingungen f¨urdie Zwecke der Wellenmechanik, Z. Phys. 38, 518–529 (1926).

[60] H. A. Kramers, Wellenmechanik und halbzahlige Quantisierung, Z. Phys. 39, 828–840 (1926).

[61] L. Brillouin, La m´ecanique ondulatoire de Schr¨odinger;une m´ethode g´en´erale de resolution par approximations successives, Chem. Rev. 183, 24 (1926).

[62] R. B. Gerber, V. Buch, and M. A. Ratner, Time-dependent self-consistent field approximation for intramolecular energy trans- fer. I. Formulation and application to dissociation of van der Waals molecules, J. Chem. Phys. 77, 3022–3030 (1982).

[63] R. B. Gerber and M. A. Ratner, Self-consistent-field methods for vibra- tional excitations in polyatomic systems, Adv. Chem. Phys. 70, 97–132 (1988).

[64] F. A. Bornemann, P. Nettesheim, and C. Sch¨utte, Quantum-classical molecular dynamics as an approximation to full quantum dynamics, J. Chem. Phys. 105, 1074–1085 (1996).

[65] F. A. Bornemann, P. Nettesheim, and C. Sch¨utte, Quantum-classical molecular dynamics as an approximation to full quantum dynam- ics, Preprint SC 95-26, Konrad-Zuse-Zentrum f¨urInformationstechnik Berlin 1995.

[66] P. P. G¨uttinger, Das Verhalten von Atomen im magnetischen Drehfeld, Z. Phys. 73, 169–184 (1931).

[67] D. B. Wallace, An introduction to the Hellmann-Feynman theory, Mas- ter’s thesis University of Central Florida Orlando, Florida 2005. 152 Bibliography

[68] H. Hellmann, Einf¨uhrungin die Quantenchemie, Leipzig, Frank Deuticke, p. 285 1937.

[69] R. P. Feynman, Forces in molecules, Phys. Rev. 56, 340–343 (1939).

[70] J. L. Tully, Mixed quantum-classical dynamics: Mean-field and surface- hopping, In B. J. Berne, G. Ciccotti, and D. F. Coker, editors, Classical and Quantum Dynamics in Condensed Phase Simulation pages 489– 515. World Scientific Singapore (1998).

[71] F. Mauri, R. Car, and E. Tosatti, Canonical statistical averages of coupled quantum-classical systems, Europhys. Lett. 24, 431 (1993).

[72] G. K¨ab, Statistical mechanics of mean field Ehrenfest quan- tum/classical molecular dynamics: The damped harmonic oscillator, J. Chem. Phys. 108, 8866 (2004).

[73] P. V. Parandekar and J. C. Tully, Mixed quantum-classical equilibrium, J. Chem. Phys. 122, 094102 (2005).

[74] T.-C. Li and P. Tong, Time-dependent density-functional theory for multicomponent systems, Phys. Rev. A 34, 529–532 (1986).

[75] J. Theilhaber, Ab initio simulations of sodium using time-dependent density-functional theory, Phys. Rev. B 46, 12990–13003 (1992).

[76] J. L. Alonso, X. Andrade, P. Echenique, F. Falceto, D. Prada-Gracia, and A. Rubio, Efficient formalism for large-scale ab initio molecular dynamics based on time-dependent density functional theory, Phys. Rev. Lett. 101, 096403 (2008).

[77] E. Noether, Invariante variationsprobleme, Nachr. v. d. Ges. d. Wiss. zu G¨ottingenpages 235–257 (1918).

[78] M. A. Travel, Transport Theory and Statis. Phys. 1, 183–207 (1971).

[79] R. van Leeuwen, Mapping from densities to potentials in time- dependent density-functional theory, Phys. Rev. Lett. 82, 3863–3866 (1999). Bibliography 153

[80] N. T. Maitra and K. Burke, Demonstration of initial-state dependence in time-dependent density-functional theory, Phys. Rev. A 63, 042501 (2001).

[81] N. T. Maitra and K. Burke, Erratum: Demonstration of initial-state dependence in time-dependent density-functional theory, Phys. Rev. A 64, 039901 (2001).

[82] N. T. Maitra, K. Burke, and C. Woodward, Memory in time-dependent density functional theory, Phys. Rev. Lett. 89, 023002 (2002).

[83] G. Fronzoni, M. Stener, and P. Decleva, Valence and core photoioniza- tion dynamics of acetylene by TD-DFT continuum approach, Chem. Phys. 298, 141–153 (2004).

[84] R. Sternheimer, On nuclear quadrupole moments, Phys. Rev. 84, 244– 253 (1951).

[85] S. Baroni, S. de Gironcoli, A. Dal Corso, and P. Giannozzi, Phonons and related crystal properties from density-functional perturbation theo- ry, Rev. Mod. Phys. 73, 515–562 (2001).

[86] G. Senatore and K. R. Subbaswamy, Nonlinear response of closed-shell atoms in the density-functional formalism, Phys. Rev. A 35, 2440–2447 (1987).

[87] S. P. Karna and M. Dupuis, Frequency-dependent hyperpolarizabilities of haloforms from ab initio SCF calculations, Chem. Phys. Lett. 171, 201–208 (1990).

[88] S. J. A. van Gisbergen, J. G. Snijders, and E. J. Baerends, Time- dependent density functional results for the dynamic hyperpolarizability of C60, Phys. Rev. Lett. 78, 3097–3100 (1997).

[89] J. Iwata, K. Yabana, and G. Bertsch, Real-space computation of dy- namic hyperpolarizabilities, J. Chem. Phys. 115, 8773–8783 (2001).

[90] B. Walker, A. M. Saitta, R. Gebauer, and S. Baroni, Efficient ap- proach to time-dependent density-functional perturbation theory for op- tical spectroscopy, Phys. Rev. Lett. 96, 113001 (2006). 154 Bibliography

[91] X. Andrade, S. Botti, M. A. L. Marques, and A. Rubio, Time- dependent density functional theory scheme for efficient calculations of dynamic (hyper)polarizabilities, J. Chem. Phys. 126, 184106 (2007). [92] X. Gonze and J.-P. Vigneron, Density-functional approach to nonlinear-response coefficients of solids, Phys. Rev. B 39, 13120–13128 (1989). [93] A. Dal Corso, F. Mauri, and A. Rubio, Density-functional theory of the nonlinear optical susceptibility: Application to cubic semiconductors, Phys. Rev. B 53, 15638–15642 (1996). [94] A. Willetts, J. E. Rice, D. M. Burland, and D. P. Shelton, Problems in the comparison of theoretical and experimental hyperpolarizabilities, J. Chem. Phys. 97, 7590–7599 (1992). [95] R. W. Boyd, Nonlinear optics, Academic Press London second edition (2003). [96] Y. R. Shen, The Principles of Nonlinear Optics, Wiley West Sussex, England (1984). [97] P. A. Franken, A. E. Hill, C. W. Peters, and G. Weinreich, Generation of optical harmonics, Phys. Rev. Lett. 7, 118–119 (1961). [98] P. Weinberger, John Kerr and his effects found in 1877 and 1878, Phil. Mag. Lett. 88, 897–907 (2008). [99] M. Bass, P. A. Franken, J. F. Ward, and G. Weinreich, Optical rectifi- cation, Phys. Rev. Lett. 9, 446–448 (1962). [100] S. J. Cyvin, J. E. Rauch, and J. C. J. Decius, Theory of hyper-Raman effects (nonlinear inelastic light scattering): Selection rules and depo- larization ratios for the second-order polarizability, J. Chem. Phys. 43, 4083 (1965). [101] P. Kaatz, E. A. Donley, and D. P. Shelton, A comparison of molecular hyperpolarizabilities from gas and liquid phase measurements, J. Chem. Phys. 108, 849–856 (1998). [102] P. Das, Chemical applications of hyper-Rayleigh scattering in solution, J. Phys. Chem. B 110, 7621–7630 (2006). Bibliography 155

[103] M. J. Oliveira, On the use of Neumann’s principle for the calcula- tion of the polarizability tensor of nanostructures, J. Nanoscience and Nanotechnology 8, 3392–3398 (2008).

[104] A. Castro, M. Marques, J. Alonso, G. Bertsch, K. Yabana, and A. Ru- bio, Can optical spectroscopy directly elucidate the ground state of C20?, J. Chem. Phys. 116, 1930–1933 (2002).

[105] A. Castro, M. A. L. Marques, J. A. Alonso, and A. Rubio, Optical prop- erties of nanostructures from time-dependent density functional theory, J. Comp. Theor. Nanosci. 1, 231–255 (2004).

[106] S. Botti and M. A. L. Marques, Identification of fullerene-like CdSe nanoparticles from optical spectroscopy calculations, Phys. Rev. B 75, 035311 (2007).

[107] K. Yabana and G. F. Bertsch, Time-dependent local-density approxima- tion in real time: Application to conjugated molecules, Int. J. Quantum Chem. 75, 55–66 (1999).

[108] G. Malloci, G. Mulas, and C. Joblin, Electronic absorption spectra of PAHs up to vacuum UV, Astron. Astrophys. 426, 105–117 (2004).

[109] G. Malloci, G. Mulas, G. Cappellini, V. Fiorentini, and I. Porceddu, Theoretical electron affinities of PAHs and electronic absorption spectra of their mono-anions, Astron. Astrophys. 432, 585–594 (2005).

[110] X. Lopez, M. Marques, A. Castro, and A. Rubio, Optical absorption of the blue fluorescent protein: A first-principles study, J. Am. Chem. Soc. 127, 12329–12337 (2005).

[111] Y. Takimoto, F. D. Vila, and J. J. Rehr, Real-time time-dependent density functional theory approach for frequency-dependent nonlinear optical response in photonic molecules, J. Chem. Phys. 127, 154114 (2007).

[112] K. Wolinski, J. F. Hinton, and P. Pulay, Efficient implementation of the gauge-independent atomic orbital method for NMR chemical shift calculations, J. Am. Chem. Soc. 112, 8251–8260 (1990). 156 Bibliography

[113] W. Kutzelnigg, Theory of magnetic-susceptibilities and NMR chem.- shifts in terms of localized quantities, Isr. J. Chem. 19, 193–200 (1980).

[114] M. Schindler and W. Kutzelnigg, Theory of magnetic-susceptibilities and NMR chem.-shifts in terms of localized quantities. 2. Application to some simple molecules, J. Chem.Phys. 76, 1919–1933 (1982).

[115] J. Gauss, Molecular properties, In J. Grotendorst, editor, Modern Methods and Algorithms of Quantum Chemistry volume 3 of NIC Series pages 541–592. John von Neumann Institute for Computing J¨ulich 2 edition (2000), See section 3.4 and references therein.

[116] T. D. Bouman and A. E. Hansen, Ab initio calculations of oscillator and rotatory strengths in the random-phase approximation: Twisted mono-olefins, J. Chem. Phys. 66, 3460–3467 (1977).

[117] S. Ismail-Beigi, E. K. Chang, and S. G. Louie, Coupling of nonlocal potentials to electromagnetic fields, Phys. Rev. Lett. 87, 087402 (2001).

[118] C. J. Pickard and F. Mauri, Nonlocal pseudopotentials and magnetic fields, Phys. Rev. Lett. 91, 196401 (2003).

[119] E. U. Condon, Theories of optical rotatory power, Rev. Mod. Phys. 9, 432–457 (1937).

[120] K. Yabana and G. F. Bertsch, Application of the time-dependent local density approximation to optical activity, Phys. Rev. A 60, 1271–1279 (1999).

[121] J. E. Bright Wilson, J. C. Decius, and P. C. Cross, Molecular vibrations, Dover New York, USA (1980).

[122] M. Allen and D. Tildesley, Computer Simulation of Liquids chapter 6, Oxford University Press Oxford (1987).

[123] J. K¯oga,K. Nishio, T. Yamaguchi, and F. Yonezawa, Tight-binding molecular dynamics study on the structural change of amorphous ger- manium with the increase of density, J. Phys. Soc. Jpn. 73, 388–396 (2004). Bibliography 157

[124] E. S. Kadantsev and M. J. Stott, Calculation of vibrational frequencies within the real space pseudopotential approach, Phys. Rev. B 71, 045104 (2005).

[125] C. V. Raman and K. S. Krishnan, A new type of secondary radiation, Nature 121, 501–502 (1928).

[126] D. A. Long, The Raman effect, Wiley West Sussex, England (1980).

[127] J. Slater, Atomic shielding constants, Phys. Rev. 36, 57–64 (1930).

[128] S. F. Boys, Electronic wave functions. 1. A general method of calcula- tion for the stationary states of any molecular system, Proc. Roy. Soc. London Ser. A 200, 542–554 (1950).

[129] W. J. Hehre, R. F. Stewart, and J. Pople, Self-consistent molecular- orbital methods I. Use of gaussian expansions of Slater-type atomic orbitals, J. Chem. Phys. 51, 2657–2664 (1969).

[130] V. Blum, R. Gehrke, F. Hanke, P. Havu, V. Havu, X. Ren, K. Reuter, and M. Scheffler, Ab initio molecular simulations with numeric atom- centered orbitals, Computer Physics Communications 180, 2175–2196 (2009).

[131] J. R. Chelikowsky, N. Troullier, and Y. Saad, Finite-difference- pseudopotential method: Electronic structure calculations without a ba- sis, Phys. Rev. Lett. 72, 1240–1243 (1994).

[132] D. R. Hamann, M. Schl¨uter,and C. Chiang, Norm-conserving pseu- dopotentials, Phys. Rev. Lett. 43, 1494–1497 (1979).

[133] G. B. Bachelet, D. R. Hamann, and M. Schl¨uter, Pseudopotentials that work: From H to Pu, Phys. Rev. B 26, 4199–4228 (1982).

[134] N. Troullier and J. L. Martins, Efficient pseudopotentials for plane- wave calculations, Phys. Rev. B 43, 1993–2006 (1991).

[135] L. Kleinman and D. M. Bylander, Efficacious form for model pseu- dopotentials, Phys. Rev. Lett. 48, 1425–1428 (1982). 158 Bibliography

[136] E. L. Briggs, D. J. Sullivan, and J. Bernholc, Large-scale electronic- structure calculations with multigrid acceleration, Phys. Rev. B 52, R5471–R5474 (1995).

[137] M. Tafipolosky and R. Schmid, A general and efficient pseudopotential Fourier filtering scheme for real space methods using mask functions, J. Chem. Phys 124, 174102 (2006).

[138] A. Edelman and S. T. Smith, On conjugate gradient-like methods for eigen-like problems, BIT 36, 494–508 (1996).

[139] P. Pulay, Convergence acceleration of iterative sequences. The case of SCF iteration, Chem. Phys. Lett. 73, 393–398 (1980).

[140] D. M. Wood and A. Zunger, A new method for diagonalising large matrices, J. Phys. A: Math. Gen. 18, 1343–1359 (1985).

[141] G. Kresse and J. Furthm¨uller, Efficient iterative schemes for ab initio total-energy calculations using a plane-wave basis set, Phys. Rev. B 54, 11169–11186 (1996).

[142] A. Castro, M. A. L. Marques, and A. Rubio, Propagators for the time-dependent Kohn-Sham equations, J. Chem. Phys. 121, 3425–3433 (2004).

[143] M. E. Tuckerman and M. Parrinello, Integrating the Car-Parrinello equations. II. Multiple time scale techniques, J. Chem. Phys. 101, 1316–1329 (1994).

[144] Y. Saad, Iterative Method for Sparse Linear Systems, PWS Publishing Company Boston (1996).

[145] Y. Saad, A. Stathopoulos, J. Chelikowsky, K. Wu, and S. Ogut, So- lution of large eigenvalue problems in electronic structure calculations, BIT 36, 563–578 (1996).

[146] C. G. Broyden, A class of methods for solving nonlinear simultaneous equations, Math. Comp. 19, 577–593 (1965).

[147] D. D. Johnson, Modified Broyden’s method for accelerating convergence in self-consistent calculations, Phys. Rev. B 38, 12807–12813 (1988). Bibliography 159

[148] C. L. Lawson, R. J. Hanson, D. R. Kincaid, and F. T. Krogh, Ba- sic linear algebra subprograms for Fortran usage, ACM Trans. Math. Softw. 5, 308–323 (1979). [149] R. W. Hamming, Numerical Methods for Scientists and Engineers chapter 14, 15, Dover New York (1962). [150] S. Goedecker and A. Hoisie, Perfomance Optimization of Numerically Intensive Codes chapter 5, SIAM Philadelphia (2001). [151] G. Amdahl, Validity of the single processor approach to achieving large- scale computing capabilities, AFIPS Conference Proceedings 30, 483– 485 (1967). [152] K. Devine, E. Boman, R. Heaphy, B. Hendrickson, and C. Vaughan, Zoltan data management services for parallel dynamic applications, Computing in Science and Engineering 4, 90–97 (2002). [153] G. Karypis and V. Kumar, A fast and high quality multilevel scheme for partitioning irregular graphs, SIAM J. Sci. Comput. 20, 359–392 (1999). [154] M. F. Crawford, H. L. Welsh, and J. L. Locke, Infra-red absorption of oxygen and nitrogen induced by intermolecular forces, Phys. Rev. 75, 1607 (1949). [155] S. Stein, director NIST Mass Spec Data Center, NIST Chemistry Web- Book, NIST Standard Reference Number 69 chapter Mass Spectra, National Institute of Standards and Technology Gaithersburg MD, 20899, USA (2005). [156] T. Cabioc’h, A. Kharbach, A. Le Roy, and J. P. Riviere, Fourier trans- form infra-red characterization of carbon onions produced by carbon-ion implantation, Chem. Phys. Lett. 285, 216–220 (1998). [157] F. Favot and A. Dal Corso, Phonon dispersions: Performance of the generalized gradient approximation, Phys. Rev. B 60, 11427–11431 (1999). [158] N. Marzari, D. Vanderbilt, and M. C. Payne, Ensemble density- functional theory for ab initio molecular dynamics of metals and finite- temperature insulators, Phys. Rev. Lett. 79, 1337–1340 (1997). 160 Bibliography

[159] A. P. Horsfield, D. R. Bowler, H. Ness, C. G. S´anchez, T. N. Todorov, and A. J. Fisher, The transfer of energy between electrons and ions in solids, Rep. Prog. Phys. 69, 1195–1234 (2006).

[160] A. Bastida, C. Cruz, J. Z´u˜niga,A. Requena, and B. Miguel, A modified Ehrenfest method that achieves Boltzmann quantum state populations, Chem. Phys. Lett. 417, 53–57 (2006).

[161] A. Bastida, C. Cruz, J. Z´u˜niga,A. Requena, and B. Miguel, The Ehrenfest method with quantum corrections to simulate the relaxation of molecules in solution: Equilibrium and dynamics, J. Chem. Phys. 126, 014503 (2007).

[162] J. C. Tully, Molecular dynamics with electronic transitions, J. Chem. Phys. 93, 1061–1071 (1990).

[163] K. Autumn, M. Sitti, Y. A. Liang, A. M. Peattie, W. R. Hansen, S. Sponberg, T. W. Kenny, R. Fearing, J. N. Israelachvili, and R. J. Full, Evidence for van der Waals adhesion in gecko setae, Proc. Natl. Acad. Sci. USA 99, 12252–12256 (2002).

[164] J. Dobson, A. White, and A. Rubio, Asymptotics of the dispersion interaction: Analytic benchmarks for van der Waals energy functionals, Phys. Rev. Lett. 96, 073201 (2006).

[165] B. Jeziorski, R. Moszynski, and K. Szalewicz, Perturbation-theory ap- proach to intermolecular potential-energy surfaces of van der Waals complexes, Chem. Rev. 94, 1887–1930 (1994).

[166] P. Norman, D. M. Bishop, H. J. A. Jensen, and J. Oddershede, Near- resonant absorption in the time-dependent self-consistent field and mul- ticonfigurational self-consistent field approximations, J. Chem. Phys. 115, 10323–10334 (2001).

[167] P. Norman, A. Jiemchooroj, and B. E. Sernelius, Polarization propa- gator calculations of the polarizability tensor at imaginary frequencies and long-range interactions for the noble gases and n-alkanes, J. Chem. Phys. 118, 9167–9174 (2003).

[168] A. Jiemchooroj, P. Norman, and B. E. Sernelius, Complex polarization propagator method for calculation of dispersion coefficients of extended Bibliography 161

pi-conjugated systems: The C6 coefficients of polyacenes and C60, J. Chem. Phys. 123, 124312 (2005). [169] A. Jiemchooroj, P. Norman, and B. E. Sernelius, Electric dipole polariz- abilities and C6 dipole-dipole dispersion coefficients for sodium clusters and C60, J. Chem. Phys. 125, 124306 (2006). [170] A. Banerjee and M. K. Harbola, Calculation of van der Waals coeffi- cients in hydrodynamic approach to time-dependent density functional theory, J. Chem. Phys. 117, 7845–7851 (2002). [171] A. Banerjee and M. K. Harbola, Van der Waals coefficients for alkali metal clusters and their size dependence, Pramana-J. Phys. 66, 423– 433 (2006). [172] A. Banerjee and M. K. Harbola, Hydrodynamical approach to collective oscillations in metal clusters, Phys. Lett. A 372, 2881–2886 (2008). [173] M. A. L. Marques, A. Castro, G. Malloci, G. Mulas, and S. Botti, Ef- ficient calculation of van der Waals dispersion coefficients with time- dependent density functional theory in real time: Application to poly- cyclic aromatic hydrocarbons, J. Chem. Phys. 127, (2007). [174] D. E. H. Jones, Hollow molecules, New. Sci. 32, 245 (1966). [175] E. Osawa, Superaromaticity, Kagaku 25, 854 (1970). [176] D. A. Bochvar and E. G. Gal’pern, Truncated dodecahedron and trun- cated icosahedron hypothetical structures, Proc. Acad. Sci. USSR 209, 239–244 (1973). [177] H. W. Kroto, J. R. Heath, S. C. Obrien, R. F. Curl, and R. E. Smalley, C60 - buckminsterfullerene, Nature 318, 162–163 (1985).

[178] N. Gonzalez Szwacki, A. Sadrzadeh, and B. I. Yakobson, B80 fullerene: An ab initio prediction of geometry, stability, and electronic structure, Phys. Rev. Lett. 98, 166804 (2007).

[179] N. Gonzalez Szwacki, A. Sadrzadeh, and B. I. Yakobson, Erratum: B80 fullerene: An ab initio prediction of geometry, stability, and electronic structure [phys. rev. lett. 98, 166804 (2007)], Phys. Rev. Lett. 100, 159901 (2008). 162 Bibliography

[180] I. Boustani and A. Quandt, Nanotubules of bare boron clusters: Ab initio and density functional study, Europhys. Lett. 39, 527–532 (1997).

[181] D. Ciuparu, R. Klie, Y. Zhu, and L. Pfefferle, Synthesis of pure boron single-wall nanotubes, J. Phys. Chem. B 108, 3967–3969 (2004).

[182] H. Tang and S. Ismail-Beigi, Novel precursors for boron nanotubes: The competition of two-center and three-center bonding in boron sheets, Phys. Rev. Lett. 99, 115501 (2007).

[183] X. Yang, Y. Ding, and J. Ni, Ab initio prediction of stable boron sheets and boron nanotubes: Structure, stability, and electronic properties, Phys. Rev. B 77, 041402 (2008).

[184] G. Gopakumar, M. T. Nguyen, and A. Ceulemans, The boron buckyball has an unexpected T-h symmetry, Chem. Phys. Lett. 450, 175–177 (2008).

[185] A. Ceulemans, J. T. Muya, G. Gopakumar, and M. T. Nguyen, Che- mical bonding in the boron buckyball, Chem. Phys. Lett. 461, 226–228 (2008).

[186] T. Baruah, M. R. Pederson, and R. R. Zope, Vibrational stability and electronic structure of a B80 fullerene, Phys. Rev. B 78, 045408 (2008).

[187] A. Sadrzadeh, O. V. Pupysheva, A. K. Singh, and B. I. Yakobson, The boron buckyball and its precursors: An electronic structure study, J. Phys. Chem. A 112, 13679–13683 (2008).

[188] I. Boustani, Systematic ab initio investigation of bare boron clusters: Determination of the geometry and electronic structures of Bn (n = 2 − 14), Phys. Rev. B 55, 16426–16438 (1997).

[189] C. Amovilli and N. March, The March model applied to boron cages, Chem. Phys. Lett. 347, 459–464 (2001).

[190] L. Hanley, J. L. Whitten, and S. L. Anderson, Collision-induced dis- sociation and ab initio studies of boron cluster ions - Determination of structures and stabilities, J. Phys. Chem. 92, 5803–5812 (1988). Bibliography 163

[191] S. J. Laplaca, P. A. Roland, and J. J. Wynne, Boron clusters (BN, N = 2 − 52) produced by laser ablation of hexagonal boron-nitride, Chem. Phys. Lett. 190, 163–168 (1992).

[192] H.-J. Zhai, L.-S. Wang, A. N. Alexandrova, and A. I. Boldyrev, Elec- − tronic structure and chemical bonding of B5 and B5 by photoelectron spectroscopy and ab initio calculations, J. Chem. Phys. 117, 7917–7924 (2002).

[193] H. Zhai, A. Alexandrova, K. Birch, A. Boldyrev, and L. Wang, Hepta- and octacoordinate boron in molecular wheels of eight- and nine-atom boron clusters: Observation and confirmation, Angew. Chem. Int. Ed. 42, 6004–6008 (2003).

[194] H.-J. Zhai, B. Kiran, J. Li, and L.-S. Wang, Hydrocarbon analogues of boron clusters – planarity, aromaticity and antiaromaticity, Nat. Mater. 2, 827–833 (2003).

[195] B. Kiran, S. Bulusu, H. Zhai, S. Yoo, X. Zeng, and L. Wang, Planar- to-tubular structural transition in boron clusters: B20 as the embryo of single-walled boron nanotubes, Proc. Nat. Acad. Sci. 102, 961–964 (2005).

[196] Q.-B. Yan, X.-L. Sheng, Q.-R. Zheng, L.-Z. Zhang, and G. Su, Family of boron fullerenes: General constructing schemes, electron counting rule, and ab initio calculations, Phys. Rev. B 78, 201401 (2008).

[197] X. Meng, J. Hu, Y. Jiang, C. Lee, and S. Lee, Boron nanowires syn- thesized by laser ablation at high temperature, Chem. Phys. Lett. 370, 825–828 (2003).

[198] I. Boustani, A. Quandt, E. Hernandez, and A. Rubio, New boron based nanostructured materials, J. Chem. Phys. 110, 3176–3185 (1999).

[199] A. Quandt and I. Boustani, Boron nanotubes, ChemPhysChem 6, 2001–2008 (2005).

[200] R. N. Grimes, Boron clusters come of age, J. Chem. Education 81, 657–672 (2004). 164 Bibliography

[201] V. Elser and R. C. Haddon, Icosahedral C60 - An aromatic molecule with a vanishingly small ring current magnetic-susceptibility, Nature 325, 792–794 (1987).

[202] V. Elser and R. C. Haddon, Magnetic-behavior of icosahedral C60, Phys. Rev. A 36, 4579–4584 (1987). [203] F. London, Th´eoriequantique des courants interatomiques dans les combinaisons aromatiques, J. Phys. Rad. 8, 397–409 (1937). [204] R. C. Haddon, L. F. Schneemeyer, J. V. Waszczak, S. H. Glarum, R. Tycko, G. Dabbagh, A. R. Kortan, A. J. Muller, A. M. Mu- jsce, M. J. Rosseinsky, S. M. Zahurak, A. V. Makhija, F. A. Thiel, K. Raghavachari, E. Cockayne, and V. Elser, Experimental and the- oretical determination of the magnetic-susceptibility of C60 and C70, Nature 350, 46–47 (1991). [205] R. C. Haddon, Magnetism of the carbon allotropes, Nature 378, 249– 255 (1995). [206] L. Pauling, The diamagnetic anisotropy of aromatic molecules, J. Chem. Phys. 4, 673–677 (1936). [207] M. Buhl and A. Hirsch, Spherical aromaticity of fullerenes, Chem. Rev. 101, 1153–1183 (2001). [208] K. Y. Zubarev and A. I. Boldyrev, Comprehensive analysis of chemical bonding in boron clusters, J. Comp. Chem. 28, 251–268 (2006).

[209] M. P. Johansson, On the strong ring currents in B20 and neighboring boron toroids, J. Phys. Chem. C 113, 524–530 (2009). [210] D. Vanderbilt, Soft self-consistent pseudopotentials in a generalized eigenvalue formalism, Phys. Rev. B 41, 7892–7895 (1990). [211] M. Marques and S. Botti, The planar-to-tubular structural transition in boron clusters from optical absorption, J. Chem. Phys. 123, 014310 (2005). [212] D. L. Lichtenberger, K. W. Nebesny, C. D. Ray, D. R. Huffman, and L. D. Lamb, Valence and core photoelectron-spectroscopy of C60, buck- minsterfullerene, Chem. Phys. Lett. 176, 203–208 (1991). Bibliography 165

[213] B. A. Wallace, Synchrotron radiation circular-dichroism spectroscopy as a tool for investigating protein structures, J. Synchrotron Rad. 7, 289–295 (2000).

[214] J. C. Sutherland, K. P. Griffin, P. C. Keck, and P. Z. Takacs, Z-DNA: vacuum ultraviolet circular dichroism, Proc. Natl. Acad. Sci. USA 78, 4801–4804 (1981).

[215] R. D. Amos, Electric and magnetic properties of CO, HF, HCI, and CH3F, Chem. Phys. Lett. 87, 23–26 (1982).

[216] A. D. Buckingham, C. Graham, and J. H. Williams, Electric field- gradient-induced birefringence in N2,C2H6,C3H6, Cl2,N2O and CH3F, Mol. Phys. 49, 703–710 (1983).

[217] R. D. Amos, N. C. Handy, K. J. Jalkanen, and P. J. Stephens, Effi- cient calculation of vibrational magnetic dipole transition moments and rotational strengths, Chem. Phys. Lett. 133, 21–26 (1987).

[218] K. Yabana and G. F. Bertsch, Time-dependent local-density approxi- mation in real time, Phys. Rev. B 54, 4484–4487 (1996).

[219] M. C. Tam, N. J. Russ, and T. D. Crawford, Coupled cluster calcu- lations of optical rotatory dispersion of (S)-methyloxirane, J. Chem. Phys 121, 3550 (2004).

[220] J. Kongsted, T. B. Pedersen, L. Jensen, A. E. Hansen, and K. V. Mikkelsen, Coupled cluster and density functional theory studies of the vibrational contribution to the optical rotation of (S)-propylene oxide, J. Am. Chem. Soc. 128, 976–982 (2006).

[221] M. Carnell, S. D. Peyerimhoff, A. Breest, K. H. Godderz, P. Ochmann, and J. Hormes, Experimental and quantum-theoretical investigation of the circular dichroism spectrum of R-methyloxirane, Chem. Phys. Lett. 180, 477–481 (1991).

[222] J. Kongsted, T. B. Pedersen, M. Strange, A. Osted, A. E. Hansen, K. V. Mikkelsen, F. Pawlowski, P. Jorgensen, and C. Hattig, Coupled cluster calculations of the optical rotation of s-propylene oxide in gas phase and solution, Chem. Phys. Lett. 401, 385–392 (2005). 166 Bibliography

[223] J. Autschbach, T. Ziegler, S. J. A. van Gisbergen, and E. J. Baerends, Chiroptical properties from time-dependent density functional theory. I. Circular dichroism spectra of organic molecules, J. Chem. Phys. 116, 6930–6940 (2002).

[224] J. B. Krieger, Y. Li, and G. J. Iafrate, Construction and application of an accurate local spin-polarized Kohn-Sham potential with integer discontinuity: Exchange-only theory, Phys. Rev. A 45, 101–126 (1992).

[225] J. B. Krieger, Y. Li, and G. J. Iafrate, Systematic approximations to the optimized effective potential: Application to orbital-density-functional theory, Phys. Rev. A 46, 5453–5458 (1992).

[226] S. K¨ummeland L. Kronik, Orbital-dependent density functionals: Theory and applications, Rev. Mod. Phys. 80, 3 (2008).

[227] A. Rauk, The optical activity of the three-membered ring: oxiranes, aziridines, diaziridines, and oxaziridines, J. Am. Chem. Soc. 103, 1023–1030 (1981).

[228] T. Muller, K. Wiberg, and P. Vaccaro, Cavity ring-down polarimetry (CRDP): A new scheme for probing circular birefringence and circular dichroism in the gas phase, J. Phys. Chem. A 104, 5959–5968 (2000).

[229] E. Giorgio, C. Rosini, R. Viglione, and R. Zanasi, Calculation of the gas phase specific rotation of (s)-propylene oxide at 355 nm, Chem. Phys. Lett. 376, 452–456 (2003).

[230] D. M. McCann and P. J. Stephens, Determination of absolute confi- guration using density functional theory calculations of optical rotation and electronic circular dichroism: Chiral alkenes, J. Org. Chem. 71, 6074–6098 (2006).

[231] M. G. Mason and O. Schnepp, Absorption and circular dichroism spectra of ethylenic chromophores-trans-cyclooctene, alpha- and beta- pinene, J. Chem. Phys. 59, 1092–1098 (1973).

[232] C. Diedrich and S. Grimme, Systematic investigation of modern quan- tum chemical methods to predict electronic circular dichroism spectra, J. Phys. Chem A 107, 2524–2539 (2003). Bibliography 167

[233] J. P. Perdew, Density-functional approximation for the correlation en- ergy of the inhomogeneous electron gas, Phys. Rev. B 33, 8822–8824 (1986).

[234] A. D. Becke, Density-functional thermochemistry. III. The role of exact exchange, J. Chem. Phys. 98, 5648–5652 (1993).

[235] C. Lee, W. Yang, and R. G. Parr, Development of the Colle-Salvetti correlation-energy formula into a functional of the electron density, Phys. Rev. B 37, 785–789 (1988).

[236] S. Grimme and M. Waletzke, A combination of Kohn Sham density functional theory and multi-reference configuration interaction meth- ods, J. Chem. Phys 111, 5645 (1999).

[237] F. Bertinelli, P. Palmieri, A. Brillante, and C. Taliani, Electronic- excited states of nitroanilines. II. A configuration interaction study and UV spectrum of the paranitroaniline single crystal, Chem. Phys. 25, 333–341 (1977).

[238] P. Salek, T. Helgaker, O. Vahtras, H. Agren,˚ D. Jonsson, and J. Gauss, A comparison of density-functional-theory and coupled- cluster frequency-dependent polarizabilities and hyperpolarizabilities, Mol. Phys. 103, 439–450 (2005).

[239] S. P. Karna, P. N. Prasad, and M. Dupuis, Nonlinear optical prop- erties of p-nitroaniline: An ab initio time-dependent coupled perturbed Hartree–Fock study, J. Chem. Phys. 94, 1171–1181 (1991).

[240] G. Maroulis, Electric polarizability and hyperpolarizability of carbon monoxide, J. Phys. Chem. 100, 13466 – 13473 (1996).

[241] J. S. Muenter, Electric dipole moment of carbon monoxide, J. Mol. Spec. 55, 490–491 (1975).

[242] S. J. A. van Gisbergen, F. Kootstra, P. R. T. Schipper, O. V. Grit- senko, J. G. Snijders, and E. J. Baerends, Density-functional-theory response-property calculations with accurate exchange-correlation po- tentials, Phys. Rev. A 57, 2556–2571 (1998). 168 Bibliography

[243] G. A. Parker and R. T. Pack, van der Waals interactions of carbon monoxide, J. Chem. Phys. 64, 2010–2012 (1976).

[244] S. J. A. van Gisbergen, J. G. Snijders, and E. J. Baerends, Calculating frequency-dependent hyperpolarizabilities using time-dependent density functional theory, J. Chem. Phys. 109, 10644–10656 (1998).

[245] W. F. Chan, G. Cooper, and C. E. Brion, Absolute optical oscillator strengths for discrete and continuum photoabsorption of carbon mono- xide (7-200 eV) and transition moments for the X 1Σ+ → A1Π system, Chem. Phys. 170, 123–138 (1993).

[246] E. S. Nielsen, P. Jørgensen, and J. Oddershede, Transition moments and dynamic polarizabilities in a second order polarization propagator approach, J. Chem. Phys. 73, 6238–6246 (1980).

[247] D. P. Shelton and J. E. Rice, Measurements and calculations of the hyperpolarizabilities of atoms and small molecules in the gas phase, Chem. Rev. 94, 3–29 (1994).

[248] H. Sekino and R. J. Bartlett, Molecular hyperpolarizabilities, J. Chem. Phys. 98, 3022–3037 (1993).

[249] M. A. Spackman, Accurate prediction of static dipole polarizabilities with moderately sized basis sets, J. Phys. Chem. 93, 7594–7603 (1989).

[250] J. F. Ward and C. K. Miller, Measurements of nonlinear optical po- larizabilities for twelve small molecules, Phys. Rev. A 19, 826–833 (1979).

[251] C. C. Teng and A. F. Garito, Dispersion of the nonlinear second-order optical susceptibility of organic systems, Phys. Rev. B 28, 6766–6773 (1983).

[252] P. Sa lek, O. Vahtras, T. Helgaker, and H. Agren,˚ Density-functional theory of linear and nonlinear time-dependent molecular properties, J. Chem. Phys. 117, 9630–9645 (2002).

[253] C. K. Miller and J. F. Ward, Measurements of nonlinear optical po- larizabilities for some halogenated methanes: The role of bond-bond interactions, Phys. Rev. A 16, 1179–1185 (1977). Bibliography 169

[254] E. R. Davidson, B. E. Eichinger, and B. H. Robinson, Hyperpolariz- ability: Calibration of theoretical methods for chloroform, water, ace- tonitrile, and p-nitroaniline, Opt. Mater. 29, 360 (2006).

[255] J. Hammond and K. Kowalski, Parallel computation of coupled-cluster hyperpolarizabilities, J. Chem. Phys. 130, 194108 (2009).

[256] J.-M. Colmont, D. Priem, P. Dr´ean,J. Demaison, and J. E. Boggs, Rotational spectra of the isotopic species of chloroform: Experimental and ab initio structures, J. Mol. Spectrosc. 191, 158–175 (1998).

[257] D. A. Kleinman, Theory of second harmonic generation of light, Phys. Rev. 126, 1961–1775 (1962).

[258] R. Bersohn, Y.-H. Pao, and H. L. Frisch, Double-quantum light scat- tering by molecules, J. Chem. Phys. 45, 3184–3198 (1966).

[259] M. Jen and J. D. R. Lide, Molecular structure of chloroform, J. Chem. Phys. 36, 2525–2526 (1962).

[260] P. Reinhart, Q. Williams, and T. Weatherly, Microwave measure- ments of the dipole moments of CFCl3 and CHCl3 and their pressure- broadened spectra, J. Chem. Phys. 53, 1418–1421 (1970).

[261] H. A. Stuart and H. Volkmann, Experimentelle Untersuchungen des elektrischen Kerreffekts an Gasen und D¨ampfenbei h¨oheren Tempera- turen, Ann. Physik 410, 121–149 (1933), as cited in Landolt-B¨ornstein, Zahlenwerte und Funktionen (Springer-Verlag, West Berlin, 1951), Vol. I, Part 3, p. 511.

[262] F. D. Vila, D. A. Strubbe, Y. Takimoto, X. Andrade, A. Rubio, S. G. Louie, and J. J. Rehr, Basis set effects on the hyperpolarizability of CHCl3: Gaussian-type orbitals, numerical basis sets and real-space grids, (J. Chem. Phys.), accepted.

[263] L. Hedin, New method for calculating the one-particle Green’s function with application to the electron-gas problem, Phys. Rev. 139, A796– A823 (1965). 170 Bibliography

[264] L. Reining, G. Onida, and R. W. Godby, Elimination of unoccupied- state summations in ab initio self-energy calculations for large super- cells, Phys. Rev. B 56, R4301–R4304 (1997), In this work, the authors avoid the unoccupied states by resorting to a type of Sterneheimer equa- tion. But they solve it by direct inversion instead of using an iterative method, spoiling the scalability of their approach.

[265] F. Giustino, M. L. Cohen, and S. G. Louie, GW method with the self-consistent Sternheimer equation, Phys. Rev. B 81, 115105 (2010).

[266] R. Resta and D. Vanderbilt, Theory of polarization: A modern ap- proach, In Physics of Ferroelectrics pages 31–68. Springer-Verlag Berlin (2007).

[267] G. F. Bertsch, J.-I. Iwata, A. Rubio, and K. Yabana, Real-space, real- time method for the dielectric function, Phys. Rev. B 62, 7998–8002 (2000).