Daubechies wavelets Laura E. Ratcliff Fragment approach to...

15
Fragment approach to constrained density functional theory calculations using Daubechies wavelets Laura E. Ratcliff , , Luigi Genovese, Stephan Mohr, and Thierry Deutsch Citation: The Journal of Chemical Physics 142, 234105 (2015); doi: 10.1063/1.4922378 View online: http://dx.doi.org/10.1063/1.4922378 View Table of Contents: http://aip.scitation.org/toc/jcp/142/23 Published by the American Institute of Physics

Transcript of Daubechies wavelets Laura E. Ratcliff Fragment approach to...

Page 1: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

Fragment approach to constrained density functional theory calculations usingDaubechies wavelets

Laura E. Ratcliff, , Luigi Genovese, Stephan Mohr, and Thierry Deutsch

Citation: The Journal of Chemical Physics 142, 234105 (2015); doi: 10.1063/1.4922378View online: http://dx.doi.org/10.1063/1.4922378View Table of Contents: http://aip.scitation.org/toc/jcp/142/23Published by the American Institute of Physics

Page 2: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

THE JOURNAL OF CHEMICAL PHYSICS 142, 234105 (2015)

Fragment approach to constrained density functional theory calculationsusing Daubechies wavelets

Laura E. Ratcliff,1,2,a) Luigi Genovese,2 Stephan Mohr,2 and Thierry Deutsch21Argonne Leadership Computing Facility, Argonne National Laboratory, Lemont, Illinois 60439, USA2Université de Grenoble Alpes, CEA, INAC-SP2M, L_Sim, F-38000 Grenoble, France

(Received 18 March 2015; accepted 26 May 2015; published online 16 June 2015)

In a recent paper, we presented a linear scaling Kohn-Sham density functional theory (DFT) codebased on Daubechies wavelets, where a minimal set of localized support functions are optimizedin situ and therefore adapted to the chemical properties of the molecular system. Thanks to thesystematically controllable accuracy of the underlying basis set, this approach is able to providean optimal contracted basis for a given system: accuracies for ground state energies and atomicforces are of the same quality as an uncontracted, cubic scaling approach. This basis set offers, byconstruction, a natural subset where the density matrix of the system can be projected. In this paper,we demonstrate the flexibility of this minimal basis formalism in providing a basis set that can bereused as-is, i.e., without reoptimization, for charge-constrained DFT calculations within a fragmentapproach. Support functions, represented in the underlying wavelet grid, of the template fragmentsare roto-translated with high numerical precision to the required positions and used as projectors forthe charge weight function. We demonstrate the interest of this approach to express highly preciseand efficient calculations for preparing diabatic states and for the computational setup of systems incomplex environments. C 2015 AIP Publishing LLC. [http://dx.doi.org/10.1063/1.4922378]

I. INTRODUCTION

Density functional theory (DFT)1,2 is arguably the mostpopular approach to electronic structure calculations for a widerange of systems. However, it suffers from various well-knownlimitations, like, for example, the self-interaction problem3,4

which can result in electron delocalization errors, and the factthat it is, in principle, a ground state theory only. For thesereasons, the DFT formalism has been extended in the form ofconstrained DFT (CDFT)5 to include an additional constrainton the density, so that the lowest energy state satisfying a givencondition can instead be found. When a reasonable guess forsuch a condition is at hand, it can therefore be used both tofind a particular excited state of the system and to localizethe electronic density in such a way as to prevent spuriousdelocalization and thus to provide a way of overcoming theabove problems. Of course, time-dependent DFT (TDDFT)6

can be used to find multiple excited states; however, whenone is interested in a particular excited state, CDFT can beadvantageous; especially, given that the additional costs asso-ciated with adding a constraint are relatively low. Further-more, TDDFT also suffers from self-interaction problems andcan give inaccurate results for certain types of excited states,including charge transfer excitations.

Constrained DFT has been implemented in a number ofcodes, using both localized basis sets7 and plane waves,8,9 andhas been successfully applied in a variety of contexts, includ-ing charge constrained molecular dynamics,8 the calculationof the correct energy alignment of metal/molecule interfaces10

a)[email protected]

and the calculation of electronic coupling matrix elements.11,12

For a general overview of CDFT, see Ref. 13.As with all DFT calculations, the choice of basis set has

a large impact on both the accuracy and computational cost ofCDFT. One way of accessing large systems is to reformulatethe standard cubic scaling approach to DFT in terms of local-ized orbitals, or “support functions,” which we will discussfurther in Sec. II A. We wish to perform CDFT calculationson large systems using such an approach, whilst maintainingthe high accuracy associated with systematic basis sets. Assuch, we require a basis set which is at the same time localizedand systematic. For this reason, we have chosen to use aDaubechies wavelet basis set,14 as it is a systematic basis setexhibiting the desired properties of compact support in bothreal and Fourier space and can be chosen to be orthogonal.Wavelet basis sets have an inherent flexibility, in that theyallow for multiresolution grids, which is particularly useful forinhomogenous systems. Combined with the ability to explic-itly treat charged systems in open boundary conditions, wave-lets provide an ideal basis set for accurate CDFT calculationsof large systems.

In this paper, we show that the combination of a supportfunction approach with a wavelet basis set allows for the defi-nition of a flexible fragment based approach to CDFT, whichcan further reduce the computational cost, particularly for verylarge systems. In this approach, a set of support functions areoptimized for an isolated (small) molecule, or “fragment,” andreused as a fixed basis in a larger system containing many ofthese molecules, e.g., a solvent. It is then straightforward toassociate the constrained charge with a given fragment using aLöwdin like definition of the CDFT weight function. However,in the larger system, each molecule may well have a different

0021-9606/2015/142(23)/234105/14/$30.00 142, 234105-1 © 2015 AIP Publishing LLC

Page 3: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

234105-2 Ratcliff et al. J. Chem. Phys. 142, 234105 (2015)

orientation and so the support functions, which are describedin terms of the fixed wavelet grid, cannot simply be duplicatedfor each molecule.

Therefore, we have developed a scheme to reformat thesupport functions for arbitrary roto-translations using inter-polating scaling functions. This interpolation, thanks to theproperties of the underlying basis set, results in only a negli-gible loss of accuracy and so the support functions can bedirectly reused, reducing the computational cost by an order ofmagnitude compared to optimizing the support functions fromscratch for the full system.

In Secs. II and III, we will first summarize our approach tolarge scale DFT calculations using localized support functionsrepresented in a wavelet basis set,15 as implemented in theBigDFT electronic structure code.16 We will then outline ourimplementation of CDFT, following which we will explain ourfragment approach, including a description of the reformat-ting scheme, and validating our method with calculations onprototypical systems. Finally, we will present an applicationof CDFT for the fullerene C60 in two different environments,through which we will demonstrate the flexibility and potentialof a fragment based approach.

II. METHODOLOGY

A. Linear scaling DFT with wavelets

We and others have recently presented a newly devel-oped method for DFT calculations on large systems, whichcombines the use of a minimal localized basis of “supportfunctions” with the use of an underlying wavelet basis set.15

This method has been implemented in BigDFT, which uses theorthogonal least asymmetric Daubechies family of order 16,which are depicted in Fig. 1. The Kohn-Sham (KS) orbitalsare expressed in terms of the support functions via a set ofcoefficients cαi ,

|Ψi⟩ =α

cαi |φα⟩, (1)

where the support functions are represented directly in thewavelet basis set localized on a 3 dimensional grid, so that theycan be thought of as adaptively contracted wavelets. Ratherthan working directly with the KS orbitals, we instead work interms of the density matrix, ρ(r,r′), which is itself defined interms of the support functions and the density kernel, Kαβ,

