Anisotropic and anharmonic effects through the t-matrix for Low-Energy Electron Diffraction

21
Computer Physics Communications 138 (2001) 281–301 www.elsevier.com/locate/cpc Anisotropic and anharmonic effects through the t-matrix for Low-Energy Electron Diffraction (TMAT V1.1) P.L. de Andres a,b,, D.A. King b a Instituto de Ciencia de Materiales (CSIC), Cantoblanco, E-28049 Madrid, Spain b Department of Chemistry, University of Cambridge, Cambridge CB2 1EW, UK Received 13 November 2000; accepted 17 April 2001 Abstract We describe how to compute non-diagonal t-matrices related to atoms vibrating in anisotropic and/or anharmonic potentials. The formalism has been implemented in a set of FORTRAN routines that can be easily interfaced with existing Low-Energy Electron Diffraction codes, providing a simple and economical way to describe anisotropy and anharmonicity in multiple- scattering calculations. The method is based on an expansion of the atomic probability distribution function. Two different methods are considered depending on whether the expansion is based on multipoles or on cumulants. 2001 Elsevier Science B.V. All rights reserved. PROGRAM SUMMARY Title of program: TMAT Catalogue identifier: ADOT Program Summary URL: http://cpc.cs.qub.ac.uk/summaries/ADOT Program obtainable from: CPC Program Library, Queen’s Univer- sity of Belfast, N. Ireland Computer: Alpha ev6-21264 (700 MHz) Operating system: Digital UNIX V5.0 Programming language: FORTRAN-90 High-speed storage required for the test run: 32 Mbytes Disk storage required: If desired, the program can write the t-matrix to a file as a simple interface with other programs No. of bits in a word: 64 No. of bytes in distributed program, including test data, etc.: 17 678 Distribution format: gzip file Keywords: Low-Energy Electron Diffraction, anisotropic/anhar- monic vibrations, full dynamical theories, multiple scattering cal- culations, t-matrix (expansions in cumulants or multipoles) Nature of problem We describe the FORTRAN-90 program TMAT v1.1 for the com- putation of non-diagonal t-matrices representing anisotropic and/or This program can be downloaded from the CPC Program Library under catalogue identifier http://cpc.cs.qub.ac.uk/summaries/ADOT * Corresponding author. E-mail address: [email protected] (P.L. de Andres). 0010-4655/01/$ – see front matter 2001 Elsevier Science B.V. All rights reserved. PII:S0010-4655(01)00239-9

Transcript of Anisotropic and anharmonic effects through the t-matrix for Low-Energy Electron Diffraction

Computer Physics Communications 138 (2001) 281–301www.elsevier.com/locate/cpc

Anisotropic and anharmonic effects through the t-matrix forLow-Energy Electron Diffraction (TMAT V1.1)

P.L. de Andresa,b,∗, D.A. King b

a Instituto de Ciencia de Materiales (CSIC), Cantoblanco, E-28049 Madrid, Spainb Department of Chemistry, University of Cambridge, Cambridge CB2 1EW, UK

Received 13 November 2000; accepted 17 April 2001

Abstract

We describe how to compute non-diagonal t-matrices related to atoms vibrating in anisotropic and/or anharmonic potentials.The formalism has been implemented in a set of FORTRAN routines that can be easily interfaced with existing Low-EnergyElectron Diffraction codes, providing a simple and economical way to describe anisotropy and anharmonicity in multiple-scattering calculations. The method is based on an expansion of the atomic probability distribution function. Two differentmethods are considered depending on whether the expansion is based on multipoles or on cumulants. 2001 Elsevier ScienceB.V. All rights reserved.

PROGRAM SUMMARY

Title of program: TMAT

Catalogue identifier: ADOT

Program Summary URL: http://cpc.cs.qub.ac.uk/summaries/ADOT

Program obtainable from: CPC Program Library, Queen’s Univer-sity of Belfast, N. Ireland

Computer: Alpha ev6-21264 (700 MHz)

Operating system: Digital UNIX V5.0

Programming language: FORTRAN-90

High-speed storage required for the test run: 32 Mbytes

Disk storage required: If desired, the program can write the t-matrixto a file as a simple interface with other programs

No. of bits in a word: 64

No. of bytes in distributed program, including test data, etc.: 17 678

Distribution format: gzip file

Keywords: Low-Energy Electron Diffraction, anisotropic/anhar-monic vibrations, full dynamical theories, multiple scattering cal-culations, t-matrix (expansions in cumulants or multipoles)

Nature of problemWe describe the FORTRAN-90 program TMAT v1.1 for the com-putation of non-diagonal t-matrices representing anisotropic and/or

This program can be downloaded from the CPC Program Library under catalogue identifier http://cpc.cs.qub.ac.uk/summaries/ADOT* Corresponding author.E-mail address: [email protected] (P.L. de Andres).

0010-4655/01/$ – see front matter 2001 Elsevier Science B.V. All rights reserved.PII: S0010-4655(01)00239-9

282 P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301

anharmonic atomic vibrations. TMAT can be integrated easily in anystandard Low-Energy Electron Diffraction program.

Method of solutionThe vibration of atoms in an anisotropic and/or anharmonic poten-tial is described by a probability distribution function. By expandingthis probability distribution function either in cumulants or in multi-poles we compute a scattering t-matrix that represents the effects ofthermal vibrations, static disorder and/or anharmonicity in the scat-tering of electrons by atoms.

Typical running timeUsing the cumulants method, a single energy takes 2.5 s forlmax=9. Running time scales withl6max.

References[1] J.B. Pendry, Low-Energy Electron Diffraction, Academic Press,

New York, 1974.[2] V. Fritzsche, Phys. Rev. B 50 (1994) 1922.[3] W. Moritz, J. Landskron, Surf. Sci. 337 (1995) 278.

LONG WRITE-UP

1. Introduction

An essential ingredient in Low-Energy Electron Diffraction (LEED) [1] calculations is the strong elasticscattering inducing multiple scattering effects that cannot be ignored for most of the materials of interest. A secondimportant ingredient is the strong inelastic interaction suffered by electrons with energies between 10–500 eV,making LEED mainly sensitive to the first few layers at the surface. This surface sensitivity in conjunction withthe rich and complex scattering processes created by multiple scattering [2] make the technique one of the mostaccurate ways to determine atomic positions on surfaces [3].

