schmidt orthonormalization of a basis expressible both as linear combinations and as projections of...

5
Computers Chem. Vol. 13, No. 3, pp. 271-275, 1989 0097~8485/e/89 $3.00 + 0.00 Printed in Great Britain. All rights reserved CopyriahtQ 1989 Pergamoa Press plc SCHMIDT ORTHONORMALIZATION OF A BASIS EXPRESSIBLE BOTH AS LINEAR COMBINATIONS AND AS PROJECTIONS OF ORTHONORMAL PRIMITIVE FUNCTIONS CARLOS F. BIJNGE Instituto de Fisica, Universidad National Aut6noma de M&x&, Apartado Postal 20-364, 01000 Mkxico D.F., Mk.xico (Received 25 June 1988) Abstract-A basis set {D,; g = I, n,} expressible both as linear combinations over an orthonormal set (P,; i = 1, n,,) of primitive functions and as projections DB = OP,, where 0 is a hermitean and idempotent projection operator, is Schmidt orthononnalized by means of a modular and efficient program written in FORTRAN. Applications include orthonorrnalization of N-particle basis sets suitable for many-body electronic structure calculations. Let us consider an orthonormal set of functions {C,; g = 1, n,} defined by: C, = g P,c(l g ) (la) i-l = 0 i P,b(i, g), g = 1,. . . , n,, (lb) i-l where c(i, g) and b(i, g) are expansion coefficients. In equation (lb) 0 is a hermitean and idempotent projection operator, nE is the dimension of the set {C,) and n,, is the dimension of an orthonormal primitive space {Pi}. In variational calculations of many-electron struc- tures, hermitean and idempotent projection operators 0 (Ldwdin, 1964) are used to select an L-S symmetry (nonrelativistic atomic calculations), or aj-JM sym- metry (aonrelativisitic or relativistic atomic calcu- lations), or an MS symmetry, where M refers to an irreducible representation of a given molecular sym- metry group and S stands for spin symmetry, as usual. Of course, there are many other applications of projection operators in physics and mathematics. The set (C,} is associated to a given configuration and g labels the nr degenerate elements for a given total symmetry. A modular library (Bunge et al., 1989a) to obtain L2 or Jz projections (Jauregui ef al., 1989) S* projections (Bunge et al., 1989b), and molecular symmetry projections (Cisneros er al., 1989) is presented in companion papers. There are three reasons why basis sets defined by equation3 (1) are more convenient or superior to other existing N-particle functions in many-body calculations of electronic structure: (i) because they are naturally suited to &fine a hierarchy of inter- acting N-particle spaces (Bunge, 1970; Bunge & Bunge, 1973) which reduce the labor in open-shell calculations by orders of magnitude, (ii) because their generality allows writing algorithms for wavefunction calculations which are applicable to any electronic system (Bunge et al., 1989a), and (iii) because they lead to efficient algorithms (Liiwdin, 1955), to evalu- ate matrix elements of operators which commute with the projection operator 0. One starts with unnormahzed functions D, given as Or= f PP(i,g) (2) i- 1 which may also be expressed as: D, = OP&). (3) If a(g) is defined by: c(s) = ,f, d(k g)2/dk I?), (4) DB becomes normalized. Given equations (2) and (3), the problem is to evaluate the c&g) and b(i, g) coefficients in equations (1). The successively (Schmidt) orthonormalized set (C,] of equations (1) may be obtained from the original set {Or} as: [ 8-1 C, = Nx - c S(h, tt)C, + Dg 1 (5) h-l where S(h, g) = i Hi, h)d(i, g) 1-I (6) and N, is a normalization factor, whence the corre- sponding (unnormalized) b and c coefficients are given by: g-1 b&g) = - C W, h)S(h, g), i <g (7a) k-i N&g)=47) 17b) 271

Upload: carlos-f-bunge

Post on 21-Jun-2016

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Schmidt orthonormalization of a basis expressible both as linear combinations and as projections of orthonormal primitive functions

Computers Chem. Vol. 13, No. 3, pp. 271-275, 1989 0097~8485/e/89 $3.00 + 0.00 Printed in Great Britain. All rights reserved Copyriaht Q 1989 Pergamoa Press plc

SCHMIDT ORTHONORMALIZATION OF A BASIS EXPRESSIBLE BOTH AS LINEAR COMBINATIONS

AND AS PROJECTIONS OF ORTHONORMAL PRIMITIVE FUNCTIONS

CARLOS F. BIJNGE