ρ(r,r′) =α,β

φα(r)Kαβφβ(r′). (2)

The density matrix has been shown to decay exponentiallywith distance for systems with a gap thanks to the so-callednearsightedness principle,17–22 and thus, a formulation in termsof the density matrix allows us to take advantage of this toachieve linear scaling with the number of atoms in the system,thereby avoiding the cubic scaling of standard approaches toDFT. From this, the charge density is calculated directly fromthe support functions and density kernel. Similarly, the bandstructure energy and the charge of the system can be calculatedfrom the density kernel via

EBS = Tr [KH] , N = Tr [KS] , (3)

where H indicates the Hamiltonian matrix in the basis of thesupport functions and S is the support function overlap matrix.

The support function formalism allows one to map thedegrees of freedom of KS orbitals into a localized description,which can be directly put in relation with atomic positions. Inpractice, the support functions are truncated within sphericallocalization regions with a user-defined radius, and some addi-tional truncation must be applied to the density kernel whichis then exploited via sparse matrix algebra to achieve a fullylinear scaling algorithm. Therefore, to some extent, a givensupport function φα can be associated to the atom a whereits localization region is centered. In order to achieve accurateresults, both the support functions and density kernel are opti-mized during the calculation; that is, the energy is minimizedwith respect to both quantities. Providing the localization re-gions are sufficiently large, this results in a minimal localizedbasis set with an accuracy equivalent to the underlying basisset.

The general scheme is common to other basis optimiza-tion for density-matrix minimization based linear scaling DFTcodes, e.g., ONETEP23 and Conquest,24 with the addition of afew novel features. These include the application of a confin-ing potential to the KS Hamiltonian, which ensures the sup-port functions remain localized. In order to apply the confin-ing potential consistently, we also enforce an approximateorthogonality constraint on the support functions, in contrastwith other approaches which use fully non-orthogonal supportfunctions.23,24 Furthermore, the properties of the description inthe wavelet basis are such that the algorithm guarantees that thePulay contribution to the atomic forces can safely be neglected,so the forces can be calculated accurately and cheaply.

The method can be divided into two key components: theoptimization of the support functions (either with or without aconfining potential) and the optimization of the density kernel.This latter point can be achieved via a choice of schemes,

FIG. 1. Least asymmetric Daubechies wavelet familyof order 2m = 16; both the scaling function ϕ(x) andwavelet ψ(x) differ from zero only within the interval[1−m,m].

Page 4: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

234105-3 Ratcliff et al. J. Chem. Phys. 142, 234105 (2015)

as detailed previously.15 These include a direct minimizationapproach, where the coefficients cαi are first updated usingdirect inversion of the iterative subspace (DIIS) or steepestdescents to minimize the band structure energy and thenused to construct the density kernel, and the Fermi OperatorExpansion (FOE) method, where the density kernel is ex-pressed as a function of the Hamiltonian matrix which can beevaluated numerically using a Chebyshev polynomial expan-sion. Close attention has also been paid to the parallelizationof the code, such that massively parallel machines can beexploited to perform large scale calculations (see also Ref. 25).For charged calculations, we have found the use of the directminimization method to be the most suitable, due to a reduc-tion in the occurrence of charge sloshing during convergence,and the flexibility afforded by working with the wavefunctioncoefficients rather than directly with the density kernel as inthe FOE method.

B. Atomic charge analysis

The mapping between electronic and localized degrees offreedom which is provided by the support function formalismallows one to perform an accurate atomic charge analysis,meaning that each atom is assigned a partial net charge, suchthat the electrostatic properties of the system are conserved.Obviously, this conservation is only possible within a certainlimit, as one is mapping a continuous quantity (the electroniccharge) to a discrete quantity (the atomic point charges). If,however, the error introduced by this mapping onto pointcharges is small enough, the system under investigation canbe reasonably approximated by a simple setup of chargedpoint particles, which paves the way for future applicationssuch as coupling different levels of accuracy within the samecalculation.

Given the overlap matrix S and the density kernel K, thepartial charge located on atom a can be defined by the so-calledLöwdin charge,

qa =(a)α′

�S1/2KS1/2�

α′α′, (4)

where the sum runs over all support functions α′ which arelocated on atom a. Obviously,

a qa = Tr(KS) = N , i.e., the

total charge (the monopole) is conserved. In order to checkwhether higher multipoles can also be conserved, we comparedthe dipole moment calculated using this approach with thatcalculated using the continuous charge density. In addition, acomparison with the dipole moment calculated with the cubic

scaling version of BigDFT was done as a reference. The valuesfor a strongly polarized molecule (H2O) and a non-polarizedone (C60) are given in Table I.

As a second test of the reliability of our method, wedirectly compared the atomic point charges with those calcu-lated by performing a Bader charge analysis of the chargedensity calculated using the cubic scaling approach. The Badercharge analysis also preserves the total value of the monopole,at the price of partitioning the domain in regions belongingexclusively to one atom. This would result in a less stableand somehow ad hoc estimation of the regions belonging toeach atom. The Löwdin procedure however is intrinsicallyquantum-mechanical as the projection in Eq. (4) implicitly“weights” the interstitial regions with the overlap of the sup-port functions. In Table II, we show that the differences be-tween the exact results are smaller with our approach. In partic-ular, for the C60 fullerene, reasons of symmetry impose that thecharge should be equally distributed and no atom should carrya net charge. As can be seen, the Löwdin procedure comescloser to this result than the Bader analysis.

C. Constrained DFT

The general idea of constrained DFT is to force a chargeto remain localized in a given region of the simulation space.This is achieved via the addition of a Lagrange multiplier termto the Kohn-Sham energy functional which enforces a givenconstraint on the resulting electronic density, so that ratherthan being the ground-state density of the system, the densityinstead corresponds to a particular excited state. This Lagrangemultiplier can also be thought of as an additional appliedpotential, otherwise referred to as the constraining potential.The constraint can also take a number of other forms, but forthe purposes of this work we are interested only in constrainingthe charge. The new functional therefore becomes

W [ρ,Vc] = EKS [ρ] + Vc

(w (r) ρ (r) dr − Nc

), (5)

where EKS is the Kohn-Sham energy functional, Vc is theaforementioned Lagrange multiplier, Nc is the required chargewithin the specified region, and w(r) is a weight functionwhich defines this region. The weight function and Nc aredefined in advance; however, the value of Vc which correctlyenforces the constraint must be found during the calculation.Wu and Van Voorhis26 demonstrated that the lowest energystate for which the constraint is correctly applied is in facta maximum with respect to Vc and so it becomes possible

TABLE I. Dipole moments calculated using the exact charge density for the cubic and linear scaling approaches,respectively, and using the partial atomic point charges. The quantity dex · d indicates the cosine of the anglebetween the dipole vector and the exact dipole. All other values are given in atomic units.

Cubic Linear

Exact dipole Exact dipole Point charge approximation

H2O (0.463, −0.506, −0.186) (0.466, −0.510, −0.187) (0.606, −0.668, −0.247)Norm 0.711 0.716 0.935dex · d 1 0.999 999 6 0.999 989 7

C60 (−0.0004, −0.0004, −0.0004) (−0.025, −0.025, −0.025) (−0.055, −0.055, −0.055)

Page 5: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

234105-4 Ratcliff et al. J. Chem. Phys. 142, 234105 (2015)

TABLE II. Atomic point charges, calculated by a Bader analysis of thecharge density from the cubic scaling approach, and the Löwdin procedureusing the density kernel and overlap matrix from the linear scaling approach.For H2O, we indicate the values on all three atoms, and for C60, we give themean of the absolute values together with the standard deviation. All valuesare given in atomic units.