At finite temperatures these positions are not merely static, but affected by vibrations of the atoms aroundtheir equilibrium positions. Therefore, in order to obtain really accurate geometrical parameters, it is importantto describe these motions in the scattering process. So far, this has been done mostly by including the effectof isotropic atomic motion on the scattering t-matrix. Under this simplifying assumption, the t-matrix does notchange its structure with respect to theT = 0 case (i.e. it remains diagonal), making it extremely simple to includethis effect on the multiple scattering calculation needed for LEED analysis. However, the assumption of atomsvibrating isotropically near the surface region is extremely unlikely, as the surface itself breaks the symmetry veryeffectively at least between the parallel and the perpendicular directions to the surface.

Therefore, in order to take the accuracy of the technique to higher standards, a minimum description for non-isotropic vibrations is required. Furthermore, as the final goal of surface structural studies is always to learnsomething about the interaction potential between atoms in that region, it is important to be able to describeanharmonic effects that play a clear role in order to better understand surfaces. Finally, it would be highly desirableto gather information about the correlated motion of atoms at surfaces.

The first two objectives (including anisotropy and/or anharmonicity in full dynamical calculations) can behandled by expanding the probability distribution function (PDF) of the vibrating atom to get the scattering t-matrix from that expansion. The third is the more important, and still has not been adequately incorporated into theLEED formalism.

2. Physics background

The formalism is based on the relationship between the atomic temperature factor and the atomic PDF. The PDF,P(r), is defined as the probability of finding a given atom in the volume element d3r when it is displaced byrfrom its equilibrium position (assumed to be the zero Kelvin case). From this definition it is obvious that it should

P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301 283

be normalized to 1 when integrated over the whole space. The atomic temperature factor, orDebye–Waller factor,is defined as the Fourier transform of the PDF:

e−M =∫

P(r)ei(k′−k)r d3r, (1)

P(r) = 1

(2π)3

∫e−Me−i(k′−k)r d3(k′ − k), (2)

whereM = M(k′ − k), andk, k′ are related to incoming and outgoing plane waves, respectively.For a set of harmonic oscillators in thermal equilibrium at temperatureT , assuming a Boltzmann distribution

among the energy levels, it can be shown that the PDF is a Gaussian function of the displacementr. In the generalcase, it is necessary to consider the tensor of displacements, involving at least six parameters. However, for theparticular case where one can choose the three orthogonal Cartesian axes coinciding with the tensor’s principalaxes directions, the tensor is diagonal (which we shall assume in what follows) and the PDF can be written as afunction of three parameters,σz, σx, σy , representing the width of the Gaussians in the respective axis directions:

Pσ (r) = 1√8π3

1

σzσxσy

exp−(

z2

2σ 2z

+ x2

2σ 2x

+ y2

2σ 2y

). (3)

If correlations between atoms vibrating in the solid are neglected, it is possible to describe all the thermal effectsby computing aT -dependent t-matrix that is simply corrected by aDebye–Waller-like factor (strictly speaking,notice that the name applies to the factor correcting the intensities, e−2M ):

t (T , k′, k) = t0(k′, k)e− 12 〈(k−k′)r〉 = t (0, k′, k)e−M, (4)

where the notationt0(k′, k) has been introduced for the t-matrix computed atT = 0 K. It is clear from this equationthat the task of introducing thermal vibrations int is reduced to the calculation of theDebye–Waller factor.

We comment in passing that assuming that correlations between atoms can be neglected is a strong hypothesis,as short range correlations are expected to be important. A qualitative discussion of the possible reasons to neglectcorrelations has been given in [1], but the real test (i.e. a calculation of intensities with and without correlations) isstill missing in the frame of a multiple scattering theory.

Existing LEED formalisms (and programs based on them) demand a transformation of the above t-matrix froma plane-waves representation (k-space) to a spherical-waves representation (angular momentum space, orL-spacefor short). This is accomplished by expanding the t-matrix in a spherical harmonic basis:

t (T , k′, k) = 8π2∑

l′m′,lmt (T )l′m′;lmY ∗

l′m′(Ωk′)Ylm(Ωk). (5)

Using the orthonormality of spherical harmonics, the inverse relation is readily obtained:

t (T )L′M ′;LM = 1

8π2

∫dΩk

∫dΩk′ t (T , k′, k)YL′M ′(Ωk′)Y ∗

LM(Ωk). (6)

3. Multipoles expansion

3.1. Introduction

The expansion of the PDF in multipoles was first proposed by Moritz et al. [4], and it has been used to studyvibrations of CO/Ru(0001) and O+CO/Ru(0001) by Landskron et al. [5]. From a formal point of view, expandingin spherical harmonics is the most natural way to extend the previous isotropic formalism because the same set ofbasis functions have been used to solve the multiple scattering problem inside an atomic layer.

284 P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301

3.2. Formalism

According to Eq. (4), an expansion in multipoles for the temperature dependent t-matrix proceeds to expand theDebye–Waller factor in spherical harmonics:

e−M =∫

dΩr∫

r2drP (r)ei(k′−k)r =∑

L′M ′,LM

WL′M ′,LMYLM(Ωk)Y∗L′M ′(Ωk′). (7)

A simple way to identify the coefficientsWL′M ′,LM is to expand the PDF in terms of radial functions andspherical harmonics (n andlm components) as:

Pσ (r) =∑n;lm

Cn;lmRn(r, σn)Ylm(Ωr ). (8)

Further, we expand the exponentials in the Fourier transform in spherical harmonics, and after some straightfor-ward, but lengthy algebra, we find:

WL′M ′;LM(κ) = 16π2(−1)LiL+L′(−1)M

∑n;lm

BL′M ′,lm,LMCn;lmNn;L,L′(κ, σ ) (9)

with,

Nn;L′,L(κ, σ ) =∫

r2 dr Rn(r, σ )jL′(κr)jL(κr), (10)

whereκ = √2E, E being the energy in Hartrees. Owing to the importance of these coefficients for the method, a