Instituto de Fisica, Universidad National Aut6noma de M&x&, Apartado Postal 20-364, 01000 Mkxico D.F., Mk.xico

(Received 25 June 1988)

Abstract-A basis set {D,; g = I, n,} expressible both as linear combinations over an orthonormal set (P,; i = 1, n,,) of primitive functions and as projections DB = OP,, where 0 is a hermitean and idempotent projection operator, is Schmidt orthononnalized by means of a modular and efficient program written in FORTRAN. Applications include orthonorrnalization of N-particle basis sets suitable for many-body electronic structure calculations.

Let us consider an orthonormal set of functions {C,; g = 1, n,} defined by:

C, = g P,c(l g ) (la) i-l

= 0 i P,b(i, g), g = 1,. . . , n,, (lb) i-l

where c(i, g) and b(i, g) are expansion coefficients. In equation (lb) 0 is a hermitean and idempotent projection operator, nE is the dimension of the set {C,) and n,, is the dimension of an orthonormal primitive space {Pi}.

In variational calculations of many-electron struc- tures, hermitean and idempotent projection operators 0 (Ldwdin, 1964) are used to select an L-S symmetry (nonrelativistic atomic calculations), or aj-JM sym- metry (aonrelativisitic or relativistic atomic calcu- lations), or an MS symmetry, where M refers to an irreducible representation of a given molecular sym- metry group and S stands for spin symmetry, as usual. Of course, there are many other applications of projection operators in physics and mathematics.

The set (C,} is associated to a given configuration and g labels the nr degenerate elements for a given total symmetry. A modular library (Bunge et al., 1989a) to obtain L2 or Jz projections (Jauregui ef al., 1989) S* projections (Bunge et al., 1989b), and molecular symmetry projections (Cisneros er al., 1989) is presented in companion papers.

There are three reasons why basis sets defined by equation3 (1) are more convenient or superior to other existing N-particle functions in many-body calculations of electronic structure: (i) because they are naturally suited to &fine a hierarchy of inter- acting N-particle spaces (Bunge, 1970; Bunge & Bunge, 1973) which reduce the labor in open-shell calculations by orders of magnitude, (ii) because their

generality allows writing algorithms for wavefunction calculations which are applicable to any electronic system (Bunge et al., 1989a), and (iii) because they lead to efficient algorithms (Liiwdin, 1955), to evalu- ate matrix elements of operators which commute with the projection operator 0.

One starts with unnormahzed functions D, given as

Or= f PP(i,g) (2) i- 1

which may also be expressed as:

D, = OP&). (3)

If a(g) is defined by:

c(s) = ,f, d(k g)2/dk I?), (4)

DB becomes normalized. Given equations (2) and (3), the problem is to evaluate the c&g) and b(i, g) coefficients in equations (1).

The successively (Schmidt) orthonormalized set (C,] of equations (1) may be obtained from the original set {Or} as:

[

8-1 C, = Nx - c S(h, tt)C, + Dg 1 (5) h-l

where

S(h, g) = i Hi, h)d(i, g) 1-I

(6)

and N, is a normalization factor, whence the corre- sponding (unnormalized) b and c coefficients are given by:

g-1 b&g) = - C W, h)S(h, g), i <g (7a)

k-i

N&g)=47) 17b)

271

Page 2: Schmidt orthonormalization of a basis expressible both as linear combinations and as projections of orthonormal primitive functions

272 CARLOS F. BUNOE

s-1

c(i, g) = - 2 ~(4 h)S(h, g) + d(i, g). h-l

(8) d.& g) f 0. (W

In all equations discussed it is assumed that b and c coefficients on the right-hand side are normalized while those on the left-hand side are not. The d coefficients defining the unnormalized set {O,} are kept unchanged throughout. (If 0 = 1 in equation (3), the set ID,} is already orthanormal.)

If the above condition is not met either the input basis set is linearly dependent and/or equations (2H3) are not satisfied.

Evaluation of the 6 and c coefficients of equations (1) requires n&/2 + n:/3 floating point multi- plications and an equal number of additions for na not small; this is considerably less (and thus results are more accurate) than the 2(n& + n,,$) floating point operations needed by a straight Schmidt ortho- normalization code (SSOC). Also, for large nr and np values, the execution time of a SSOC is comparable to the calculation times of the DB functions, whereas the execution time of the present code always remains insignificant.

Due to round-off errors, floating point quantities that should be zeros are instead represented by tiny quantities. Thus, a threshold is imposed over the d(g, g) coefficients so that if the absolute value of any of them is smaller than the adopted threshold the program stops, since d(g, g) = 0 implies an error in the calling program, viz. equations (2)-(3) are not satisfied.