Cubic—Bader Linear—Löwdin

H2O (0.61, 0.67, −1.27) (0.42, 0.41, −0.83)C60 0.061 ± 0.045 0.003 ± 0.002

to efficiently determine the correct Vc. It is also straightfor-ward to add multiple constraints to the system, and indeed,one is frequently interested in constraining the charge differ-ence between two regions. This feature is important for thesimulation of charge-transfer excitations within the CDFTformalism.

Rewriting the new functional (Eq. (5)) in density matrixform as7

W [ρ,Vc] = EKS [ρ] + Vc (Tr [Kw] − Nc) , (6)

the charge constraint is easily added to the existing algorithmin BigDFT. This construction requires the weight matrix, wαβ,which is defined via the weight function as

wαβ =

φα (r) w (r) φβ (r) dr. (7)

It then remains to define the weight function, for which a num-ber of different schemes exist. The support function approachused here lends itself to a Löwdin like definition, which isanalogous to that used above to determine atomic charges.Using this approach, we directly construct the weight matrixvia

wαβ =(S

12 PS

12

)αβ, (8)

where S is the overlap matrix between support functions andP is a projection matrix, defined as 1 for all support functionsbelonging to the region where a constraint is being appliedand 0 elsewhere. Alternatively, if one is constraining a chargedifference between two regions, it should be set to 1 on one ofthe regions, −1 on the other, and 0 elsewhere.

The final step, once the weight function has been defined,is to derive a scheme for finding the correct value of Vc fora given charge constraint value, Nc. There are two possibleapproaches to the optimization. In the first approach, one canfind the optimum value of Vc at each step of the self-consistentdensity optimization, i.e., the ground state density is updatedin an outer loop, with Vc updated in an inner loop. Alterna-tively, the second approach consists of fully minimizing thefunctional W [ρ,Vc] of Eq. (6) with respect to the density fora fixed value of Vc, updating Vc and finding the new minimumdensity, then repeating to convergence, i.e., the maximizationwith respect to Vc is performed in an outer loop with theground state density found self-consistently in an inner loop.We chose the latter, as it was observed to be more stable. Weuse Newton’s method to update Vc, with the second derivativecalculated using a finite difference approach.

D. Fragment approach

The combination of the novel features described aboveand the use of a wavelet basis set make this approach idealfor the application of CDFT to large systems. In particular,the ability to reuse the support functions can result in signifi-cant savings, for e.g., geometry optimizations and calculationson charged systems, as previously demonstrated.15 Further-more, this idea of support function reuse can be extended toa fragment based approach, which is similar to the so-calledfragment orbital method which has been used to calculateelectronic coupling matrix elements.12,27,28

The central idea is to take a group of atoms, or morespecifically an isolated molecule, and fully optimize the sup-port functions. These support functions are then used as a fixedbasis for a system containing several molecules, as illustratedin Fig. 2 for a simple example. We refer to the initial moleculefor which the support functions were optimized as the “tem-plate” molecule.

As the support functions are kept fixed in the fragmentapproach, wαβ need only be calculated once at the start ofthe calculation, after which it remains fixed. Furthermore,due to the quasi-orthogonality of the support functions, whenthe fragment approximation is justified, S

12 can in general be

calculated using a Taylor approximation, and so, the calcu-lation of the weight matrix adds very little overhead to thecalculation.

In this work, we focus on systems where the respectivefragments are well defined, and thus, the support functionsgenerated from the isolated fragments can be used for the fullsystem with a minimal impact on the accuracy. In cases whereelectrons are being added to a fragment, it is important to

FIG. 2. The fragment approach as illustrated for a cluster of water molecules:the support functions are initially optimized for an isolated water moleculeand then duplicated for a collection of water molecules, avoiding the need foroptimization in the larger system.

Page 6: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

234105-5 Ratcliff et al. J. Chem. Phys. 142, 234105 (2015)

ensure that the lowest unoccupied molecular orbital (LUMO)and, if necessary, the next few states in energy are sufficientlywell represented by the support function basis. As discussedelsewhere,15 this can be achieved using the direct minimiza-tion formalism to optimize a few additional states during theisolated calculation without adding a charge to the system.For systems where the fragments are less well defined, theimplementation could, in principle, be extended to further opti-mize the support functions for the combined system, either ina neutral state or while the charge constraint is being enforced.In such cases, the Löwdin approach is also expected to be lessaccurate, and so, it would be desirable to use an alternativeform for the weight function.

Finally, it should be mentioned that there are some subtle-ties related to the initial guess for the charge density. Thisdepends on the initial density kernel, which is constructedfrom the fragment KS orbitals. For neutral calculations, it isstraightforward to use the fragment orbitals and occupanciesdirectly from the isolated calculations; however, for chargedcalculations, some additional input is required. One approachwould be to occupy the fragment orbitals in order of theirenergies; however, this can lead to charge distributions whichare significantly different from the required constraint. Thiscan result in slow convergence, or even worse, problems withlocal minima. A better approach should therefore take intoaccount the effect of the constraining potential on the fragmentorbital energies. This can be done by assigning occupationnumbers so that any excess/deficit in charge is localized onthe same fragment as the constraint, so that the initial densityalready satisfies the charge constraint. Alternatively, the riskof encountering a local minimum can be reduced by addinga degree of noise to the fragment orbitals, or by completelyrandomizing the initial guess, subject to the correct overallcharge. However, such an approach is in general much slowerto converge, and thus, the latter strategy is generally not rec-ommended.

In addition, a comment can be made about the calculationof the atomic forces in the fragment approach: in Ref. 15, wehave shown that no additional Pulay terms are needed when thesupport functions are negligible close to the border of the local-ization region. As this feature is by construction valid evenin the fragment approach, no additional Pulay term is needed.The error in the atomic forces only depends on the Kohn-Shamresidue of the orbitals, which is compatible with the validityof the fragment approximation. For CDFT calculations, thesituation is different, as geometry optimization also requiresthe evaluation of the derivative of the charge-constraining termTr[Kw] with respect to the atomic positions.

E. Reformatting scheme for roto-translations

As the support functions are defined in terms of an under-lying grid of wavelets, in order to implement a fragmentapproach, it is necessary to have a scheme for reformatting thesupport functions due to a change in atomic positions. We arefrequently interested in situations where a molecule has beenrotated and translated, for example, when calculating elec-tronic coupling matrix elements in a dimer for varying anglesbetween the two monomers. Therefore, we have developed and

implemented a scheme for reformatting the support functions,given the axis and angle of rotation between some initial andfinal positions for a given fragment mass center.

A fragment of the system is defined by the user via a list ofatomic positions, which should of course be in bijection withthe atom list defining the template fragment. Therefore, thefirst problem is to identify the combination of translation androtation which sends the template fragment to the position ofthe system’s fragment. As a first step, two reference systemsare chosen such that the fragment center of mass is in the sameposition. This operation is equivalent to finding the translationbetween the template and the system. We then have two lists ofatomic positions, {RT ,S

a }, where T and S label the template andsystem fragment, respectively, and the subscript a, indicatingthe atom, ranges from 1 to N , the number of atoms in thefragment.

If the system fragment is a rigid displacement of the tem-plate (i.e., its internal coordinates are unchanged), the rotationmatrix R we seek is such that RS

a =N

b=1RabRTb. In general,

we should assume there is a slight modification of the internalcoordinates, as the geometry of the fragment might be affectedby the interaction with the environment. In this case, the matrixR is such as to minimize the cost function,