full derivation of Eq. (9) has been included in Appendix A (the definition of Gaunt’s coefficients,BL′M ′,lm,LM , canbe found in Appendix E).

At this point, we can compute a temperature dependent t-matrix ink-space,t (T , k′, k), and using Eq. (6) we cantransform it to a spherical wave representation:

t (T )L′M ′,LM =∑

l′m′,lm

∑l′′m′′,l′′′m′′′

Wl′m′,lmt0l′′′m′′′,l′′m′′δl′′,l′′′δm′′,m′′′

× (−1)M+M ′Blm,l′′m′′,LMBl′m′,l′′m′′,L′M ′ . (11)

This is the basic quantity to be given to a LEED program to include thermal effects. The accuracy of thisapproximation will be determined by the value of the maximuml allowed in the different series inL-space, and bythe PDF multipole expansion quality (Eq. (8)). This point will be discussed further below.

3.3. The radial integral

The radial integral,Nn;L′,L(κ), can be computed numerically, but given a particular choice for the radialfunctions,Rn(r), an analytical expression can also be tried. This is a matter of computing time, but also ofaccuracy, as the integrand oscillates and some extra care has to be taken to get a properly converged numericalintegral. Therefore, at this point it is necessary to decide about the particular radial functions to be included in theexpansion.

We notice first that by using the orthonormality of spherical harmonics we immediately obtain thel′,m′components in Eq. (8):

Il′m′(r, σ) =∫

Y ∗l′m′P(r)dΩ =

∑n

Cn,l′m′Rn(r, σn). (12)

P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301 285

Then component depends on how we choose the Radial functions. Moritz and Landskron have suggested thatthese functions should be constructed using Gaussians:

Rn(r, σ ) ≡ RGn(r, σn) =√

2

π

r2n

(2n + 1)(2n− 1)!!σ 2n+3n

e−r2/(2σ 2n ); n = 0,1,2, . . . . (13)

These functions are normalized to 1 in the radial direction:∫ ∞

0 RGn(r, σn)r2 dr = 1.

Moritz and Landskron’s choice is a natural one for small anisotropy because in the isotropic case the PDF is aGaussian and onlyn = 0 needs to be considered (this will be exploited below to recover the isotropic limit).

However, because these functions are not orthogonal, different procedures can be devised to obtain then-component of the coefficientsCn,lm. On the other hand, a set of orthogonal radial functions would remove anyambiguity on the determination of the radial components, and sometimes this might be the preferred option:

Cn,lm(σ ;σ) =∞∫

0

r2 dr∫

ROn(r, σ )Y ∗lm(Ω)P(r,Ω; σ)dΩ =

∞∫0

r2ROn(r, σ )Ilm(r, σ)dr. (14)

An orthogonal set of radial functions can be achieved either by applying the Gram–Schmidt orthogonalizationmethod to a set of linearly independent functions, or by choosing a set of functions already known to be orthogonalwith the appropriate weight in the interval(0,∞). Although depending on the specific problem different choicescan be better than others, as an example of such an orthogonal basis we shall just mention second order associatedLaguerre polynomials:

Rn(r, σ ) ≡ ROn(r, σL) = 1

8σ 3L(n + 1)(n + 2)

e−r/(2σL)L(2)n

(r

σL

); n = 0,1,2, . . . . (15)

In Appendix B, analytical expressions for the radial integrals, Eq. (10), based in radial functions constructedwith Gaussians are given for the first two values ofn (no higher values forn have been considered necessary in theliterature yet).

3.4. Isotropic limit

As a test of consistency, we shall now recover the well-known isotropic limit (σ 2z = σ 2

x = σ 2y = σ 2). For this

case, the PDF does not depend on angular directions and we only needl = m = 0 in the spherical wave expansion.Moreover, we notice that the PDF is normalized to 1, and we can write:∑

n,lm

Cn,lm

∫Ylm(Ω)dΩ

∫Rn(r)r

2 dr =∑n,lm

Cn,lm

√4πδl,0δm,0 = 1 (16)

as the radial functions have been normalized to 1 in the radial direction. Therefore:√4π

∑n

Cn,00 = 1. (17)

For the isotropic case, using Gaussians as radial functions, we only need then = 0 component, and we concludethatC0,00 = 1√

4π.

In the multipole expansion method, the main task consists in computing the coefficients defined in Eq. (9)together with the integrals in Eq. (10). First, we notice that, as the only non-zero coefficient isC0;00, the Gaunt’scoefficient in Eq. (9) becomes(−1)MBL′M ′,00,LM = δL′,LδM ′,M/

√4π , proving thatWL′M ′,LM is diagonal, and so

is tl′m′,lm. Therefore, the integrals of the radial functions need only to be evaluated forL′ = L, which can be doneanalytically:

N0;L,L(κ) = 1

4πκσ 3

√π

2

∞∫0

xe−x2/(2σ 2)J 2L+1/2(κx) = 1

4πe−σ2κ2

iLjL(−iσ 2κ2). (18)

286 P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301

Notice that iLjL(−iσ 2κ2) = iL(σ2κ2) is related to the hyperbolic spherical Bessel function of 1st kind [6]. As

expected, this is a real function for real arguments.WL′M ′,LM becomes:

WL′M ′,LM = 16π2i2L(−1)L(−1)MBL′M ′,00,LMC0;00N0;L,L

= 4πe−σ2κ2iLjL(−iσ 2κ2)δL,L′δM,M ′ . (19)

Inserting this value in Eq. (11) we finally obtain for the diagonal t-matrix:

tl′m′,lm =∑L,l′′

4πe−σ2κ2iLjL(−iσ 2κ2)t0l′′

√(2L + 1)(2l′′ + 1)

4π(2l + 1)BL0,l0,l′′0δl′,lδm′,m (20)

which is the standard result [1]. A few intermediate steps used to recover this formula are given in Appendix C.

3.5. Computing the n-component of Cn,lm, and the parameter σn

When a set of non-orthogonal radial functions is used, there are several possible alternatives to determine then-component ofCn,lm parameters in the multipole expansion (l,m components are determined by Eq. (12)). As away of example, a least-squares approach would proceed as follows:∫

r2 dr

(∫P(r,Ω)Y ∗

lm(Ω)dΩ −∑n

Cn,lmRn(r, σ )

)2