Subroutine ORTHZ is a FORTRAN program, listed in the Appendix, which carries out a Schmidt orthonormalization of a set (0,) of projected func- tions. Description of the program is made through comments inserted in the FORTRAN text. The call- ing sequence is

Usually, equations (9) cannot be enforced explic- itly. Therefore, the program cannot anticipate the fulfillment of equations (9) although it issues a termi- nation condition when equations (9) are not satisfied, indicating that a given function is linearly dependent with previous ones. In this way the calling program can choose a corrective path when running in inter- active mode. (Failure to fulfill equations (9) may also occur if equations (2)-(3) are not satisfied.)

CALL 0RTH2 (NG,NP,TI-IRESH,D,S,B,C,IW,IER)

where NG and NP have the same meanings as nr and np above, respectively. THRESH is a threshold below which coefficients are considered to be equal to zero. D is an input array holding in position IG = i + (g - 1)NP the coefficients d&g) of the i-th primitive corresponding to the g-th function C,. B is an output array holding in position JG =j + (g - l)NG the coefficients bu, g) of thej-th projected primitive corresponding to the function C, C is another output array containing the coefficients c(i, g) in the same notation as d(i, g). S is a working array of dimension NG, IW is the logical unit assigned to an output file used to print diagnostics and IER is a completion status indicator. More details are given in the Appendix.

This program has been applied to Schmidt ortho- normalize degenerate sets of eigenfunctions of orbital and spin angular momentum, and of irredicible repre- sentations of molecular symmetry groups obtained by means of projection operators. The applicability of subroutine ORTHZ, however, is not restricted to these examples: it may be applied to any set of D, functions given by equations (2) and (3), where 0 is, a hermitean and idempotent projection operator and (P,} an orthonormal set.

REFERENCES

Bunge A. (1970) J. Chem. Phvs. 53, 20. Bunie A. ‘V., lknge C. F., *lkegui R. & Cianeros G.

(1989a) compuk?rs Chem. 13, 201. Bunge A. V., Bunge C. F., Jhuregui R. & Cisneros G.

(1989b) Computers Chem. 13, 239. Bunge C. F. & Bunge A. (197 I) J. Compuf. Phys. 8,409. Bunge C. F. & Bunge A. (1973) Int. .I. Quan~n Chem. 7,

927.

Necessary and sufficient conditions for linear independence are (Bunge 8c Bunge, 1971):