J(R) = 12

Na=1

∥RSa −

Nb=1

RabRTb ∥2. (9)

The determination of the matrixR in such a manner constitutesa version of the well-known Kabsch algorithm29 (also knownas Wahba’s problem),30 which can be solved by the singular-value decomposition of the 3 × 3 matrix31 Bi j =

Na=1(RS

a)i(RT

a ) j. After having found two matricesU andV and a diag-onal matrix S such that B = USV t, the optimal rotation is

R = UDV t, D = diag (1,1,det(U ) det(V)) . (10)

The value of J(R) defined in (9) might then be used to quantifythe validity of the rigid transformation approach. In the casewhere its value is below a given threshold (fixed to 10−3 in ourcase), we may proceed with the reformatting of the templatebasis functions, which will be denoted by |φTα⟩ in what follows.

As described in Refs. 15, 16, and 32 from the expres-sion of |φTα⟩ in a Daubechies wavelets basis set, the so-called“magic-filter” transformation can be used to define a real spacerepresentation of the basis functions, given in terms of one-dimensional interpolating scaling functions (ISFs),

φTα(x, y, z) =i, j,k

ci jk ϕi(x)ϕ j(y)ϕk(z), (11)

where ϕi(x) ≡ ϕ(x/h − i) is one element of the ISF basis set,which is constituted of uniform translations of the motherfunction ϕ(t) over the points of a uniform grid of spacingh, covering the entire simulation domain. These points arelabeled by indices i j k. The points ri jk = (hi,h j,hk) thereforelie within the box containing the support of φTα(r).

This real-space expression is optimal in the sense thatit preserves the same moments of the original representationgiven in Daubechies wavelets. The interpolating property ofthe ISF basis set is such that ci jk = φTα(ri jk). Let us supposewe have a one-dimensional function expressed in ISF, namely,f (x) =

i f iϕi(x). We know that f i = f (hi). If we want to

Page 7: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

234105-6 Ratcliff et al. J. Chem. Phys. 142, 234105 (2015)

translate the function f by a displacement ∆ and express thisfunction in the ISF basis, we have f (x + ∆) =

i f ′iϕi(x), with

f ′i = f (hi + ∆) =j

f i− jt∆j , (12)

where the filter t∆j = ϕ( j + ∆/h) implements the (uniform)translation. This filter has a limited extension (the same as thefunction ϕ(x)) and of course thkj = δ j,−k.

Imagine now, we have a different ISF basis set {ϕI(x)}defined on a uniform grid spacing of separation h and a refer-ence frame x I = hI, which is related to x by a more compli-cated transformation x(x) of the coordinate space. If this trans-formation can be inverted, by x(x), then a new function f (x)≡ f (x(x)) can be defined in this frame. For each grid point I,it is then always possible to find i in the old frame such as tominimize the absolute value of ∆I ≡ x(x I) − hi.

Using the above relations, we might approximate f (x)≃

I f IϕI(x), where

f I = f (x I) = f (hi + ∆I) =j

f i− jt∆Ij . (13)

If the transformation x is a continuous function of x whichvaries slowly enough, this is in general a rather good approx-imation (see Fig. 3).

This framework can be easily generalized to a roto-translation in three dimensions. Indeed, we would like toestimate the function,

φSα(r) ≡ φTα(r(r)) ≃

I,J,K

cI JK ϕI(x)ϕJ( y)ϕK(z), (14)

where the coordinates r = (x, y , z) are defined as

r = R · r, (15)

where R is calculated by Eq. (10). In addition, a rigid shiftvector s = (sx, sy, sz) is defined as the difference between thecoordinates of the center of mass of the two fragments. If therotation is the identity matrix, the template reference frame isthen r = r + s. As in the one dimensional case presented above,

the interpolation depends on the inverse mapping r(r). Wedetail in the following a procedure to identify such a function.

The coefficients cI JK of φSα(r) can be found in three steps.

We first start by considering the transformation law for x. Thistransformation can be thought of as a function of the templatecoordinates r,

x(x, y, z) = R11x + R12y + R13z. (16)

In the same spirit as Eq. (13), we may invert Eq. (16) withrespect to one template coordinate t = x, y, z into x in thesystem’s reference frame. The choice of the variable t dependson the entries of the rotation matrix, and it is in general givenby the coordinate which is multiplied by the coefficient of thehighest absolute value in Eq. (16). This choice guarantees thatthe t variable is the one for which x − t is slowly varying. Letus imagine t = x for this example. We can define the function,

φ(1)α (x, y, z) = φTα(x(x, y, z) − sx, y, z)

=I, j,k

cI, j,kϕI(x)ϕ j(y)ϕk(z), (17)

by proceeding for all j, k, as described in Eq. (13), to define thecoefficients cI, j,k. The second step is related to the expressionof y . Depending on the choice of the variable t in the first step,we have to consider one of these three relations,

R11 y = R21x + R33y − R32z, (18)R12 y = R22x − R33x + R31z, (19)R13 y = R23x + R32x − R31y, (20)

which hold when in the first step t = x, y, z, respectively. Theserelations can be derived using the orthogonality of the rotationmatrix R. This function can now be inverted with respect toone of the old variables. Again, this choice will depend on thevalues of the coefficients multiplying each variable.

In our example, we have to consider relation (18) as wehave chosen t = x in the first step. We choose to invert therelation with respect to z, having z = z(x, y , y). In this case,

FIG. 3. Plot showing the energy variation for a watermolecule rotated through different angles (θ) and axesof rotation (u). Results are shown for the standard cu-bic scaling approach (“cubic eggbox”), fully optimizedsupport functions (“linear eggbox”), and a fixed supportfunction basis generated for a template molecule (“tem-plate”). The cubic reference is the energy at the initialorientation calculated using the cubic approach; for thelinear and template approaches, it is the same quantitycalculated in the fully optimized support function basis.There is a roughly constant error of 1 meV/atom in thesupport function basis compared to the cubic scalingapproach. Selected orientations are shown along the bot-tom.

Page 8: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

234105-7 Ratcliff et al. J. Chem. Phys. 142, 234105 (2015)

we will have, as a second step,

φ(2)α (x, y , y) = φ

(1)α (x, y, z(x, y , y) − sz)

=I,J, j

cI, j,JϕI(x)ϕJ( y)ϕ j(y). (21)

In the third step, the remaining variable (which is y for theillustrated example) can be directly obtained from the inverserelation,

r = R−1 · r = R t · r, (22)

which is easier to express as R is an orthogonal matrix. In ourcase, the final result is therefore

φSα(x, y , z) = φ

(2)α (x, y(x, y , z) − sy, z). (23)

We recall that the definition of φ(1,2)α depends on the order ofthe operation. Here, we have chosen to interpolate first withrespect to x, then z and y . The best choice of order dependsonly on the entries of the matrix R.

1. Accuracy

In order to assess the accuracy of the reformatting scheme,we have applied it to a water molecule undergoing a seriesof rotations. Support functions were generated for a templatewater molecule, using a dense grid with a spacing of 0.132 Å,and were then reused for water molecules in a variety ofdifferent orientations using a less dense grid with a spacingof 0.185 Å. As a point of comparison, calculations were alsoperformed for each orientation fully optimizing the supportfunctions with a grid spacing of 0.185 Å. This allows us toquantify both the error introduced by the support functionreformatting and the errors due to representing the wavefunc-tions on a fixed grid, i.e., the so-called “eggbox effect.” Theeggbox effect of the standard cubic scaling approach is alsopresented. The computational setup was chosen such that thedifference in ground state energies between the cubic andsupport function approaches is of the order of 1 meV/atom.We used the local density approximation (LDA) exchange-correlation functional33 and HGH pseudopotentials34 withinisolated boundary conditions.