= F(Cn,lm;σ), (21)

where, as usual, the unknowns are determined by the set of linear equations:

∂F

∂Cn,lm

= 0; n = 0,1,2, . . . . (22)

To includeσH in the same least-square procedure would make the problem non-linear, which is an unnecessarycomplication. The Gaussian-like functions are introduced to ensure the proper decay at very large distances, andthis can be used to obtainσn. However, depending on the particular case, other choices might be preferred.

We notice that to solve Eqs. (22) we need to perform integralsIlm defined in Eq. (12). In general, these integralsmight not be analytical and should be performed numerically. However, the integrals needed for a two-dimensionalanisotropic model (σz = σx = σy = σ‖) can be solved, and are given as an example in Appendix D.

4. Cumulants expansion

4.1. Introduction

The expansion of the PDF in cumulants was first proposed by Fritzsche [8], and was used to study vibrationsof K/Ni(100) by Loffler et al. [9]. This method uses techniques previously developed for TLEED [10,11]. In thesimplest approach to TLEED (the so-calledlinearized TLEED), the perturbation created in the atomic potential bydisplacing an atom a small distancer is given to first order by:

δV (r) = ∇V |r=0r. (23)

The change in the scattered amplitude can be computed to the same order from perturbation theory:

δA(k′) = 〈k′|δV (r)|k〉 = T αrα (α = z, x, y), (24)

whereT α is a tensor inL-space that carries the information of a full-multiple scattering calculation giving theLEED states〈k′|, and|k〉 for r = 0. Within this approach, and neglecting correlations between vibrations in the

P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301 287

different principal axes of the tensor of displacements, the change in intensity due to thermal effects is simplyrelated to the three mean square displacements along the three axes:

I (T ) = I zσ 2z + Ixσ 2

x + Iyσ 2y , (25)

whereIα is a tensor that has to be extracted from a full LEED dynamical calculation atT = 0 K. This methodwas proposed by de Andres et al., and it has been used to study the effect of thermal vibrations in Diffuse LEEDpatterns [12].

However, the amount an atom can be displaced from its equilibrium position before the linear approximationbreaks down was found to be very small. Therefore, Löffler et al. [13] have developed better approaches for TLEEDto describe atomic vibrations, with displacements that on some particular cases can be as large as 0.5 Å.

4.2. Formalism

Here we follow the formalism first put together by Fritzsche [8]. The main idea is to use the free space propagatorin L-space:

GL′M ′,LM(r) = 4π∑l′′,m′′

iL′−L−l′′(−1)M+m′′

jl′′(kr)Yl′′,−m′′ (Ωr )BL′M ′;l′′m′′;LM (26)

to define an operator,J ,

JL′M ′,LM = iL′−L

∫dΩk Y

∗L′M ′(Ωk)YLM(Ωk)e

ikr (27)

allowing us to relate the t-matrix of an atom displaced by an amountr to the undisplaced one,t (0):

t (r) = J (−r)t (0)J (r). (28)

The J operator can be obtained from a set of matricesMα that transform themselves as the Cartesian componentsof a vector:

J (r) = eiκ(zMz+xMx+yMy), (29)

where theMα matrices are defined in terms of Gaunt’s coefficients by:

MzL′M ′,LM

= iL′−L

√4π

3

∫dΩ Y ∗

L′M ′YLMY10, (30)

M±L′M ′,LM

= iL′−L

√4π

3

∫dΩ Y ∗

L′M ′YLMY1±1, (31)

Mx = 1√2(M− − M+); My = i√

2(M− + M+). (32)

To include thermal effects in the t-matrix, an average over the different displacements involved in the vibrationis needed. This is most conveniently done after using the Cambell–Baker–Hausdorff theorem of Lie algebra torewrite Eq. (28) as:

t = e−iκ∑

α rα[Mα,•]t (0). (33)

As t0 does not depend on the displacementr , this equation implies that all the averaging has only to be done inthe exponential. For a harmonic potential, the averaged t-matrix can be computed as a series expansion [8]:

t =∑n

t(n), (34)

288 P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301

where thet(n) are obtained from the following recurrence:

t (n+1) = − κ2

2(n+ 1)

∑α=x,y,z

σ 2α

(MαMαt(n) + t (n)MαMα − 2Mαt(n)Mα

)(35)

starting with the t-matrix of the non-vibrating atom:t (0) = (2π/κ) · e(iδl) sin(δl). For anharmonic vibrations, thisresult can be naturally generalized by making use of cumulants to characterize the PDF [14].

In the above derivation, it has been used that matricesMα commute. From the definition of these matrices itcan be seen that this is only true in an infinite-dimensional vector space (lmax = ∞), because for a givenlmax thecorresponding matrix elements need values related tolmax+ 1. For a fixed dimension space, as will always be thecase in a practical calculation, these commutators are not zero and introduce errors in the calculation of the orderof 1/lmax. Likewise, to recover the isotropic limit from the above formalism, the following relation is used:∑

α

MαMα = I (36)

which again does not hold exactly for a finitel = lmax.

5. Description of the program

TMAT is a FORTRAN 90 program for the computation of non-diagonal t-matrices related to vibrating atoms inanisotropic and/or anharmonic potentials. The main output of the program is a t-matrix in angular momentum spacesuitable to be read in in any standard LEED code computing full dynamical spectra. The ordering of(l,m) pairslabeling rows and columns of the matrix is the so-callednatural ordering: (0,0), (1,−1), (1,0), (1,1), (2,−2),(2,−1), (2,0), (2,1), (2,2), . . . etc. No particular effort to optimize the program for speed has been done in orderto keep it as clear as possible and to facilitate its use by other programs concerned with scattering problems.

5.1. Structure of TMAT

Matching the previous physical discussion, TMAT allows computation of the atomic t-matrix of an atom thatvibrates in an anisotropic harmonic potential characterized by the mean square displacements in the three principalaxes of the tensor of displacements. Both methods, expansion in multipoles or in cumulants, are provided so theuser can choose the best suited for a particular study. In theory, they are anticipated to be quite equivalent, butpractical considerations might dictate the choice. The cumulants expansion depends on an iterative process thatmust converge reasonably well, while the multipoles approach depends on how good approximation to the realPDF is provided by a finite expansion in radial functions and spherical harmonics. The cumulants expansion, beingbased in TLEED, is likely to run faster for most applications than the multipoles approach.

