of the G vectors, <strong>and</strong> only real operations have to be performed. Approximately afactor of three in operations can be save this way. Special care has to be taken forthe zero G vector. It is assumed that this plane wave component is stored in thefirst position of the arrays.MODULE DotProducte = A(1) * B(1)FOR i=2:N Dar = REAL(A(i))ai = IMAG(A(i))br = REAL(B(i))bi = IMAG(B(i))e = e + 2 * (ar * br + ai * bi)ENDThis loop structure is available in the blas library, optimized on most computerarchitectures. To use the blas routines for real variables, complex numbers haveto be stored as two real numbers in contiguous memory locations.e = A(1) * B(1) + 2 * sdot(2 * N D - 2,A(2),1,B(2),1)The calculation of overlap matrices between sets of vectors in real space is a importanttask in the orthogonalization stepS ij = ∑ GA ⋆ i (G)B j (G) . (263)It can be executed by using matrix multiply routines from the blas library. Thespecial case of the zero G vector is h<strong>and</strong>led by a routine that performs a rank 1update of the final matrix.MODULE OverlapCALL SGEMM(’T’,’N’,N b ,N b ,2*N PW ,2,&& ca(1,1),2*N PW ,cb(1,1),2*N PW ,0,smat,N b )CALL SDER(N b ,N b ,-1,ca(1,1),2*N PW ,cb(1,1),2*N PW ,smat,N b )For a symmetric overlap additional time can be saved by using the symmetricmatrix multiply routine. The overlap routines scale like N 2 b N PW. It is thereforevery important to have an implementation of these parts that performs close topeek performance.MODULE SymmetricOverlapCALL SSYRK(’U’,’T’,N b ,2*N PW ,2,ca(1,1),2*N PW ,0,smat,N b )CALL SDER(N b ,N b ,-1,ca(1,1),2*N PW ,cb(1,1),2*N PW ,smat,N b )Another operation that scales as the overlap matrix calculations is the rotation of79
a set of wavefunctions in Fourier spaceB i (G) = ∑ jA j (G)S ji . (264)Again this kernel can be executed by using the optimized blas matrix multiplyroutines.MODULE RotationCALL SGEMM(’N’,’N’,2*N PW ,N b ,N b ,1,ca(1,1),2*N PW ,&& smat,N b ,0,cb(1,1),2*N PW )The overlap calculation of the projectors of the nonlinear pseudopotential withthe wavefunctions in Fourier space scales as N p N b N PW . As the projectors arestored as real quantities, the imaginary prefactor <strong>and</strong> the structure factor haveto be applied before the inner product can be calculated. The following pseudocode calculates M projectors at a time, making use of the special structure of theprefactor. This allows again to do all calculations with real quantities. The codeassumes that the total number of projectors is a multiple of M. A generalizationof the code to other cases is straightforward. By using batches of projectors theoverlap can be calculated using matrix multiplies. The variable lp(i) holds theangular momentum of projector i.MODULE FNLFOR i=1:N p ,MIF (MOD(lp(i),2) == 0) THENFOR j=0:M-1pf = -1**(lp(i+j)/2)FOR k=1:N PWt = pro(k) * pfer = REAL[eigr(k,iat(i+j))]ei = IMAG[eigr(k,iat(i+j))]scr(k,j) = CMPLX[t * er,t * ei]ENDENDELSEFOR j=0:M-1pf = -1**(lp(i+j)/2+1)FOR k=1:N PWt = pro(k) * pfer = REAL[eigr(k,iat(i+j))]ei = IMAG[eigr(k,iat(i+j))]scr(k,j) = CMPLX[-t * ei,t * er]ENDENDEND IFscr(1,0:M-1) = scr(1,0:M-1)/280
- Page 1 and 2:
John von Neumann Institute for Comp
- Page 4:
2500Number200015001000CP PRL 1985AI
- Page 7 and 8:
The goal of this section is to deri
- Page 9:
¡the Newtonian equation of motion
- Page 13 and 14:
Ehrenfest molecular dynamics is cer
- Page 15 and 16:
the Car-Parrinello approach 108 , s
- Page 17:
According to the Car-Parrinello equ
- Page 20 and 21:
Figure 4. (a) Comparison of the x-c
- Page 22 and 23:
Up to this point the entire discuss
- Page 24 and 25:
parameters are those used to repres
- Page 26 and 27:
in terms of a linear combination of
- Page 28 and 29:
structure calculations, see e.g. Re
- Page 30 and 31: “unbound electrons” dissolved i
- Page 32 and 33: Table 1. Timings in cpu seconds and
- Page 34 and 35: stressed that the energy conservati
- Page 36 and 37: see e.g. the discussion following E
- Page 38 and 39: from a set of one-particle spin orb
- Page 40 and 41: is used, which represents exactly a
- Page 42 and 43: 2.8.3 Generalized Plane WavesAn ext
- Page 44 and 45: disposable parameters that can be o
- Page 46 and 47: The index i runs over all states an
- Page 48 and 49: f(G) are related by three-dimension
- Page 50 and 51: where j l are spherical Bessel func
- Page 52 and 53: andE self = ∑ I1√2πZ 2 IR c I.
- Page 54 and 55: ¢££¤¤¢¢¢n tot (G)inv FTn to
- Page 56 and 57: correlation energyΩ ∑E xc = ε x
- Page 58 and 59: 3.4 Total Energy, Gradients, and St
- Page 60 and 61: 3.4.3 Gradient for Nuclear Position
- Page 62 and 63: The local part of the pseudopotenti
- Page 64 and 65: ¢¢¢¢¢i = 1 . . .N b¢c i (G)¢
- Page 66 and 67: ¢¢¢¢¢c i (G)123g, E self∆V I
- Page 68 and 69: where G c is a free parameter that
- Page 70 and 71: and a matrix form of the Gram-Schmi
- Page 72 and 73: The two sets of equations are coupl
- Page 74 and 75: introducing different masses for di
- Page 76 and 77: The Lagrange multiplier have to be
- Page 78 and 79: Table 3. Relative size of character
- Page 82 and 83: CALL SGEMM(’T’,’N’,M,N b ,2
- Page 84 and 85: ing standard communication librarie
- Page 86 and 87: over processors. All processors sho
- Page 88 and 89: ab = 2 * sdot(2 * N p D ,A(1),1,B(1
- Page 90 and 91: ENDCALL ParallelFFT3D("INV",scr1,sc
- Page 92 and 93: are the improved load-balancing for
- Page 94 and 95: situations where• it is necessary
- Page 96 and 97: espectively), but completely analog
- Page 98 and 99: 4.2.3 Imposing Pressure: BarostatsK
- Page 100 and 101: in the previous section. The isobar
- Page 102 and 103: 4.3.2 Many Excited States: Free Ene
- Page 104 and 105: down the generalization of the Helm
- Page 106 and 107: free energy functional discussed in
- Page 108 and 109: Figure 16. Four patterns of spin de
- Page 110 and 111: and electrons r = {r i } can be wri
- Page 112 and 113: The effective classical partition f
- Page 114 and 115: up e.g. in Refs. 132,37,596,597,428
- Page 116 and 117: The eigenvalues of A when multiplie
- Page 118 and 119: frequency of the electronic degrees
- Page 120 and 121: 5.2 Solids, Polymers, and Materials
- Page 122 and 123: the penetration of the oxidation la
- Page 124 and 125: in terms of their electronic struct
- Page 126 and 127: culations on very accurate global p
- Page 128 and 129: AcknowledgmentsOur knowledge on ab
- Page 130 and 131:
57. M. Bernasconi, G. L. Chiarotti,
- Page 132 and 133:
Superiore di Studi Avanzati (SISSA)
- Page 134 and 135:
175. E. Ermakova, J. Solca, H. Hube
- Page 136 and 137:
244. H. Goldstein, Klassische Mecha
- Page 138 and 139:
313. T. Ikeda, M. Sprik, K. Terakur
- Page 140 and 141:
384. N. A. Marks, D. R. McKenzie, B
- Page 142 and 143:
442. S. Nosé and M. L. Klein, Mol.
- Page 144 and 145:
502. L. M. Ramaniah, M. Bernasconi,
- Page 146 and 147:
562. F. Shimojo, K. Hoshino, and Y.
- Page 148 and 149:
620. A. Tongraar, K. R. Liedl, and
- Page 150:
682. R. M. Wentzcovitch, Phys. Rev.