The results are shown in Fig. 3, where we can see thatthe eggbox effect is of the order of 0.1 meV/atom. As boththe cubic and linear scaling approaches use the same under-lying grid, the variation is similar in each case. The errordue to the interpolation also remains small—less than a fewmeV/atom. Importantly, the overall error for the reformat-ted calculations remains of the same order of magnitude asthat due to the selected localization radii of the support func-tions.

F. H2O dimer

As a more realistic test of the rototranslation procedure,we first wish to examine the extent of the basis set super-position error (BSSE) which is introduced by the fragmentapproach. In order to do so, we consider the case of a rigidwater dimer, results for which are shown in Fig. 4. We havevaried the length of the hydrogen bond (indicated in the figure),keeping the molecules rigid, using the same computationalsetup as in Sec. II E 1. The reformatted functions are extractedfrom template calculations of the isolated molecule in gas-phase. It is therefore not surprising that we obtain with thisapproach a basis set that would underbind the water dimer.As expected, the absolute error in the result depends on theseparation distance, and it is bigger at very short separationsfor a minimal number of support functions but converges toa relatively constant value of the order of 10 meV for largerdistances. The fragment approach is intended for use withfragments that are well separated; nonetheless, even for rela-tively short distances, the BSSE can be reduced by increasingthe number of support functions per atom that would thenbe able to include polarization effects of the charge densitydue to the presence of a neighboring molecule. Therefore, incases where it remains desirable to use the fragment approacheven for molecules in close proximity, this strategy shouldbe considered. In it worth noticing that even when the abso-lute error is of the order of few hundreds of meV, the erroron the dissociation curve is much less important, and thecurve still provides reasonable values for the equilibrium bondlengths.

FIG. 4. Plot showing the binding energy for a waterdimer, where the distance, R, corresponds to the lengthof the hydrogen bond, as indicated. The bottom panelshows the energy for the different approaches relative tothe respective energy at a large distance, and the insetshows the equilibrium bond length for each approach.For the fragment approach, the numbers indicate thenumber of support functions per hydrogen and oxygenatom, respectively. The upper panel shows the energy dif-ference with respect to the cubic value at each distance.

Page 9: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

234105-8 Ratcliff et al. J. Chem. Phys. 142, 234105 (2015)

III. RESULTS

Below we present results for three different systems,where the first two can be validated against CDFT implemen-tations in other codes. In each case, we continue to use theLDA, HGH pseudopotentials, and isolated boundary condi-tions. For carbon, nitrogen, and oxygen, we use four supportfunctions per atom; for hydrogen, we use one; and for zinc,we use nine.

A. N2

Wu and Van Voorhis have previously studied N235 and

so, this system provides a useful test case. We used a gridspacing of 0.185 Å with support function radii of 7.4 Å, i.e.,completely filling the simulation cell; here, we aim to validateonly the general correctness of the implementation of CDFTrather than the full fragment approach. Fixing the bond lengthat 1.12 Å, we have varied the charge separation between thetwo atoms, results for which are shown in Fig. 5. For simplicity,the calculations were performed only in the spin-averagedsense. Our results are closer to those obtained by Wu and VanVoorhis using a Becke weight population than the Löwdinscheme; however, given that we have used the LDA whereasthey used the B3LYP exchange-correlation functional36 we donot expect exact agreement. Furthermore, we should recallthat the fragment approach presented here is aimed at systemswhere the donor and acceptor are well separated, whereas theuse of support functions optimized for an isolated nitrogenatom is necessarily an approximation in this case. Nonetheless,we have successfully reproduced the correct trends for both theenergy and the Lagrange multiplier.

B. ZnBC

As a more elaborate test case, we take the zincbacterio-chlorin-bacteriochlorin (ZnBC-BC) complex, which has alsobeen studied previously in some detail, both with CDFT26,35

and other approaches, e.g., Refs. 37 and 38. This system isideally suited to our approach as the donor and acceptor areclearly separated. Furthermore, TDDFT has been shown togive incorrect energies for the ZnBC+-BC− and ZnBC−-BC+

charge transfer (CT) excited states38 and so the advantagesof CDFT are clear. It has previously been demonstrated thatthe differences between a (1,4)-phenylene-linked ZnBC-BCcomplex and a model complex where the link is eliminated aresmall;38 for simplicity, we therefore choose to use the latter,where the distance between the two previously linked carbonatoms is 5.84 Å, as depicted in Fig. 6. Taking the coordi-nates from Ref. 38, we relaxed the isolated ZnBC and BCmolecules separately, then built the model complex withoutfurther relaxation. We used a grid spacing of 0.185 Å andlocalization radii of 5.82 Å. To assess the accuracy of thefragment support functions, we compare the neutral energiesfor the model complex with those obtained using cubic scalingBigDFT. The results are shown in Table III, where we can seethat the errors for both the model complex and the isolatedmolecules are less than 1 meV/atom.

The energies for the two CT excited states relative to theunconstrained DFT ground state are 3.71 eV for ZnBC+-BC−

and 3.98 eV for ZnBC−-BC+, which is consistent with previousresults.26,35 We can also gain some insight into the nature ofthese CT states by plotting the difference in the electronicdensity between the neutral and constrained calculations, as inFig. 7. Not only is the charge transfer characteristic clear butthe plot for ZnBC+-BC− also shows remarkably good agree-ment with previous calculations that used the significantlymore expensive Bethe-Salpeter approach,37 which confirmsthat CDFT can be used to obtain physically relevant CT exci-tons and provide a reliable estimation of the correspondingexcitation energies.

We have also plotted the relationship between the con-straining potential, Vc, the total energy relative to the uncon-strained calculation, ∆E, and the charge difference betweenthe two molecules, Nc. This is shown in Fig. 8, where Nc

= 1 corresponds to ZnBC+-BC− and Nc = −1 corresponds toZnBC−-BC+; our results agree well with previous calcula-tions,26,35 despite the use of a different exchange-correlationfunctional. This test highlights the robustness of the method—in order for the correct value of Vc to be found within a minimalnumber of iterations of the constraint loop, there should bea smooth relationship between a given Vc and the resultingNc. If for certain values of Vc, the convergence is insufficient,

FIG. 5. Change in energy with respect to an uncon-strained calculation and applied potential value for dif-fering charge separations in N2. The fragment resultsare from this work, whereas the other values (Beckeand Löwdin) were taken from Ref. 35, where they usedB3LYP in a 6-31G* basis.

Page 10: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

234105-9 Ratcliff et al. J. Chem. Phys. 142, 234105 (2015)

FIG. 6. The ZnBC-BC model complex.

such that the final charge deviates from the correct value,this will negatively impact the search for the correct Vc. Weobserved that in general such a smooth curve is straightforwardto obtain, given a reasonable initial guess for the density kerneland therefore charge density. As discussed in Sec. II C, this canbe achieved by defining the initial occupancies in a mannerwhich is consistent with the desired charge difference.

C. C60

In order to accurately calculate material properties, itis important to account for environmental effects, e.g., byincluding a solvent or neighboring molecules in a molecularmaterial. However, this can considerably increase the costof a simulation, as in the case of large systems in solutionwhere the solvent must fill a correspondingly large volume.Various strategies have been developed for reducing the cost,for example, by using implicit solvation methods;39–42 how-ever, it is frequently desirable to treat explicitly the environ-mental degrees of freedom. Thanks to the fragment approach,the treatment of solvents and other surrounding molecules canreadily be achieved in BigDFT with relatively low cost, as wewill demonstrate through the example of the fullerene C60 intwo different environments: when in an aqueous solution andwhen surrounded by other C60 molecules. For each system, weconstrain a charge of ±1 to the central C60 molecule in order todetermine the environmental impact on the ionization potential(IP) and electron affinity (EA).