A sensitive parameter in the program is the maximum value for l,lmax. The program works with fixed dimensionsthat are defined at the compilation time by the parameterlmax included in file Header.lmx. This parameter allowsa simpler structure for the program, avoiding the necessity to include internal arrays to a given routine in itsarguments list and improving the readability and safety of the code.

Physical units used throughout the code are atomic units (1 Bohr= 0.0529 nm, 1 Hartree= 27.2 eV).

5.2. Program input

The main input file is read in the main program Tmat using unit 5 (standard input channel), and has the followingstructure (e.g.,tmat.inp):

Comment (character*72) Comment line (usually the name of the file).

P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301 289

Method (character*10) Either the wordcumulants or multipoles, to decide which method is to be used to computethe t-matrix.

NamePhaseShifts (character*72) The name for a file containing phase shifts for the considered atom.

Lmaxread (integer) Actual maximuml-value to compute t-matrix. This is checked internally againstlmax in fileHead.Lmx.

Energy (real) Energy in atomic units.

AlphaZ (real) Root mean square displacement inz-direction. It could be either an absolute value (in atomic units)or a relative factor (non-dimensional) to be multiplied later by the isotropic value derived from a Debye model(in atomic units, see Appendix D below for details).

AlphaX (real) Root mean square displacement inx-direction. Same use as AlphaZ.

AlphaY (real) Root mean square displacement iny-direction. Same use as AlphaZ.

Element Mass (real) Element mass (in units of the proton mass).

Debye Temperature (real) Debye temperature (Kelvin).

Temperature (real) Temperature (Kelvin).If the last three values are set to zero, they are ignored and root mean square displacements are taken fromvalues for AlphaZ, AlphaX and AlphaY (a.u.). If they are not set to zero, the program computes the mean squaredisplacement corresponding to an isotropic Debye model (high-temperature):

σ =√

3T

2mKB+2 ,

and the root mean square displacements to be used in the calculation are obtained by multiplying this value withthe input in AlphaZ, AlphaX and AlphaY (which are now interpreted as non-dimensional numbers).

Finally, parameters needed in the multipoles expansion approach are read by the main program:

n,l,m,Cn;l,m, σn (integer, integer, integer, real, real)n, l,m, the coefficientCn;l,m and the width of the Gaussianσn. The program reads values provided by the user until it reaches an end-of-file condition.

Phase shifts for a given element are read from unit 2 in routine readphsF (associated to NamePhaseShifts intmat.inp):

num-energies, lmaxr Number of different energies supplied and maximuml-value to be read.

energy Energy.

PhaseShifts(0:lmaxr) Phase-Shifts.

290 P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301

5.3. Routines in TMAT V1.1

In this subsection we give a brief description of the subroutines and functions in the code (further explanationsare given through comment lines inside the programs). The basic function of the MAIN program TMAT is to readin basic information contained in tmat.inp, and to decide whether to call subroutine cumulants or multipoles. Theroutines and functions called then are:

• ROUTINE readphsF — Reads in phase-shifts.• ROUTINEGaunt — Loads Gaunt’s coefficients (only physical and triangular coefficients are computed).• ROUTINEmultipoles — Reads in three Mean Square displacements in the three Cartesian axes,

reads in the coefficients of the multipole expansion for the PDF, and starts the multipole calculation.• ROUTINE multipolesfit — For two-dimensional anisotropy, computes approximate values forCn;l,m andσn

from αz andα‖. It is based on an expansion around the origin, and it needsαz α‖. This routine is not meantto supersede the user’s input (it is only provided to test the multipoles approach), because the parametersCn;l,m andσn can be thought as the real fitting parameters on some occasions.– ROUTINEComputeWlm — Compute coefficientsWL′M ′,LM(κ).– ROUTINEnllpsub — Compute radial integralsNn;L′,L(κ).– ROUTINEwriteT — Write non-zero elements of t-matrix.– ROUTINEstoreT — Store non-zero elements of t-matrix in file tmatT.out.

• ROUTINE cumulants — Reads in three Mean Square displacements in the three Cartesian axes and startscumulants calculation.– ROUTINEComputeMs — Compute arraysMα .

In addition, TMAT uses the following general purpose mathematical routines (special functions are defined inAppendix E):

• FUNCTIONSphericalBesselj — Computes the spherical Bessel function of the 1st kind.• FUNCTIONSphericalBesseli — Computes the hyperbolic spherical Bessel function of the 1st kind.• FUNCTIONBlm — Computes the Gaunt’s coefficients.

It contains the auxiliary functionfacb. This function was written originally by John Pendry, and the presentversion has been conveniently modernized.

• FUNCTIONFactorial — Computes the factorial (output is double precision).• FUNCTIONGamma — Computes the gamma function.• FUNCTIONPochhammer — Computes the Pochhammer symbols.• FUNCTIONGralHyperGeo33 — Computes the Generalized Hypergeometric Function,3F3.

5.4. Program output

The program produces a listing file in the unit 6 (standard output channel), and the t-matrix is stored in a filecalled TMAT.OUT (in natural ordering).

Acknowledgements

We gratefully acknowledge financial support from the BBV foundation, the EPSRC (UK), and CYCIT (Spain)under contract PB98-524. It is a pleasure to acknowledge useful conversations with Professor W. Moritz on themultipole approach.

P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301 291

Appendix A. Derivation of the coefficients in the expansion of the t-matrix

To obtain Eq. (9) we start from the definition of theDebye–Waller factor as a Fourier transform of the PDF:

e−M =∫

dΩr∫

r2 dr P (r)ei(k′−k)r .

We expand the exponentials in spherical harmonics and spherical Bessel functions, and the PDF according toEq. (8), to obtain:

e−M = 16π2∫

dΩr∫

r2 dr∑n;lm

Cn;lmRn(r)Ylm(Ωr )

×∑

L′M ′,LM

(−1)LiL+L′jL′(kr)jL(kr)YL′M ′(Ωr )Y ∗

