7

Click here to load reader

Linear scaling algorithm for the coordinate transformation problem of molecular geometry optimization

  • Upload
    janos-g

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Linear scaling algorithm for the coordinate transformation problem of molecular geometry optimization

Linear scaling algorithm for the coordinate transformation problem of moleculargeometry optimizationKároly Németh, Olivier Coulaud, Gérald Monard, and János G. Ángyán Citation: The Journal of Chemical Physics 113, 5598 (2000); doi: 10.1063/1.1290611 View online: http://dx.doi.org/10.1063/1.1290611 View Table of Contents: http://scitation.aip.org/content/aip/journal/jcp/113/14?ver=pdfcov Published by the AIP Publishing Articles you may be interested in Input vector optimization of feed-forward neural networks for fitting ab initio potential-energy databases J. Chem. Phys. 132, 204103 (2010); 10.1063/1.3431624 The efficient optimization of molecular geometries using redundant internal coordinates J. Chem. Phys. 117, 9160 (2002); 10.1063/1.1515483 Geometry optimization of large biomolecules in redundant internal coordinates J. Chem. Phys. 113, 6566 (2000); 10.1063/1.1308551 Geometry optimization in generalized natural internal coordinates J. Chem. Phys. 111, 9183 (1999); 10.1063/1.479510 An efficient direct method for geometry optimization of large molecules in internal coordinates J. Chem. Phys. 109, 6571 (1998); 10.1063/1.477309

This article is copyrighted as indicated in the article. Reuse of AIP content is subject to the terms at: http://scitation.aip.org/termsconditions. Downloaded to IP:

160.36.178.25 On: Sun, 21 Dec 2014 12:23:33

Page 2: Linear scaling algorithm for the coordinate transformation problem of molecular geometry optimization

Linear scaling algorithm for the coordinate transformation problemof molecular geometry optimization

Karoly Nemetha)

Laboratoire de Chimie The´orique, UMR CNRS No. 7565, Institut Nance´ien de Chimie Mole´culaire,UniversiteHenri Poincare, B.P. 239, F-54506 Vandœuvre-le`s-Nancy, France and Centre Charles Hermite,B.P. 239, F-54506 Vandœuvre-le`s-Nancy, France

Olivier CoulaudINRIA, B.P. 101, F-54602 Villers-le`s-Nancy, France

Gerald Monard and Janos G. AngyanLaboratoire de Chimie The´orique, UMR CNRS No. 7565, Institut Nance´ien de Chimie Mole´culaire,UniversiteHenri Poincare, B.P. 239, F-54506 Vandœuvre-le`s-Nancy, France

~Received 5 June 2000; accepted 14 July 2000!

This article presents a new algorithm to solve the coordinate transformation problem of moleculargeometry optimization. The algorithm is very fast and its CPU time consumption scales linearlywith the system size. It makes use of the locality of internal coordinates by efficient sparse matrixtechniques. The new algorithm drastically reduces the time needed for coordinate transformations asdemonstrated by test calculations on polyalanine and carbone nanotube systems: for a 2000 atomsystem it requires just seven seconds, instead of the hours consumed by traditional schemes.© 2000 American Institute of Physics.@S0021-9606~00!30738-3#

I. INTRODUCTION

Molecular geometry optimization can most efficiently bedone in internal coordinates.1–4 This ensures convergence inmuch fewer iteration steps than the optimization in Cartesiancoordinates. However, when using internal coordinates,transformations must be carried out between Cartesian andinternal coordinate representations of vectors and matrices.Using traditional algorithms, the CPU time required for thesetransformations scales cubically@O(N3)# with the number ofatoms (N) in the molecule. Thus in molecular mechanics~MM ! calculations, where the evaluation of energies and gra-dients usually scales quadratically@O(N2)#, optimization inCartesian coordinates still remains preferable. In semiempir-ical andab initio calculations the scaling of these coordinatetransformations has not been an issue for a long time, sincethe evaluation of energies and gradients scaled with the thirdor higher powers ofN and consumed much more time thanthe construction of the geometry displacement.

Recently, with the advent of linear scaling electronicstructure methods, demanding calculations on large mol-ecules became feasible. The current state of this emergingfield is reviewed by Goedecker5 and Scuseria.6 These devel-opments accelerated the search for faster coordinate transfor-mation algorithms, which might be useful even for MM cal-culations.