For traditional DFT calculations with semilocal func-tionals like LDA, it is well known that the above quantitiesare badly estimated by the frontier orbitals, i.e., the HOMO(LUMO) for the IP (EA). Therefore, in order to extract physi-

TABLE III. Energies for isolated ZnBC and BC, the neutral model ZnBC-BCcomplex and the two lowest energy CT states, as calculated using standardBigDFT (“Cubic”) and the fragment approach (“Frag.”). Where applicablethe difference between the two approaches is also indicated (“Diff.”).

Cubic Frag.

(eV) Diff. (meV)

ZnBC −4472.626 −4472.604 22.6BC −4471.998 −4471.980 17.7ZnBC-BC −8944.629 −8944.575 54.1ZnBC−-BC+ . . . −8940.592 . . .ZnBC+-BC− . . . −8940.860 . . .

FIG. 7. Density differences between the neutral and charged calculations forthe two charge transfer states. Red (blue) indicates an increase (decrease) inthe electronic charge density with respect to the neutral.

cally meaningful information, one must either use more expen-sive beyond-DFT approaches or instead calculate the IP andEA using the so-called ∆SCF method. This is made possiblewhen explicitly charged calculations are available, i.e., whencharged and neutral calculations have energies that can bemeasured with respect to a common reference. The treatmentof the electrostatic potential which is included in the BigDFTcode makes such a comparison possible.43 This latter approachresults in values which match experiment much better thantraditional semilocal functionals; indeed, our results for theIP and EA of the isolated molecule agree very well with theexperimental values of 7.6 eV44–46 and 2.7 eV,47 respectively.

On the other hand, when we wish to study how thesequantities vary for a molecule in an environment, with uncon-strained DFT calculations, the use of the ∆SCF approach ismuch more delicate: as the charge tends to be overly delocal-ized, charged calculations do not simply represent a pertur-bation from the isolated values, as discussed in more detailbelow. In other words, the calculated energy differences do notcorrespond to the IP and EA of C60 in an environment, but toa completely different quantity. If one wishes to calculate thisquantity, it is therefore essential to use CDFT.

1. Computational details

There have been a number of previous studies of C60 inwater, both experimental and theoretical;48–54 however, theyhave mainly focused on neutral fullerenes. Previous researchhas indicated the existence of a first hydration shell surround-ing C60 containing between 60 and 65 water molecules;48–50 wehave therefore chosen to restrict ourselves to systems contain-ing 66 water molecules. We present results for three examplestructures, which are depicted in Fig. 9(a). They were gener-ated by inserting the C60 into water droplets where the watermolecules were deposited with random orientations at random

Page 11: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

234105-10 Ratcliff et al. J. Chem. Phys. 142, 234105 (2015)

FIG. 8. Applied potential value and change in energycompared to an unconstrained calculation for differingcharge separations in the ZnBC-BC model complex.

positions subject to the room-temperature density of water.The structures were then relaxed until the RMS forces werebelow 10 meV/Å. For the environment of fullerenes, we limitthe cost of the simulations by including six nearest neighborfullerenes only, so that the system is arranged as a three dimen-sional cross, as depicted in Fig. 9(b). Each of the fullerenes wasconsidered in its gas-phase structure.

The fragment calculations were performed with a gridspacing of 0.185 Å, while the template calculations were per-formed using a denser grid of 0.132 Å to ensure accuratereformatting; we used support function radii of 4.23 Å. Thesevalues have been chosen such as to ensure the applicabilityof the Löwdin approach for the weight matrix on the cen-tral C60 whilst preserving absolute accuracy of the uncon-strained calculations to the order of 3 meV/atom, see data inSec. III C 2. In order to ensure the support functions aresufficiently accurate for the negatively charged calculations forC60, the template calculation was performed optimizing threeadditional states (to account for degeneracies).

We continue to use the LDA functional as the differencebetween the LDA and other treatments like PBE for the IPand EA of fullerenes has previously been shown to be negli-gible, and reasonable agreement with experiment has also beenobserved.55 We also neglected the modelling of dispersive

terms on the C60–C60 interactions due to their negligible impacton frontier orbital eigenvalues and on total energy differencesin charged calculations.

2. Testing the fragment approach

The results for the C60 structure with a center to centerdistance of 10 Å are shown in Table IV with the correspondingvalues for the isolated molecule. We also include the cubicscaling results as they allow us to assess the accuracy ofthe fragment approach for this system. As anticipated, forthe isolated molecule, the fragment error is of the order of0.2 eV, which is about 3 meV/atom. In order to confirm thatthis accuracy is preserved, we also compared unconstrainedcubic and fragment calculations for the seven C60 structure.To find an unconstrained solution, we built the initial guessfrom the fragment densities in such a manner that the chargewas equally distributed among fragments; the final solutionremained close to this charge distribution. We found valuesof −3.681 eV and 6.707 eV, i.e., the difference with the cubicresults is of the same magnitude as for the isolated molecule(see Table IV).

We have also investigated the effect of varying the sepa-ration between the molecules by repeating the constrained

FIG. 9. The different environments for C60.

Page 12: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

234105-11 Ratcliff et al. J. Chem. Phys. 142, 234105 (2015)

TABLE IV. Electron affinity and ionization potential for C60 when isolated and in the two environments. Twovalues are given for the isolated C60: that of the fragment approach, which in this case merely refers to a fixedsupport function basis as only one fragment is present, and the cubic scaling reference. For the results in water,constrained fragment results are given. For the nearest neighbor results (“in C60”), results are presented for both theconstrained fragment and (unconstrained) cubic approaches. The unconstrained results exhibit stronger deviationfrom the isolated values, showing that the environment is not correctly modeled as it is not acting as a perturbationof the system. Units are in eV.

Isolated In H2O In C60 (10 Å)

Cubic frag. A B C cdft Cubic

−EA −2.795 −2.589 −2.017 −2.728 −2.180 −2.854 −3.803IP 7.648 7.783 7.262 8.033 7.837 7.526 6.685

fragment and (unconstrained) cubic calculations with centerto center separations ranging from 10 Å to 20 Å, which corre-sponds to a shortest distance between molecules of 3.1 Å-13.1 Å. The results are plotted in Fig. 10. As expected, forlarge separations, the results tend towards the isolated values.For the unconstrained calculations, the variation of the IP andEA abruptly changes when the surrounding C60 moleculesapproach the central one, showing that the addition of a chargeno longer represents a perturbation, whereas the CDFT calcu-lations exhibit not only a smooth trend but also an exponentialrelationship with distance, proving that the fragment approachis sufficiently precise to capture such trends.

Thus far, we have only considered calculations with ashifting of the template support functions; however, we alsowish to demonstrate the effectiveness for rotated support func-tions. To this end, for a distance of 10 Å, the six outer fullereneswere collectively rotated along the z-axis by angles of 15◦, 45◦,and 90◦, with the orientation of the central molecule remainingunchanged. This was found to have a negligible impact onthe IP and EA, with a difference in the values for the variousorientations of around 0.01 eV for the constrained fragmentcalculations compared with 0.05 eV for the unconstrainedcubic calculations. Such values are too small to be significantcompared to the errors associated with the basis. In order todetermine whether the energies are truly unaffected by theorientation, it would be necessary to account for the dispersion