L′M ′(Ωk′)Y ∗LM(Ωr )YLM(Ωk)

= 16π2∑

L′M ′;LM

(−1)LiL+L′Y ∗L′M ′(Ωk′)YLM(Ωk)

×∑n;lm

∫dΩr Ylm(Ωr )YL′M ′(Ωr )Y ∗

LM(Ωr )∫

r2 dr Cn;lmRn(r)jL(kr)jL′(kr)

= 16π2∑

L′M ′;LM

(−1)LiL+L′YLM(Ωk)Y

∗L′M ′(Ωk′)

∑n;lm

(−1)MBL′M ′,lm,LMCn;lmNn;L,L′(k),

where we have introduced,Nn:L,L′(κ), defined in Eq. (10). By comparing with the expansion of theDebye–Wallerfactor in spherical harmonics,

e−M =∑

L′M ′;LM

WL′M ′;LMYLM(Ωk)Y∗L′M ′(Ωk′)

we identify the coefficientsWL′M ′,LM , and we write Eq. (9).

Appendix B. Radial integrals

Integrals in Eq. (10) can be solved in terms of power series that can be written as Generalized HypergeometricFunctions [6,15]. The two first integrals for radial functions based in Gaussians (Eq. (13)) are:

N0;l′,l(κ, σ0) = 2(−2−l−l′)/2κl+l′√π σ0σ 2(−1+l+l′)/2

0

Γ (32 + l) Γ (3

2 + l′)Γ

(3+ l + l′

2

)× 3F3

(2+ l + l′

2,

3+ l + l′

2,

3+ l + l′

2; 3

2+ l,

3

2+ l′,2+ l + l′;−2κ2σ0

2),

N1;l′,l(κ, σ1) = 2(−l−l′)/2κ2√π σ1σ2(−1+l+l′)/2

1

3Γ (32 + l) Γ (3

2 + l′)

= Γ

(5+ l + l′

2

)3F3

(2+ l + l′

2,

3+ l + l′

2,

5+ l + l′

2; 3

2+ l,

3

2+ l′,2+ l + l′;−2κ2σ1

2).

WhereΓ is the Gamma function and3F3 is the Generalized Hypergeometric Function (definitions for bothfunctions can be found in Appendix E).

292 P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301

It is interesting to notice that in these expressions the Generalized Hypergeometric Functions is generally anumber in the range 1–0.001, changing slowly as a function ofl andl′ (e.g., a typical difference between maximumand minimum values forσ = 0.1 Bohrs,E = 4 Hartrees, is less than 20% forl, l′ 15).

Appendix C. Isotropic limit for the multipole expansion

The isotropic limit in the multipole expansion, Eq. (20), can be easily recovered by taking advantage of theproperties of Wigner’s3jm symbols [7]:

tl′m′,lm =∑L,l′′

WLt0l′′

∑M,m′′

BLM,lm,l′′m′′BLM,l′m′,l′′m′′

=∑L,l′′

WLt0l′′(2L + 1)(2l′′ + 1)

√(2l + 1)(2l′ + 1)

(l′′ L l

0 0 0

)(l′′ L l′0 0 0

)

×∑M,m′′

(l′′ L l

−m′′ M m

)(l′′ L l′

−m′′ M m′)

=∑L,l′′

WLt0l′′(2L + 1)(2l′′ + 1)

(2l + 1)√4π

(l′′ L l

0 0 0

)2δl,l′δm,m′

2l + 1

=∑L,l′′

WLt0l′′

√(2L + 1)(2l′′ + 1)

4π(2l + 1)BL0,l0,l′′0δl,l′δm,m′,

where we have definedWL = 4πe−σ2κ2iLjL(−iσ 2κ2).

Appendix D. Integrals Ilm

In the special case where different vibration amplitudes are considered only in the perpendicular and the paralleldirection to the surface (σz, and σx = σy = σ‖ respectively), the angular integrals in Eq. (12) can be solvedanalytically. We write for the two-dimensional PDF:

P(r) = 1√8π3

1

σzσ2‖

exp

(z2

2σ 2z

+ ρ2

2σ 2‖

)= 1√

8π3

1

αzα2‖

1

σ 3 exp

− r2

2σ 2

(cos2 θ

α2z

+ sin2 θ

α2‖

),

where we have introduced the non-dimensional parametersαi , σ 2i = α2

i σ2 (i = z, x, y,‖,etc, . . .). The isotropic

limit is recovered forα2i = 1, (σ 2

i = σ 2), departing from the convention whereαi = 1√3, andσ 2 = ∑

i σ2.

Only I00 andI20 are needed as higher components are identically zero for the 2D anisotropy considered here.The integrals are:

I00(r, σz, σ‖) =√

2

4

1

σ 3

1

αzα2‖

1∫−1

dζ exp

− r2

2σ 2

[ζ 2

α2z

+ 1− ζ 2

α2‖

]

=Erfi

(√−α‖2+αz2 r√

2α‖ αz σ

)2α‖

√−α‖2 + αz

2 er2/2α2‖σ2 √

2π r σ 2

P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301 293

and,

I20(r, σz, σ‖) =√

5

16

1

σ 3

1

αzα2‖

∫dζ(3ζ 2 − 1)exp

− r2

2σ 2

[ζ 2

α2z

+ 1− ζ 2

α2‖

]

=−

(√5π

Erfi(√−α‖2+αz

2 r√2α‖ αz σ

))4α‖

√−α2‖ + α2

z er2/2α2‖ σ2

r σ 2,

whereζ = cosθ , and the Erfi is the imaginary Error function, related to the common Error function by: Erfi(x) =−iErf(ix). Notice that both,I00 andI20, are real functions irrespectively of whetherα2

z α2‖ or not.

Appendix E. Special functions

Definitions for special functions used in the program are:• Gaunt’s integral [7]:

Bl1,m1;l2,m2;l3,m3 = (−1)m3

π∫0

d(cosθ)

2π∫0

dφ Yl1,m1(θ,φ)Yl2,m2(θ,φ)Y ∗l3m3(θ,φ)

= (−1)m3

√(2l3 + 1)(2l2 + 1)(2l1 + 1)

(l3 l2 l1

−m3 m2 m1

)(l3 l2 l10 0 0

).