c(i,g)=O, icg (W

Cisneros G., JBuregui R., Bunge C. F. & Bunge A. V. (1989) Computers Chem. 13, 255.

Jbqui R., Bunge C. F., Bunge A. V. & Cisneros G. (1989) Computers Chem. 13, 223.

Lijwdin P.-O. (1955) Phys. Rev. 97, 1509. Ltiwdin P.-O. (1964) Rev. Mod. Phys. 36, 966.

See Opposite for rhe Appendix

Page 3: Schmidt orthonormalization of a basis expressible both as linear combinations and as projections of orthonormal primitive functions

Schmidt orthononnalization of a basis

APPENDIX

c____-___-__________________________________________ SUBROUTINE ORTli2 (NG,NP,THRESH,II,S,B.C.IW,IER~

C-__-__--__-__-__-__________________________________

Title: module 0RTH2 to orthonormalize functions expressible both aa as linear combinations over an orthonormal set and as idenpotent and hermitian projections over an element of the orthonormal set.

Version:

Purpose :

l-001

to Schmidt orthonormalize a basis set <D ;g=l,NGl

expressible both as linear combinations k?r an orthonormal set CP ;q=l,NP3 and as D = 0 P , where 0 is a hermitean

4 9 Q and idempotent projection operator,

Environment: Standard Fortran 77.

Reference] C.F.Bunqe, Comput. Chem.13.271 (1989).

Formal arguments:

g THRESH

D

5

c

Iw

IER

Is the dimension of the projected space. is the dimension of the primitive space. is a threshold below which coefficients are considered to be equal to zero; THRESH should be defined as: THRESH=lODO*a(5DO-DBLE(NSIGF)) where NSIGF is tbe number of significant figures, usually equal to 16 for double precision 64-bits words. is an input array holding in position IG=i+(g-l)*NP the coefficients d(i.gl of the I-th primitive corresponding to the g-th function C .

is a working array Ef dimension NG or greater. is an output array holding in position JG=j+(g-l)*NG the coefficients b(j,g) of the j-th projected primitive corresponding to the function C .

is an output array holding the zoefficients c(i,g) in the same notation as arrav D. logical unit number aisigned to an output file used for diagnostics. completion status indicator.

Completion status:

IER=O normal successful completion. IEZ?=G where l.LE.G.LE.NG: orthogonalization fails, either because

the G-th input basis ir linearly dependent with the previous ones or becauee the coefficients D(I,Gl do not represent a function projected by a hermitean and idempotent projection operator.

STOP contrary to an old tradition that discourages using SMP within subroutines, subroutine ORTHZ makes use of STOP if ABS(D(G,q))(THRESH, which implies an error in the calling program.

273

Appendix Continued Overleaf

C.A.C. ,3,3-H

Page 4: Schmidt orthonormalization of a basis expressible both as linear combinations and as projections of orthonormal primitive functions

274 CARLG~ F. BUNGE

IMPLICIT DOUBLE PRECISION (A-F.O-2). INTEGER(G-N) PARANFPER (CERO=ODO, UNO=lDO) DIMENSION D(*),S(*),B(*),C(*)

Check that ABS(D~C,G~~<THRESH and that all NC input functions are not null. GFD = -NP W-10 G=i,NG

GFD = GFD + NP IF (D(GF'D+G) .LE. THRESH) THEN

NRITE (Iw.*) ' ABS(D(G,Gl)<lWRESH, G=',G WRITE (Iw,*j ' ERROR IN CALLING PROGRAM, RUN ABORTED.' ST 0 P

C ****Ah*k** END fF

10 CONTINUE

DO 20 I=l.NG*NG 20 B(S) = CERO

C Normalization of first function using Eq.(4) Of paper. SUM = CERO DO 30 I=l,NP

30 SUM = D(I)**2 + SUH FNOR = UNO/SQRT(SUM) B(1) = FNOR*SUH/D(l) w 40 I=l,NP

40 C(I) = FNOR*D(I) IF (NG .LE. 1) RETURN

C A***** c OrthOgOnaliZatiQn. GFD = 0 GFB - 0

C

50

C

60 70

C

SO 90

C

100

110

140 G=2,NG GFD = GFD + NP GFB = GFB + NG

Evaluate B(GF'B+G)=B(g,gJ, Eqs.(4) and (7b) of paper. SUM = cm0 DO 50 I=l,NP

SUM = DcGFD+I1**2 + SUM B(GFB+G) = SUN/D(GFD+G)

Evaluate S(H)=S(h,g), Eq.(6) of paper. GM1 = G - 1 HFB : -NG DO 70 H=l,GMl

HFB = HFB + NG SUM = CERO

DO 60 I=l,H SUH = B(HFB+I)~D(GFD+I) + SUM

S(H) = SUM

Evaluate B(GFB+I)=B(l,g), Eq.('la) of paper. IlFB = - NC - NG DO 90 I=l,GMl

XlFB = IlFB * NG HFB = IlFB suw = cm0

DO 60 H=I,GMl HFB= HFB+NG SUM = B(HFB+I)*S(H) + SUM

B(GFB+Il 5 - SUM

Evaluate C(GFD+I)=C(l,g). Eq.(B) , and normalization FNOR. FNOR = CERO DO 110 I=l,NP

IGP = I - NP SUM = CERO DO 100 GP=l,GMl

IGP = IGP + NP SUM = C(IGP)*S(GP) + SUM

C(GFD+I) = D(GFD+I) - SUM FNOR = FNOR + C(GFD+I)**2

IF (FNOR .LT. THRESH**21 THEN IER = G GO TO 170

END IF E'NOR = UNO/SQRT(FNOR)

Page 5: Schmidt orthonormalization of a basis expressible both as linear combinations and as projections of orthonormal primitive functions

Schmidt orthonormalization of a basis 275

C

120

130 140

cc

150

160

170

Normalization. DO 120 I=l,NF

CtGFD+I) = FNOR*C(GFD+I) DO 130 H=l,C

B(GFB+H) = FNOR*BtGFB+H) CONTINUE

Check linear independence of the final set just in case first test fails because of excessive loss of accuracy. GFD = -NP DO 160 G=l,NG

GFD = GFD + NP DO 150 I=l,G-1

IF (ABS(CtGFD+I)) .GT. THRESH) IER = G IF (ABS(C(GFD+G)) .tT. THRESH) IER = G IF (IER .GT. 0) GO TO 170

RETURN

CONTINUE WRITE t1w,*1 ’ Degenerate element No.'.IER.' is'// h ’ linearly dependent with previous ones.' EZND