effects which are not captured by the LDA. However, the factthat no spurious errors are introduced by the rotating of thesupport functions serves to further confirm the accuracy of thereformatting scheme.

3. Comparison of environments

We now return to the results in Table IV in order tocompare the effect of the two environments. As expected,for both environments, the constrained values remain rela-tively close to the isolated results, certainly much closer thanthe unconstrained results for the fullerene environment. In asense, when the constraint is enforced, the presence of thesurrounding molecules could be thought of as a perturbationon the isolated state, although the strength of the perturbationis clearly much stronger for the water. To further explorethis, we have also plotted differences in the converged elec-tronic densities between the neutral and charged calculations inFig. 11. The effects of the charge constraint are clearly visible,with the excess charge distributed across the molecules forthe cubic calculation and much more clearly localized for theconstrained calculations. Furthermore, the charge differenceon the central molecule for the constrained calculations clearlyretains the same character as the respective isolated density,with the excess or deficit of charge also resulting in an induceddipole on the neighboring molecules. As expected, the impact

FIG. 10. Variation in electron affinity and ionization po-tential for increasing separations, where the distance ismeasured between the centers of neighboring molecules.The energy plotted is relative to the isolated value in therespective basis, i.e., ∆EA(IP)= EEA(IP)

isol. −EEA(IP)full , where

“full” refers to the 7 molecule system and “isol.” refersto the isolated molecule.

Page 13: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

234105-12 Ratcliff et al. J. Chem. Phys. 142, 234105 (2015)

FIG. 11. Density differences between the neutral and charged calculations for the fullerene when isolated, when surrounded by other fullerenes (with a centerto center distance of 10 Å), and when in water (structure A). The densities are plotted on the central plane with a logscale, with red (blue) indicating an increase(decrease) in the electronic charge density with respect to the neutral.

of the water is stronger than the neighboring fullerenes, wherethe closer proximity and stronger dipole moment of the wa-ter molecules result in a stronger deviation from the isolateddensity difference. Similar behavior has also been observed forthe water structures which are not depicted. We also performedunconstrained charged calculations for the water structuresusing the cubic approach, where we encountered significantdifficulties reaching convergence. Where a reasonably wellconverged solution could be obtained, the density differenceswere far from the constrained results, further emphasizing thesensitivity of the system.

As can be seen from the variation in IP and EA forstructures A, B, and C (Table IV), the effect of the wateris not only stronger than that of the neighboring fullerenes,but the dependence on the structure is also quite significant.Furthermore, we have also observed that the resulting ener-gies are strongly affected by the choice of weight function,which is not the case for the fullerene environment. Thereis some freedom in the procedure for optimizing the tem-plate support functions, e.g., the localization radii and thenumber of additional states included; we tested a few of thedifferent options. For the fullerene environment, the varia-tion in calculated IP and EA due to the choice of templateparameters was small and systematic, whereas for the aqueousenvironment, the variation was much stronger. Indeed, thefragment approach provides an ideal setup to explore theimpact of different weight functions—such a strong depen-dence would be harder to detect when considering only two orthree different choices. In future, the choice of weight functioncould also be decoupled from the fragment basis to allow for a

more thorough exploration of its influence in constraining thecharge.

Of course, in order to correctly assess the impact of theenvironment, one should go beyond the model structures usedhere, both in terms of the size and procedure used to generatethem. Furthermore, in the case of the water, proper samplingshould be performed over a number of different configurations,which should be generated at the correct temperature, e.g.,using molecular dynamics51,53 or Monte Carlo48,49 simula-tions. However, aside from the generation of input structuresand any eventual relaxations of the atomic coordinates, thefragment calculations are quick and easy to perform, requiringlittle additional setup aside from the template calculations.Furthermore, we have demonstrated both the accuracy andflexibility of the fragment approach for such systems. As such,given appropriate atomic coordinates this work could easilybe extended in future to a large number of configurations forboth environments, or indeed applied to other fullerenes orsolvents.

IV. CONCLUSION

We have presented a method for constrained DFT calcu-lations on large systems, using a fragment based scheme. Thishas been implemented in the BigDFT electronic structure codewithin a recently developed framework, which uses a basisof localized support functions represented in an underlyingwavelet grid to achieve linear scaling behavior with respectto system size while retaining the systematic accuracy of theunderlying grid. The division of a given system into fragments

Page 14: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

234105-13 Ratcliff et al. J. Chem. Phys. 142, 234105 (2015)

(ideally distinct molecules), each with its own associated sup-port functions, leads to a natural approach to CDFT, where thecharge is constrained to a given fragment via a Löwdin likedefinition of the weight function. This Löwdin approach canalso be used to straightforwardly calculate atomic charges, aswe have demonstrated.

Furthermore, by using a reformatting scheme which en-ables the reuse of support functions for identical fragments,irrespective of their position or orientation in the system, weare able to further reduce the cost of simulations by an or-der of magnitude, as the support functions can be separatelyoptimized for each “template” fragment and used as a fixedbasis in the system of interest. The properties of the waveletbasis set ease the implementation of reformatting a numericalfield given in real space, so that we were able to implementthis scheme in a manner which is both efficient and accurate.The flexibility of this method, together with the ability of theBigDFT code to treat systems with many atoms (see, e.g.,Ref. 25), makes it ideally suited for both neutral and chargedcalculations on very large systems at modest computationalcost.

We have presented results from two previously studiedsystems in order to validate our approach, as well as anexample application. For this latter point, we have performedcalculations on C60 in two different environments, namely, amodel nearest neighbor system containing seven fullerenesand in an aqueous solution. The effects of the constraint areclearly visible in the electronic densities, which we havecompared to the unconstrained and isolated results. We havealso shown that the presence of water has both a strongerimpact on the results and a stronger dependence on the choiceof weight function than the presence of neighboring fullerenes.

The reformatting approach described here has another keybenefit aside from reducing the cost of such calculations: as thebasis set for each fragment will remain equivalent followingthe reformatting, the computational setup provided by ourapproach is ideal where Hamiltonian matrix elements of thewhole system have to be considered. For example, for elec-tronic coupling matrix elements (“transfer integrals”) betweentwo identical monomers, the basis set for each monomer willremain equivalent following the reformatting, so that there isno ambiguity in the sign of the coupling matrix elements. Incontrast, for support functions optimized from scratch, thereis no guarantee that the phase for both the support functionsand wavefunction coefficients will be identical between thetwo molecules and thus the sign of the transfer integral cannotbe determined. Indeed, we have recently published results forsuch an application based on the framework presented in thecurrent work.56

In the future, we also hope to extend this work to permitcalculations on realistic nanoscale devices, using a multi-scaleapproach. In the first instance, this would involve changingthe definition of a fragment to an individual atom, whichnaturally leads to a DFT based tight-binding like method. Thisformalism also allows the correct definition of an “embedded”approach, where different regions of a simulation cell aretreated at different levels of precision, e.g., for a point defect ina bulk semiconductor, with higher accuracy close to the defect.Work is ongoing in this direction.

ACKNOWLEDGMENTS

We acknowledge funding from the European projectMMM@HPC (No. RI-261594), the CEA-NANOSCIENCEBigPOL project, and the ANR projects SAMSON (No. ANR-AA08-COSI-015) and NEWCASTLE (No. ANR-2010-COSI-005-01). This research used resources of the Argonne Lead-ership Computing Facility at Argonne National Laboratory,which is supported by the Office of Science of the U.S. Depart-ment of Energy under Contract No. DE-AC02-06CH11357.CPU time was also provided by IDRIS (Project No.i2014096905).