The last line gives its relation to Wigner’s3jm symbols. These coefficients are non-zero only if:(1) m1 +m2 − m3 = 0 (physical).(2) |l2 − l3| l1 l2 + l3 (triangular).(3) (−1)l1+l2+l3 = 1 ( l1 + l2 + l3 is even).

• The Generalized Hypergeometric Function [6]:

pFq(a1, . . . , ap; c1, . . . , cq;x) =∞∑n=0

(a1)n . . . (ap)n

(c1)n . . . (cq)n

xn

n! .

• Where,(a)n, is the Pochhammer symbol [6]:

(a)0 = 1; (a)n = a(a + 1)(a + 2) . . . (a + n − 1) = Γ (a + n)

Γ (a); n = 1,2,3, . . . .

References

[1] J.B. Pendry, Low-Energy Electron Diffraction, Academic Press, New York, 1974.[2] P.L. de Andres, J.A. Verges, Phys. Rev. B 59 (1999) 3086.[3] M.A. Van Hove, W.H. Weinberg, C.-M. Chan, Low Energy Electron Diffraction, Springer, Berlin, 1986.[4] W. Moritz, J. Landskron, Surf. Sci. 337 (1995) 278.[5] J. Landskron, W. Moritz, B. Narloch, G. Held, D. Menzel, Surf. Sci. 441 (1999) 91.[6] L.C. Andrews, Special Functions of Mathematics for Engineers, Oxford University Press, 1998.[7] D.A. Varshalovic, A.N. Moskalev, V.K. Khersonskii, Quantum Theory of Angular Momentum, World Scientific, Singapore, 1988.[8] V. Fritzsche, Phys. Rev. B 50 (3) (1994) 1922.[9] U. Loffler, U. Muschiol, P. Bayer, K. Heinz, V. Fritzsche, J.B. Pendry, Surf. Sci. 333 (1995) 1435.

[10] P.J. Rous, J.B. Pendry, D.K. Saldin, K. Heinz, K. Müller, N. Bickel, Phys. Rev. Lett. 57 (1986) 2951.[11] W. Oed, P.J. Rous, J.B. Pendry, Surf. Sci. 273 (1992) 261.

294 P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301

[12] P.L. de Andres, P.J. Rous, J.B. Pendry, Surf. Sci. 193 (1988) 1.[13] U. Loffler, R. Döll, K. Heinz, Surf. Sci. 301 (1994) 346.[14] M.G. Kendall, A. Stuart, The Advanced Theory of Statistics, Vol. 1, Griffin, London, 1958, Chapter 3.[15] S. Wolfram, The Mathematica Book, 3rd edn., Cambridge University Press, Cambridge, 1996.

P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301 295

Test Run Input and Output

Input file: Ni.phs

# Ni phase shifts (taken from [1], appendix C.5 )2 64.1.01 -1.09 -0.58 0.42 0.11 0.03 0.01 0.05.1.01 -1.09 -0.58 0.42 0.11 0.03 0.01 0.0

Input file: tmat.inp (multipoles, isotropic)

# Main input file for TMAT (tmat.inp) isotropic.multipoles ! Either "cumulants" or "multipoles"Ni.phs

5 ! lmax in actual calculation4. ! Energy (H)1.0 ! \alpha_z1.0 ! \alpha_x1.0 ! \alpha_y58.71 ! Element Mass (proton mass units)

440. ! Debye Temperature (Kelvin)300. ! Temperature (Kelvin)0 0 0 3.54491 0.0 ! (n; lm), C_n;lm, SigmaGn

Input file multip.inp (anisotropic)

# Main input file for TMAT (tmat.inp) anisotropic.multipoles ! Either "cumulants" or "multipoles"Ni.phs

5 ! lmax in actual calculation4. ! Energy (H)1.0 ! \alpha_z0.9 ! \alpha_x0.9 ! \alpha_y58.71 ! Element Mass (proton mass units)

440. ! Debye Temperature (Kelvin)300. ! Temperature (Kelvin)0 0 0 3.51941 0.07749 ! (n; lm), C_n;lm, SigmaGn1 2 0 0.03950 0.07749 ! (n; lm), C_n;lm, SigmaGn

Input file: cumulants.inp (anisotropic)

Notice that the root mean square displacements are given in atomic units (Bohrs), and the last three lines aretherefore set to zero. Furthermore, the program does not attempt to read parametersCn;lm, SigmaGn, only relatedto the multipoles method.

296 P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301

# Comment: Main input file for TMAT (tmat.inp)cumulants ! Either "cumulants" or "multipoles"Ni.phs

5 ! lmax in actual calculation4. ! Energy (H)0.08252 ! \alpha_z (a.u.)0.04126 ! \alpha_x (a.u.)0.02063 ! \alpha_y (a.u.)0.0 ! Element Mass (proton mass units)0.0 ! Debye Temperature (Kelvin)0.0 ! Temperature (Kelvin)

Listing file: multipoles (isotropic). Only first 100 lines, or most significative lines are listed

Starting TMAT calculation...

Phase shifts are in file: ni.phsLmax : 5Energy : 4.0000Mass : 58.7100Debye-Temperature : 440.0000Temperature : 300.0000RMSD sigmaDB (Bohrs) : 0.08252

alphaZ= 0.08252 alphaX= 0.08252 alphaY= 0.08252 sigmaDB= 0.08252 (...in Bohrs)

Reading Phase-Shits from file:ni.phs

Energy Phase Shifts up to lmax -> 54.00 1.0100 -1.0900 -0.5800 0.4200 0.1100 0.0300

Starting multipoles calculation...

n;l,m= 0 0 0 coeffs(n;l,m)/(4*Pi)= 0.28210 sigma(n)= 0.11670

Expanding the PDF in Multipoles

Maximum l (0:lmax) = 5

<r**2> = 0.006810<z**2> = 0.006810<x**2> = 0.006810<y**2> = 0.006810

C(0;00) = 0.282095C(1;20) = 0.000000C(1;22) = 0.000000

T = 0

P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301 297

------------------------------------------------------

Diagonal elements:

Real(T) Imag(T) l m