Farkas and Schlegel constructed an algorithm,7 whichhasO(N2) scaling with one initialO(N3) step. The algo-rithm of Paizs, Fogarasi, and Pulay8 makes use of the spar-sity of the matrices appearing in their scheme, and proved tobe very fast, compared to the speed of energy and gradientevaluations in MM calculations. Their method is based on

the preconditioned conjugate gradient technique, and its per-formance depends heavily on the quality of the precondi-tioner, constructed by adaptive incomplete Cholesky decom-position. TheO(N) algorithm given by Baker, Kinghorn,and Pulay9 is particularly efficient in the construction of themodified Cartesian coordinates from internal coordinatechanges. However, the construction of the internal coordi-nates themselves requires anO(N2) procedure with oneO(N3) step.

In this article we present a new algorithm, which is ca-pable to carry out the coordinate transformations very fastand accurately. The CPU time consumption of our schemescales linearly with the system size, it is numerically stable,and can be used to efficiently solve any coordinate transfor-mation problems between Cartesian and localized internalcoordinate representations of vectors and matrices. The newalgorithm is proposed to be especially useful in moleculargeometry optimization and for developing efficient molecu-lar mechanics and molecular dynamics codes.

In the first section we briefly review some basic conceptsof molecular geometry optimization, and discuss why thetraditional algorithm of the coordinate transformation scalescubically. In the following sections we describe our newscheme and analyze its performance on test molecules. Fi-nally we summarize the new results presented in the article.

II. THE TRADITIONAL ALGORITHM

Internal coordinates describe those motions of the atomsin the molecule, which do not contribute to the translationsand rotations of the whole molecule. In geometry optimiza-tion, the most widely used internal coordinates are the so-called primitive internal coordinates. Typically, they areformed by all stretchings, bendings, and torsions that can bea!Electronic mail: [email protected]

JOURNAL OF CHEMICAL PHYSICS VOLUME 113, NUMBER 14 8 OCTOBER 2000

55980021-9606/2000/113(14)/5598/6/$17.00 © 2000 American Institute of Physics

This article is copyrighted as indicated in the article. Reuse of AIP content is subject to the terms at: http://scitation.aip.org/termsconditions. Downloaded to IP:

160.36.178.25 On: Sun, 21 Dec 2014 12:23:33

Page 3: Linear scaling algorithm for the coordinate transformation problem of molecular geometry optimization

defined over first-neighbor atoms. The number of primitiveinternal coordinates (Ni) is usually much larger than thenumber of internal degrees of freedom (Nf): Nf is 3N26 fornonlinear molecules and 3N25 for linear ones. SinceNi

>Nf , the primitive internal coordinates usually form a re-dundant set. A nonredundant set of internal coordinates canalso be defined, by linear combination of primitive internalcoordinates. For instance the natural internal coordinates in-troduced by Pulay and Fogarasi1,2 form such a set. The natu-ral internal coordinates can also be considered as local ones,since they are constructed by linear combination of primitiveinternals which are closely localized in space. The construc-tion of natural internal coordinates is much more logic-intensive than the one of primitive internals and it may failfor topologically complex molecules.8 Delocalized internalcoordinates have been introduced by Baker and co-workers4

and used for improving the speed of geometry optimization.We do not consider these coordinates here, since the newalgorithm is based on the locality of internal coordinates. Inthe following we use only primitive internal coordinates,though the derivations can be generalized for other types ofinternal coordinates, too.

It is important to relate the displacement of internal co-ordinates (Dq) to the displacement of Cartesian coordinates(Dx). This can be done by expandingDq into Taylor seriesof Dx. Usually, only the linear term of this expansion isconsidered:

Dqi5 (k51

Nc

BikDxk , ~1!

whereDqi andDxk are the displacements of theith internal(qi) and thekth Cartesian (xk) coordinate, respectively.Nc

is the number of Cartesian coordinates (Nc53N). Bik is anelement of theB matrix,10,11 and is defined by

Bik5]qi

]xk. ~2!