1P. Hohenberg and W. Kohn, Phys. Rev. 136, B864 (1964).2W. Kohn and L. J. Sham, Phys. Rev. 140, A1133 (1965).3J. P. Perdew and A. Zunger, Phys. Rev. B 23, 5048 (1981).4Y. Zhang and W. Yang, J. Chem. Phys. 109, 2604 (1998).5P. H. Dederichs, S. Blügel, R. Zeller, and H. Akai, Phys. Rev. Lett. 53, 2512(1984).

6E. Runge and E. K. U. Gross, Phys. Rev. Lett. 52, 997 (1984).7A. M. P. Sena, T. Miyazaki, and D. R. Bowler, J. Chem. Theory Comput. 7,884 (2011).

8H. Oberhofer and J. Blumberger, J. Chem. Phys. 131, 064101 (2009).9J. Rezác, B. Lévy, I. Demachy, and A. de la Lande, J. Chem. Theory Comput.8, 418 (2012).

10A. M. Souza, I. Rungger, C. D. Pemmaraju, U. Schwingenschloegl, and S.Sanvito, Phys. Rev. B 88, 165112 (2013).

11Q. Wu and T. Van Voorhis, J. Chem. Phys. 125, 164105 (2006).12H. Oberhofer and J. Blumberger, J. Chem. Phys. 133, 244105 (2010).13B. Kaduk, T. Kowalczyk, and T. Van Voorhis, Chem. Rev. 112, 321

(2012).14I. Daubechies, Ten Lectures on Wavelets (SIAM, 1992).15S. Mohr, L. E. Ratcliff, P. Boulanger, L. Genovese, D. Caliste, T. Deutsch,

and S. Goedecker, J. Chem. Phys. 140, 204110 (2014).16L. Genovese, A. Neelov, S. Goedecker, T. Deutsch, S. A. Ghasemi, A. Wil-

land, D. Caliste, O. Zilberberg, M. Rayson, A. Bergman, and R. Schneider,J. Chem. Phys. 129, 014109 (2008).

17W. Kohn, Phys. Rev. Lett. 76, 3168 (1996).18E. Prodan and W. Kohn, Proc. Natl. Acad. Sci. U. S. A. 102, 11635 (2005).19S. Ismail-Beigi and T. A. Arias, Phys. Rev. Lett. 82, 2127 (1999).20W. Kohn, Int. J. Quantum Chem. 56, 229 (1995).21L. He and D. Vanderbilt, Phys. Rev. Lett. 86, 5341 (2001).22R. Baer and M. Head-Gordon, Phys. Rev. Lett. 79, 3962 (1997).23C.-K. Skylaris, P. D. Haynes, A. A. Mostofi, and M. C. Payne, J. Chem. Phys.

122, 084119 (2005).24D. R. Bowler and T. Miyazaki, J. Phys.: Condens. Matter 22, 074207

(2010).25S. Mohr, L. E. Ratcliff, L. Genovese, D. Caliste, P. Boulanger, S. Goedecker,

and T. Deutsch, “Accurate and efficient linear scaling DFT calculations withuniversal applicability,” Phys. Chem. Chem. Phys. (published online).

26Q. Wu and T. Van Voorhis, Phys. Rev. A 72, 024502 (2005).27K. Senthilkumar, F. C. Grozema, F. M. Bickelhaupt, and L. D. A. Siebbeles,

J. Chem. Phys. 119, 9809 (2003).28K. Senthilkumar, F. C. Grozema, C. F. Guerra, F. M. Bickelhaupt, F. D.

Lewis, Y. A. Berlin, M. A. Ratner, and L. D. A. Siebbeles, J. Am. Chem.Soc. 127, 14894 (2005).

29W. Kabsch, Acta Crystallogr., Sect. A: Cryst. Phys., Diffr., Theor. Gen.Crystallogr. 34, 827 (1978).

30G. Wahba, SIAM Rev. 7, 409 (1965).31F. L. Markley, J. Astronaut. Sci. 36, 245 (1988).32A. Neelov and S. Goedecker, J. Comput. Phys. 217, 312 (2006).33D. M. Ceperley and B. J. Alder, Phys. Rev. Lett. 45, 566 (1980).34C. Hartwigsen, S. Goedecker, and J. Hutter, Phys. Rev. B 58, 3641 (1998).35Q. Wu and T. Van Voorhis, J. Chem. Theory Comput. 2, 765 (2006).36A. D. Becke, J. Chem. Phys. 98, 5648 (1993).37I. Duchemin, T. Deutsch, and X. Blase, Phys. Rev. Lett. 109, 167801 (2012).38A. Dreuw and M. Head-Gordon, J. Am. Chem. Soc. 126, 4007 (2004).39J. Tomasi and M. Persico, Chem. Rev. 94, 2027 (1994).40D. A. Scherlis, J.-L. Fattebert, F. Gygi, M. Cococcioni, and N. Marzari, J.

Chem. Phys. 124, 074103 (2006).41J. Fosso-Tande and R. J. Harrison, Chem. Phys. Lett. 561-562, 179 (2013).

Page 15: Daubechies wavelets Laura E. Ratcliff Fragment approach to ...bigdft.org/images/a/a8/1.4922378.pdf · Constrained DFT has been implemented in a number of codes, using both localized

234105-14 Ratcliff et al. J. Chem. Phys. 142, 234105 (2015)

42J. Dziedzic, H. H. Helal, C.-K. Skylaris, A. A. Mostofi, and M. C. Payne,Europhys. Lett. 95, 43001 (2011).

43A. Cerioni, L. Genovese, A. Mirone, and V. A. Sole, J. Chem. Phys. 137,134108 (2012).

44D. Lichtenberger, K. Nebesny, C. Ray, D. Huffman, and L. Lamb, Chem.Phys. Lett. 176, 203 (1991).

45J. Devries, H. Steger, B. Kamke, C. Menzel, B. Weisser, W. Kamke, and I.Hertel, Chem. Phys. Lett. 188, 159 (1992).

46J. A. Zimmerman, J. R. Eyler, S. B. H. Bach, and S. W. McElvany, J. Chem.Phys. 94, 3556 (1991).

47X.-B. Wang, C.-F. Ding, and L.-S. Wang, J. Chem. Phys. 110, 8217 (1999).48R. Rivelino and F. de Brito Mota, Nano Lett. 7, 1526 (2007).49R. Rivelino, A. M. Maniero, F. V. Prudente, and L. S. Costa, Carbon 44, 2925

(2006).

50P. Scharff, K. Risch, L. Carta-Abelmann, I. Dmytruk, M. Bilyi, O. Golub, A.Khavryuchenko, E. Buzaneva, V. Aksenov, M. Avdeev, Y. Prylutskyy, andS. Durov, Carbon 42, 1203 (2004).

51L. Li, D. Bedrov, and G. D. Smith, J. Chem. Phys. 123, 204504 (2005).52Y. I. Prylutskyy, A. S. Buchelnikov, D. P. Voronin, V. V. Kostjukov, U. Ritter,

J. A. Parkinson, and M. P. Evstigneev, Phys. Chem. Chem. Phys. 15, 9351(2013).

53S. Banerjee, J. Chem. Phys. 138, 044318 (2013).54N. Choudhury, J. Chem. Phys. 125, 034502 (2006).55M. L. Tiago, P. R. C. Kent, R. Q. Hood, and F. A. Reboredo, J. Chem. Phys.

129, 084311 (2008).56L. E. Ratcliff, L. Grisanti, L. Genovese, T. Deutsch, T. Neumann, D. Danilov,

W. Wenzel, D. Beljonne, and J. Cornil, J. Chem. Theory Comput. 11, 2077(2015).