1 1 -.15923923 -.25354168 0 03 3 0.14497526 -.27793092 1 07 7 0.16206942 -.10618277 2 0

13 13 -.13163555 -.05878482 3 021 21 -.03857791 -.00426077 4 031 31 -.01060024 -.00031810 5 0

Non-diagonal elements:

lm1 lm2 Real(T) Imag(T)

------------------------------------------------------

...writting full matrix TmatNatOrd at T=T

------------------------------------------------------

Diagonal elements:

Real(T) Imag(T) l m1 1 -.12833661 -.25538921 0 02 2 0.13557324 -.26545021 1 -13 3 0.13557324 -.26545021 1 04 4 0.13557324 -.26545021 1 15 5 0.14355433 -.11003830 2 -26 6 0.14355433 -.11003830 2 -17 7 0.14355427 -.11003828 2 08 8 0.14355433 -.11003830 2 19 9 0.14355433 -.11003830 2 2

Non-diagonal elements:

lm1 lm2 Real(T) Imag(T)

------------------------------------------------------

Writting t-matrix in file: tmatT.outProgram Tmat has reached the expected STOP point.

Listing file: multipoles (anisotropic)

Starting TMAT calculation...

Phase shifts are in file: ni.phsLmax : 5

298 P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301

Energy : 4.0000Mass : 58.7100Debye-Temperature : 440.0000Temperature : 300.0000RMSD sigmaDB (Bohrs) : 0.08252

alphaZ= 0.08252 alphaX= 0.07427 alphaY= 0.07427 sigmaDB= 0.08252 (...in Bohrs)

Reading Phase-Shits from file:

ni.phs

Energy Phase Shifts up to lmax -> 54.00 1.0100 -1.0900 -0.5800 0.4200 0.1100 0.0300

Starting multipoles calculation...

n;l,m= 0 0 0 coeffs(n;l,m)/(4*Pi)= 0.280066 sigma(n)= 0.10959n;l,m= 1 2 0 coeffs(n;l,m)/(4*Pi)= 0.003143 sigma(n)= 0.10959

Expanding the PDF in Multipoles

Maximum l (0:lmax) = 5

<r**2> = 0.006810<z**2> = 0.006810<x**2> = 0.005516<y**2> = 0.005516

C(0;00) = 0.280066C(1;20) = 0.003143C(1;22) = 0.000000

T = 0

------------------------------------------------------

Diagonal elements:

Real(T) Imag(T) l m1 1 -.15923923 -.25354168 0 03 3 0.14497526 -.27793092 1 07 7 0.16206942 -.10618277 2 0

13 13 -.13163555 -.05878482 3 021 21 -.03857791 -.00426077 4 031 31 -.01060024 -.00031810 5 0

Non-diagonal elements:

lm1 lm2 Real(T) Imag(T)

------------------------------------------------------

P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301 299

...writting full matrix TmatNatOrd at T=T

------------------------------------------------------

Diagonal elements:

Real(T) Imag(T) l m1 1 -.13081673 -.25341362 0 02 2 0.13570432 -.26492682 1 -13 3 0.13557208 -.26490435 1 04 4 0.13570432 -.26492682 1 1

Non-diagonal elements:

lm1 lm2 Real(T) Imag(T)1 7 0.00005720 -.000037732 12 0.00004319 0.000016983 13 0.00005290 0.00002080

------------------------------------------------------

Writting t-matrix in file: tmatT.out

Program Tmat has reached the expected STOP point.

Listing file: cumulants (anisotropic)

Starting TMAT calculation...

Phase shifts are in file: ni.phsLmax : 5Energy : 4.0000Mass : 0.0000Debye-Temperature : 0.0000Temperature : 0.0000RMSD sigmaDB (Bohrs) : 1.00000

alphaZ= 0.08252 alphaX= 0.04126 alphaY= 0.02063 sigmaDB= 1.00000 (...in Bohrs)

Reading Phase-Shits from file:ni.phs

Energy Phase Shifts up to lmax -> 54.00 1.0100 -1.0900 -0.5800 0.4200 0.1100 0.0300

Starting cumulants calculation...

**cumulants** Writting Tmat (T=0) ...

------------------------------------------------------

300 P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301

Diagonal elements:

Real(T) Imag(T) l m1 1 -.15923923 -.25354168 0 03 3 0.14497526 -.27793092 1 07 7 0.16206942 -.10618277 2 0

13 13 -.13163555 -.05878482 3 021 21 -.03857791 -.00426077 4 031 31 -.01060024 -.00031810 5 0

Non-diagonal elements:

lm1 lm2 Real(T) Imag(T)

------------------------------------------------------

Starting to Compute M_x,y,z matrices ...

Computing M_x,y,z matrices is done...

Iteration-> 1 Total Rel Err-> 147.8364 150.2156Iteration-> 2 Total Rel Err-> 120.9366 153.3347Iteration-> 3 Total Rel Err-> 44.7339 48.5956Iteration-> 4 Total Rel Err-> 13.6370 14.4083Iteration-> 5 Total Rel Err-> 2.5343 2.5192Iteration-> 6 Total Rel Err-> 0.4847 0.0868Iteration-> 7 Total Rel Err-> 0.0149 0.0017Iteration-> 8 Total Rel Err-> 0.0003 0.0000

Total Rel Err is less than 0.001 in Iteration-> 8 ...it is converged

**cumulants** Writting Tmat (T=T)...

------------------------------------------------------

Diagonal elements:

Real(T) Imag(T) l m1 1 -.14532222 -.25449124 0 02 2 0.14365433 -.27281934 1 -13 3 0.13505955 -.27130923 1 04 4 0.14365433 -.27281934 1 1

Non-diagonal elements:

lm1 lm2 Real(T) Imag(T)1 5 -.00051880 0.000348931 7 -.00371000 0.002462911 9 -.00051880 0.000348931 17 0.00000144 0.000000901 19 0.00000953 0.000005921 21 0.00005315 0.00003295

P.L. de Andres, D.A. King / Computer Physics Communications 138 (2001) 281–301 301

1 23 0.00000953 0.000005921 25 0.00000144 0.00000090

------------------------------------------------------

Writting t-matrix in file: tmatT.out

Program Tmat has reached the expected STOP point.