Since the primitive internals are analytic functions of theCartesian coordinates, the elements of theB matrix can becalculated very fast and accurately. Furthermore, since theydepend on Cartesian coordinates of maximum four atoms(12 Cartesian coordinates!, a row of theB matrix may notcontain more than 12 nonzero elements, thusB is extremelysparse for large molecules.B is a general,Ni3Nc rectangu-lar matrix. The left- and right-hand side pseudoinverses12 ofB are denoted byAL andAR , respectively:

AL5GcÀ1Bt, ~3!

AR5BtGi21 , ~4!

with Gc5BtB andGi5BBt , where the upper indext denotesmatrix transposition.Gc is anNc3Nc matrix, whileGi is anNi3Ni one.Gc has at least five zero eigenvalues, whileGihas even more. SinceGc andGi are singular, their inversesare defined in a generalized sense, by inverting only the non-zero eigenvalues in the spectral resolution of these matrices,i.e., by inversion after singular value decomposition. Using

the «k nonzero eigenvalues andvk column eigenvectors~ofsizeNc) of Gc , the spectral resolution ofGc can be writtenas

Gc5 (k51

Ng

«kvkvkt , ~5!

and its generalized inverse is defined as

GcÀ15 (

k51

Ng 1

«kvkvk

t , ~6!

with Ng being the number of nonzero eigenvalues ofGc(Ng<Nf<Nc). The generalized inverse ofGi can be calcu-lated similarly.

It can be shown thatAR andAL are equal. We present aproof for this statement in the Appendix. Since these twomatrices are equal, let us denote both left and right pseudo-inverses ofB by A. Traditionally A is evaluated asAR . Inour developments we evaluatedA as AL , thus only thesmallerGc matrix is to be inverted instead of the largerGione. Traditionally the generalized inverse matrices are con-structed via matrix diagonalization, which is anO(N3) pro-cess and becomes very time consuming for larger systems. Itis also worth mentioning that whileB is very sparse, itspseudoinverse is not sparse at all.8

A is used for the transformation of the Cartesian repre-sentation of energy gradients (gc) into their internal coordi-nate representation (gi):

gi5Atgc , ~7!

and also for the transformation of internal coordinate dis-placements into Cartesian system:

Dx5ADq, ~8!

where all vectors are column vectors, andA is an Nc3Ni

matrix. In fact, the transformation of internal coordinate dis-placements is part of an iterative procedure, called iterativeback-transformation.1 The goal of this procedure is to modifythe Cartesian coordinates of the molecule so that, at the re-sulting geometry, the values of the internal coordinates agreewith some predetermined values. The total required changeof internal coordinates during the iterative back-transformation is usually determined by the~approximate!second derivatives of the energy~Hessian matrix! and theenergy gradients. During the process of iterative back-transformationDq in Eq. ~8! is given as the difference be-tween the required and actual values of the internal coordi-nates. SinceA is depending on the actual geometry, inprinciple, it should be recalculated in each cycle of the itera-tive back-transformation. In practice, usually just theB ma-trix component ofA is recalculated~since it does not con-sume much time!, and the inverse matrix part@see Eqs.~3!and ~4!# is kept unchanged. The iterative back-transformation is required, since Eq.~1! is only an approxi-mation to the exact relationship between the internal andCartesian coordinate displacements. The smaller the requiredchange of internal coordinates is, the faster the iterativeback-transformation. Normally, the iterative back-transformation takes 2–7 cycles.

5599J. Chem. Phys., Vol. 113, No. 14, 8 October 2000 Coordinate transformations

This article is copyrighted as indicated in the article. Reuse of AIP content is subject to the terms at: http://scitation.aip.org/termsconditions. Downloaded to IP:

160.36.178.25 On: Sun, 21 Dec 2014 12:23:33

Page 4: Linear scaling algorithm for the coordinate transformation problem of molecular geometry optimization

III. A FAST NEW ALGORITHM

In this section we describe a new algorithm, which cancarry out the above-mentioned coordinate transformationsvery fast, in a linear scaling fashion, without ever calculatingthe nonsparseA and Gc

21 matrices explicitly. In order toavoid working with the singularGc matrix G« is introduced:

G«5Gc1«I , ~9!

whereI denotes theNc3Nc identity and« is a small positivenumber.G« is also used in the construction of a modifiedAmatrix:

A«5G«À1Bt. ~10!

The internal coordinate representation of the energy gradi-ents can be approximated bygi'gi

„0… , where

gi„0…5A«

t gc . ~11!

This approximation becomes exact in the«→0 limit, andcovers Eq.~7!. At a finite but small value of« the exactgigradients can be calculated by an iterative, Newton–Raphsontype scheme:

gi5 limk→`

gi(k) , ~12!

gi(k¿1)5gi

(k)1A«t @gc2Btgi

(k)#. ~13!

The iterative scheme of Eq.~13! converges to

Btgi(k)5gc , ~14!

and thus also Eq.~7! is satisfied.By the spectral shift in Eq.~9! a positive definiteG«

matrix is generated from the positive semidefiniteGc . Thematrix G« can be Cholesky decomposed, since it is positivedefinite:

G«5U«t U« , ~15!

whereU« denotes an upper triangular matrix. The multipli-cation of a Cartesian vector~e.g., gc) by A«

t can now beperformed by two solutions of linear equations,

U«t gc85gc , ~16!

U«gc95gc8, ~17!

and by one sparse matrix multiplication,

gi(0)5Bgc9 . ~18!

The solutions of the linear Eqs.~16! and ~17! can be evalu-ated very fast by forward- and backsubstitutions,13 if U« issparse enough. Thus the explicit evaluation of nonsparse in-verse matrices can be circumvented.

The equationG«gc95gc could be solved forgc9 by otherlinear equation solvers, too, e.g., by conjugate gradient tech-niques. SinceG« , similarly to Gc and Gi , is an ill-conditioned matrix~i.e., the ratio of the greatest and smallesteigenvalues is very large! we prefer the above-mentioneddirect solver, instead of iterative solvers, like conjugate gra-dient techniques. The iterative scheme of Eq.~13! is able toreproduce the results of the traditional gradient transforma-tion, Eq. ~7! to arbitrary accuracy.

All the operations in this new algorithm can be carriedout very fast, using sparse matrix techniques, provided thatthe matricesB, G« andU« are sparse enough. The sparsity ofB has already been discussed.Gc also reflects the locality ofinternal coordinates, since it is defined as the overlap of thecolumns ofB. A (Gc) ij element of theGc matrix is deter-mined by summation over internal coordinates:

~Gc! ij 5(l 51

Ni

BliBlj . ~19!

Thus only those„Gc) ij elements ofGc are nonzero, for whichthe correspondingith andjth Cartesian coordinates are con-nected by at least one internal coordinate. Since the primitiveinternal coordinates are very localized, they can connect onlya few Cartesian ones. For example, in a diamond crystal, acarbon atom may be involved in no more than 94 primitiveinternal coordinates~4 stretchings, 18 bendings, and 72 tor-sions!. These internal coordinates connect 41 atoms. Thisimplies, that a row of theGc matrix of the diamond crystalmay not contain more than 33415123 nonzero elements.Thus, when working with primitive internal coordinates, theGc matrix has always considerable amount of sparsity. Thisis also true forG«, since it differs fromGc only in the di-agonals. The locality of the internal coordinates also ensuresthat theG« matrix can always be brought to a band-diagonalstructure by symmetric permutations, provided that the mol-ecule does not contain large rings. The bandwidth of thisband-diagonal matrix is determined by the spatial range ofthe internal coordinates, and does not exceed 123 for typicalorganic molecules. In topologically more complex systems,or in case of additional, spatially long-ranged internal coor-dinates, theG« matrix is not necessarily strictly band-diagonal. In our developments we used incomplete Choleskyfactorization ofG«, in order to construct theU« matrices.Incomplete Cholesky decomposition always ensures thatU«

is about as sparse as the lower triangle of~the symmetric!G«. The extreme sparsity of theseU« matrices allows theforward- and backsubstitution to proceed very fast in the newgradient transformation algorithm. Similarly to theGc matrixalsoGi has considerable amount of sparsity if using localizedinternal coordinates.

One step of the iterative back-transformation, Eq.~8!,can be done by the following iteration:

Dx5 limk→`

Dx„k…, ~20!

Dx„k¿1…5G«À1@BtDq1«Dx„k…#, ~21!

whereDx„0… is given by

Dx(0)5G«À1BtDq, ~22!

with Dq being the required change of internal coordinates ata given step of the iterative back-transformation. By the it-erative scheme in Eq.~21! the same result can be obtained asby the traditional transformation of Eq.~8!, provided that theCholesky factorization ofG« is exact. However, we do notneed to iterate Eq.~21! to convergence, since the resultingDx is going to be iterated further in the process of iterativeback-transformation, anyway. Thus no high precision agree-

5600 J. Chem. Phys., Vol. 113, No. 14, 8 October 2000 Nemeth et al.

This article is copyrighted as indicated in the article. Reuse of AIP content is subject to the terms at: http://scitation.aip.org/termsconditions. Downloaded to IP:

160.36.178.25 On: Sun, 21 Dec 2014 12:23:33

Page 5: Linear scaling algorithm for the coordinate transformation problem of molecular geometry optimization

ment with the classical result from Eq.~8! for a givenDq isrequired. Instead, we useDx'Dx„0… and skip the iteration ofEq. ~21!. Like for the gradient transformation, multiplica-tions by G«

À1 are performed by Cholesky decomposingG«

and using forward- and backsubstitutions. Since the genera-tion of theB, G« , andU« matrices is very fast, in our imple-mentation these matrices are all recalculated in the iterativeback-transformation step, unlike in the traditional algorithm,in which only B is recalculated whileGi

À1 is usually keptfixed.

IV. RESULTS AND DISCUSSION

A. Computational details

The new coordinate transformation algorithm has beenimplemented into theGAUSSIAN set of programs.14 All sparsematrix algebraic operations used a zero threshold of 10210.The test calculations have been carried out on a single MIPSR10000 ~180 MHz! processor of an SGI PowerChallengecomputer. The performance of the new coordinate transfor-mation algorithm has been compared to the traditionalmethod, outlined in Sec. II. Here we present results on poly-alanine and@10:0# carbone nanotube systems. At the initialgeometries polyalanine molecules have standard bondlengths and bond angles, the skeletal CCNC and CNCC tor-sional angles are 100° and 170°, respectively. Initial nano-tube C–C bond lengths are 1.48 Å for bonds parallel tonanotube axis, all other bonds are 1.40 Å long, bond anglesare approximately 120°. Dangling bonds at both ends of thenanotubes are saturated by hydrogens. In the calculations allpossible local internal coordinates, i.e., all local stretchings,bendings, and torsions, have been used.

For the spectral shift of theGc matrix,«51026 has beenused in all calculations. We have not made a comprehensivestudy on the effects of changing this value of« yet. U«

matrices are evaluated by incomplete Cholesky factorizationin all test cases. Incomplete Cholesky factorization may be-come unstable in case of topologically complex large matri-ces. In order to improve the stability of the factorization,appropriate permutation schemes can be used.15 We appliedminimum degree ordering15 for Gc .

The present tests use only thegi'gi„0… approximation in-

stead of iteratinggi„k… in Eq. ~21!. We have found however,

that these approximate transformed gradients agreed with theones obtained from the traditional algorithm to an accuracyof 231026 a.u., even for large systems containing hundredsof atoms.

B. Matrix sparsity

Figure 1 shows the sparsity pattern of theGc matrix fora 900 atom nanotube. The strictly band-diagonal structure ofthe matrix is a consequence of the locality of internal coor-dinates. The bandwidth of theGc matrix is constant for ahomologue series of molecules. Thus the percentage of non-zero elements inGc tends to zero with increasing systemsize. This tendency is illustrated in Fig. 2, using data ob-tained from nanotube calculations. When incompleteCholesky factorization is applied, the sparsities of theU«

triangular matrices are always close to those of the lowertriangle of the correspondingGc .13 The very high sparsity ofGc allows fast, linearly scaling Cholesky decomposition andforward- and backsubstitutions.

C. Tests on smaller molecules

Complete geometry optimizations have been carried outon smaller polyalanine and nanotube molecules, in order toinvestigate the effect of the new gradient and back-transformation algorithms on the process of geometry opti-mization. For polyalanine, energies and gradients have beenevaluated by a linear scaling AM1 program16,17 as availablein GAUSSIAN.14 For nanotubes, calculations have been carriedout by molecular mechanics using the DREIDING forcefield.18 The rational function optimization method19 has beenapplied for the quadratic search. The results are summarizedin Table I. For both polyalanines and nanotubes the numberof internal coordinates grows linearly with system size, as itis expected on the basis of the locality of internal coordi-nates. For all test molecules the optimizations converged tothe same geometry by both traditional and new schemes. For

FIG. 1. Sparsity pattern of theG« matrix of a 900 atom nanotube system.

FIG. 2. Percentage of nonzero matrix elements in theG« matrices of nano-tubes.

5601J. Chem. Phys., Vol. 113, No. 14, 8 October 2000 Coordinate transformations

This article is copyrighted as indicated in the article. Reuse of AIP content is subject to the terms at: http://scitation.aip.org/termsconditions. Downloaded to IP:

160.36.178.25 On: Sun, 21 Dec 2014 12:23:33

Page 6: Linear scaling algorithm for the coordinate transformation problem of molecular geometry optimization

the polyalanine series, the number of optimization cycles hasalways been smaller with the new algorithm than with thetraditional one. However, this is not necessarily the case forany geometry optimization. If the optimization convergesjust in a few steps, no big difference in the number of opti-mization cycles is expected, as exemplified by the optimiza-tion results of small nanotubes in Table I. With growingsystem size, the advantage of the new coordinate transforma-tion becomes huge in total CPU time. While the traditionalalgorithm needs several hours of CPU time for the coordi-nate transformation, the new one requires just a few seconds,in the case of systems containing a few hundred atoms.Again, the extreme efficiency of the new scheme is a conse-quence of the sparsity of theG« matrix, which can always beensured by applying localized internal coordinates for thegeometry optimization.

D. Tests on larger systems

In order to study whether the new transformation algo-rithm works equally well for the optimization of larger sys-tems, complete geometry optimizations have been carriedout on large nanotubes~up to 1860 atoms!, using the MMmethod with DREIDING force field. To avoid quadraticallyscaling storage requirements, the steepest descent methodhas been used to calculate internal coordinate displacements.Since the optimizations would have required too much timeby the traditional scheme, the quality of the optimized struc-tures have been checked in another way. The optimizedstructures should consist of periodically repeated units, sincethe test molecules form a homologue series. Still, the opti-mized geometries of the smallest nanotubes can be obtainedby both traditional and new schemes. These test moleculesare already large enough to contain the repeated units ex-pected for the larger structures. If the same structural unit isrepeated in both large and small optimized nanotubes and thenumber of optimization steps does not differ very much, thenew scheme behaves well for large systems, too. The ener-gies of the optimized nanotubes scale linearly with the sys-tem size, as illustrated in Fig. 3. This indicates that the opti-

mized structures are determined by the same periodicallyrepeated unit. The number of optimization steps has beenbetween 22 and 27. Thus the new scheme behaves well forthese large test systems. Further test calculations on largebiological molecules are in progress.

E. Scaling

The CPU time spent for the gradient transformation canbe seen in Fig. 4, as a function of the system size. Cartesiangradients have been evaluated by molecular mechanics cal-culations using the DREIDING force field. The transforma-tion time scales linearly for both nanotube and polyalaninesystems, approximately above 500 atoms for nanotubes andabove 1000 atoms for polyalanines. In case of polyalaninemolecules, the transformation time is about half of that of thenanotubes. The reason for this is that a nanotube constitutesa more closely packed system of atoms: in nanotubes moreatoms are connected by local internal coordinates than inpolyalanines, and thereforeG« contains more nonzero ele-ments for nanotubes than for polyalanines.

TABLE I. Geometry optimization data of polyalanine~ala-n) and @10:0#carbone nanotube~tube-n) systems.Na denotes the number of atoms;Ni :internal coordinates; Cycles-old/new: Number of optimization cycles by thetraditional/new algorithms;DE: energy difference of the optimized struc-tures~‘‘old’’–‘‘new’’ !; DtG : CPU time spent for the gradient transforma-tion in the first optimization cycle;DtT : total savings in CPU time byapplying the new transformation algorithm. For ala-20 and ala-60 onlyDtG

has been calculated.

Molecule Na Ni

Cycles DtG ~s!

DE ~mH! DtT ~min!old new old new

ala-5 53 302 85 76 2.10 0.05 0.016 10ala-10 103 612 87 86 33.40 0.12 0.009 96ala-15 153 922 97 91 176.46 0.17 0.004 609ala-20 203 1232 ••• ••• 514.12 0.23 ••• •••ala-60 603 3712 ••• ••• 20569.35 0.76 ••• •••tube-3 100 810 6 6 105.70 0.16 0.010 21tube-5 180 1650 7 7 1337.08 0.38 0.013 546tube-7 260 2490 7 7 5381.25 0.57 0.032 1199

FIG. 3. Total energies of optimized nanotube structures calculated by mo-lecular mechanics with the DREIDING force field.

FIG. 4. CPU time spent for the gradient transformation in the new transfor-mation algorithm. Data are from calculations on polyalanine and nanotubesystems.

5602 J. Chem. Phys., Vol. 113, No. 14, 8 October 2000 Nemeth et al.

This article is copyrighted as indicated in the article. Reuse of AIP content is subject to the terms at: http://scitation.aip.org/termsconditions. Downloaded to IP:

160.36.178.25 On: Sun, 21 Dec 2014 12:23:33

Page 7: Linear scaling algorithm for the coordinate transformation problem of molecular geometry optimization

We do not present timings for the back-transformation,since one cycle of the iterative back-transformation and thegradient transformation has required almost exactly~within0.1 s! the same amount of time in all test cases. The similar-ity of the timings is based on the fact that in both transfor-mations the same kind of operations must be carried out bythe same matrices. The number of cycles in the iterativeback-transformation is always the same in both traditionaland new schemes. However, we have observed that thechoice of the zero threshold may influence this feature. For azero threshold of 1028, sometimes a larger number of back-transformation cycles is required. A zero threshold of 10210

ensures fast convergence in the back-transformation for allthe test cases. The number of cycles in the iterative back-transformation is usually between 2 and 7.

The linear scaling of the coordinate transformations maygreatly improve the performance of geometry optimizations.However we do not claim linear scaling for the whole pro-cess of geometry optimization, which depends on other fac-tors, too. For example, the number of optimization steps de-pends on the shape of the energy hypersurface and is usuallyproportional to the size of the molecule, leading to a qua-dratic scaling for the overall optimization process in most ofthe cases.

V. CONCLUSIONS

A new algorithm has been presented for the coordinatetransformation problem in molecular geometry optimization.It is computationally very simple, stable, and efficient. It isbased on the utilization of the locality of primitive internalcoordinates. Test calculations on polyalanine and@10:0# car-bone nanotube systems indicate that the new algorithm isvery accurate and much faster than the traditional one. Fur-thermore, it scales linearly with the system size. We thinkthat this new algorithm will be of great importance in build-ing more efficient molecular mechanics and molecular dy-namics codes, as well as in general molecular structure opti-mization.

ACKNOWLEDGMENTS

K.N. is gratefully indebted to Professor Jean-Louis Ri-vail for his hospitality at Universite´ Henri Poincare´, Nancy I,and to the Center Charles Hermite for a postdoctoral fellow-ship.

APPENDIX

In this appendix we give a proof for the equivalence ofthe left- (AL) and right-hand side (AR) pseudoinverses of ageneral rectangular matrixB. B has a size ofNi3Nc , whereNi>Nc . The columns ofB span a space ofNf dimension,with Nf<Nc . Let V be anNi3Nc matrix, too. Let the col-umns ofV contain orthonormal vectors, of whichNf spanthe same space as that which the columns ofB span, the restof V spans a complementary space. ThusB can be decom-posed as

B5VM , ~A1!

whereM is a symmetric, singular,Nc3Nc matrix with Nf

nonzero eigenvalues.M can be chosen as the square root ofthe positive semidefiniteBtB matrix, since

M25BtB. ~A2!

AR is defined by

AR5Bt„BBt

À1, ~A3!

it can also be written as

ARÄMV t†VM À2Vt

‡, ~A4!

which can be rearranged like

AR5MÀ2MV t, ~A5!

where the orthonormality of the columns ofV has been uti-lized. The inverses of the singularBBt andM2 matrices aredefined in a generalized sense~see Eq. 6!, by inverting onlythe nonzero eigenvalues in the corresponding spectral reso-lutions. Utilizing thatMÀ25„BtB…À1 we can write

AR5„BtB…À1Bt, ~A6!

and the expression on the right-hand side of Eq.~A6! isnothing but the definition ofAL . Thus the equivalence ofARandAL is proven.

1P. Pulay, G. Fogarasi, F. Pang, and J. E. Boggs, J. Am. Chem. Soc.101,2550 ~1979!.

2G. Fogarasi, X. Zhou, P. W. Taylor, and P. Pulay, J. Am. Chem. Soc.114,8191 ~1992!.

3P. Pulay and G. Fogarasi, J. Chem. Phys.96, 2856~1992!.4J. Baker, A. Kessi, and B. Delley, J. Chem. Phys.105, 192 ~1996!.5S. Goedecker, Rev. Mod. Phys.71, 1085~1999!.6G. E. Scuseria, J. Phys. Chem.103, 4782~1999!.7O. Farkas and H. B. Schlegel, J. Chem. Phys.109, 7100~1998!.8B. Paizs, G. Fogarasi, and P. Pulay, J. Chem. Phys.109, 6571~1998!.9J. Baker, D. Kinghorn, and P. Pulay, J. Chem. Phys.110, 4986~1999!.

10M. Eliashevich Compt. Rend. Acad. Sci. U.S.S.R.28, 605 ~1940!.11E. B. Wilson, Jr., J. Chem. Phys.9, 76 ~1941!.12Å. Bjorck, Numerical Methods for Least Squares Problems, 1st ed.

~North-Holland, Amsterdam, 1996!.13S. Pissanetsky,Sparse Matrix Technology~Academic, London, 1984!.14GAUSSIAN 98, Revision A.7, M. J. Frisch, G. W. Trucks, H. B. Schlegel, G.

E. Scuseria, M. A. Robb, J. R. Cheeseman, V. G. Zakrzewski, Jr., J. A.Montgomery, R. E. Stratmann, J. C. Burant, S. Dapprich, J. M. Millam, A.D. Daniels, K. N. Kudin, M. C. Strain, O. Farkas, J. Tomasi, V. Barone,M. Cossi, R. Cammi, B. Mennucci, C. Pomelli, C. Adamo, S. Clifford, J.Ochterski, G. A. Petersson, P. Y. Ayala, Q. Cui, K. Morokuma, D. K.Malick, A. D. Rabuck, K. Raghavachari, J. B. Foresman, J. Cioslowski, J.V. Ortiz, A. G. Baboul, B. B. Stefanov, G. Liu, A. Liashenko, P. Piskorz,I. Komaromi, R. Gomperts, R. L. Martin, D. J. Fox, T. Keith, M. A.Al-Laham, C. Y. Peng, A. Nanayakkara, C. Gonzalez, M. Challacombe, P.M. W. Gill, B. Johnson, W. Chen, M. W. Wong, J. L. Andres, C. Gonza-lez, M. Head-Gordon, E. S. Replogle, and J. A. Pople, GAUSSIAN, Inc.Pittsburgh, PA, 1998.

15A. George and J. Liu,Computer Solution of Large Sparse Positive Defi-nite Systems~Prentice Hall, Englewood Cliffs, NJ, 1981!.

16A. D. Daniels, J. M. Millam, and G. E. Scuseria, J. Chem. Phys.107, 425~1997!.

17A. D. Daniels and G. E. Scuseria, J. Chem. Phys.110, 1321~1999!.18S. L. Mayo, B. D. Olafson, and W. A. Goddard, J. Phys. Chem.94, 8897

~1990!.19O. Farkas and H. B. Schlegel, J. Chem. Phys.111, 10806~1999!.

5603J. Chem. Phys., Vol. 113, No. 14, 8 October 2000 Coordinate transformations

This article is copyrighted as indicated in the article. Reuse of AIP content is subject to the terms at: http://scitation.aip.org/termsconditions. Downloaded to IP:

160.36.178.25 On: Sun, 21 Dec 2014 12:23:33