7
Computer Physics Communications 180 (2009) 1654–1660 Contents lists available at ScienceDirect Computer Physics Communications www.elsevier.com/locate/cpc DAMQT: A package for the analysis of electron density in molecules Rafael López a,,1 , Jaime Fernández Rico a,1 , Guillermo Ramírez a,1 , Ignacio Ema a,1 , David Zorrilla b a Universidad Autónoma de Madrid, Facultad de Ciencias, Departamento de Química Física Aplicada, C-XIV, E-28049- Madrid, Spain b Universidad de Cádiz, Facultad de Ciencias, Departamento de Química Física, Spain article info abstract Article history: Received 12 January 2009 Accepted 2 March 2009 Available online 5 March 2009 PACS: 31.15.ae Keywords: Electron density Electrostatic potential Electric field Hellmann–Feynman forces Density deformations DAMQT is a package for the analysis of the electron density in molecules and the fast computation of the density, density deformations, electrostatic potential and field, and Hellmann–Feynman forces. The method is based on the partition of the electron density into atomic fragments by means of a least deformation criterion. Each atomic fragment of the density is expanded in regular spherical harmonics times radial factors, which are piecewise represented in terms of analytical functions. This representation is used for the fast evaluation of the electrostatic potential and field generated by the electron density and nuclei, as well as for the computation of the Hellmann–Feynman forces on the nuclei. An analysis of the atomic and molecular deformations of the density can be also carried out, yielding a picture that connects with several concepts of the empirical structural chemistry. Program summary Program title: DAMQT1.0 Catalogue identifier: AEDL_v1_0 Program summary URL: http://cpc.cs.qub.ac.uk/summaries/AEDL_v1_0.html Program obtainable from: CPC Program Library, Queen’s University, Belfast, N. Ireland Licensing provisions: GPLv3 No. of lines in distributed program, including test data, etc.: 278 356 No. of bytes in distributed program, including test data, etc.: 31 065 317 Distribution format: tar.gz Programming language: Fortran90 and C++ Computer: Any Operating system: Linux, Windows (Xp, Vista) RAM: 190 Mbytes Classification: 16.1 External routines: Trolltech’s Qt (4.3 or higher) (http://www.qtsoftware.com/products), OpenGL (1.1 or higher) (http://www.opengl.org/), GLUT 3.7 (http://www.opengl.org/resources/libraries/glut/). Nature of problem: Analysis of the molecular electron density and density deformations, including fast evaluation of electrostatic potential, electric field and Hellmann–Feynman forces on nuclei. Solution method: The method of Deformed Atoms in Molecules, reported elsewhere [1], is used for partitioning the molecular electron density into atomic fragments, which are further expanded in spherical harmonics times radial factors. The partition is used for defining molecular density deformations and for the fast calculation of several properties associated to density. Restrictions: The current version is limited to 120 atoms, 2000 contracted functions, and l max = 5 in basis functions. Density must come from a LCAO calculation (any level) with spherical (not Cartesian) Gaussian functions. Unusual features: The program contains an OPEN statement to binary files (stream) in file GOPENMOL.F90. This statement has not a standard syntax in Fortran 90. Two possibilities are considered in conditional compilation: Intel’s ifort and Fortran2003 standard. This latter is applied to compilers other than ifort (gfortran uses this one, for instance). This paper and its associated computer program are available via the Computer Physics Communications homepage on ScienceDirect (http://www.sciencedirect. com/science/journal/00104655). * Corresponding author. E-mail address: [email protected] (R. López). 1 Financial support from the Dirección General de Investigación Científica y Técnica (CTQ2007-63332). 0010-4655/$ – see front matter © 2009 Elsevier B.V. All rights reserved. doi:10.1016/j.cpc.2009.03.004

DAMQT: A package for the analysis of electron density in molecules

Embed Size (px)

Citation preview

Page 1: DAMQT: A package for the analysis of electron density in molecules

Computer Physics Communications 180 (2009) 1654–1660

Contents lists available at ScienceDirect

Computer Physics Communications

www.elsevier.com/locate/cpc

DAMQT: A package for the analysis of electron density in molecules ✩

Rafael López a,∗,1, Jaime Fernández Rico a,1, Guillermo Ramírez a,1, Ignacio Ema a,1, David Zorrilla b

a Universidad Autónoma de Madrid, Facultad de Ciencias, Departamento de Química Física Aplicada, C-XIV, E-28049- Madrid, Spainb Universidad de Cádiz, Facultad de Ciencias, Departamento de Química Física, Spain

a r t i c l e i n f o a b s t r a c t

Article history:Received 12 January 2009Accepted 2 March 2009Available online 5 March 2009

PACS:31.15.ae

Keywords:Electron densityElectrostatic potentialElectric fieldHellmann–Feynman forcesDensity deformations

DAMQT is a package for the analysis of the electron density in molecules and the fast computation ofthe density, density deformations, electrostatic potential and field, and Hellmann–Feynman forces. Themethod is based on the partition of the electron density into atomic fragments by means of a leastdeformation criterion. Each atomic fragment of the density is expanded in regular spherical harmonicstimes radial factors, which are piecewise represented in terms of analytical functions. This representationis used for the fast evaluation of the electrostatic potential and field generated by the electron densityand nuclei, as well as for the computation of the Hellmann–Feynman forces on the nuclei. An analysisof the atomic and molecular deformations of the density can be also carried out, yielding a picture thatconnects with several concepts of the empirical structural chemistry.

Program summary

Program title: DAMQT1.0Catalogue identifier: AEDL_v1_0Program summary URL: http://cpc.cs.qub.ac.uk/summaries/AEDL_v1_0.htmlProgram obtainable from: CPC Program Library, Queen’s University, Belfast, N. IrelandLicensing provisions: GPLv3No. of lines in distributed program, including test data, etc.: 278 356No. of bytes in distributed program, including test data, etc.: 31 065 317Distribution format: tar.gzProgramming language: Fortran90 and C++Computer: AnyOperating system: Linux, Windows (Xp, Vista)RAM: 190 MbytesClassification: 16.1External routines: Trolltech’s Qt (4.3 or higher) (http://www.qtsoftware.com/products), OpenGL (1.1 orhigher) (http://www.opengl.org/), GLUT 3.7 (http://www.opengl.org/resources/libraries/glut/).Nature of problem: Analysis of the molecular electron density and density deformations, including fastevaluation of electrostatic potential, electric field and Hellmann–Feynman forces on nuclei.Solution method: The method of Deformed Atoms in Molecules, reported elsewhere [1], is usedfor partitioning the molecular electron density into atomic fragments, which are further expandedin spherical harmonics times radial factors. The partition is used for defining molecular densitydeformations and for the fast calculation of several properties associated to density.Restrictions: The current version is limited to 120 atoms, 2000 contracted functions, and lmax = 5 in basisfunctions. Density must come from a LCAO calculation (any level) with spherical (not Cartesian) Gaussianfunctions.Unusual features: The program contains an OPEN statement to binary files (stream) in file GOPENMOL.F90.This statement has not a standard syntax in Fortran 90. Two possibilities are considered in conditionalcompilation: Intel’s ifort and Fortran2003 standard. This latter is applied to compilers other than ifort(gfortran uses this one, for instance).

✩ This paper and its associated computer program are available via the Computer Physics Communications homepage on ScienceDirect (http://www.sciencedirect.com/science/journal/00104655).

* Corresponding author.E-mail address: [email protected] (R. López).

1 Financial support from the Dirección General de Investigación Científica y Técnica (CTQ2007-63332).

0010-4655/$ – see front matter © 2009 Elsevier B.V. All rights reserved.doi:10.1016/j.cpc.2009.03.004

Page 2: DAMQT: A package for the analysis of electron density in molecules

R. López et al. / Computer Physics Communications 180 (2009) 1654–1660 1655

Additional comments: The distribution file for this program is over 30 Mbytes and therefore is not delivereddirectly when download or e-mail is requested. Instead a html file giving details of how the program canbe obtained is sent.Running time: Largely dependent on the system size and the module run (from fractions of a second tohours).References:[1] J. Fernández Rico, R. López, I. Ema, G. Ramírez, J. Mol. Struct. (Theochem) 727 (2005) 115.

© 2009 Elsevier B.V. All rights reserved.

1. Introduction

Chemists use to regard molecules as made of atoms whoseelectron clouds are slightly distorted as a consequence of inter-action. This idea that underlies the chemical thinking has not aunivocal translation in terms of the electron density because, inmolecules, atomic densities are not quantum mechanical observ-ables.

Nevertheless, the evident interest in the link between electrondensity and molecular structure has led to many different parti-tions of the molecular density in atomic contributions, which canbe classified into two main categories: space-partition schemes[1–15], in which the molecular density (defined in the wholespace R3) is separated in disjoint regions, each one correspond-ing to an atomic domain, ΩA (satisfying:

⋃MA=1 ΩA = R3 and

ΩA ∩ ΩB = 0 ∀A, B), and such that:

ρ(r ∈ R3) =

M∑A=1

ρ(r ∈ ΩA) (1.1)

and atom-centered partition schemes [16–21] in which eachatomic piece extends over the whole space:

ρ(r) =M∑

A=1

ρ A(rA), (1.2)

where rA = r − RA spans R3.The DAMQT package is based on the Deformed Atoms in Molecules

(DAM) method for partitioning the molecular electron density intoatomic contributions. The first (rather naif) formulation of this par-tition can be placed in the work developed in our group in theeighties [22–26], which has undergone a more rigorous reformula-tion and several refinements since then.

In the DAM partition, atomic fragments are defined within theLCAO framework to retain as much as possible their sphericity. Forthis purpose, all the one-center charge distributions centered ona given atom are assigned to it, and every two-center distributionis partitioned between the two atoms involved. This partition iscarried out with a criterion based on the fast convergence of themultipolar expansion of the long-range potential of the fragmentstowards that of the full distribution [20,21]. The term least defor-mation used through out this work for referring to this partitionmust be understood in this sense.

The atomic fragments thus obtained are further expanded inspherical harmonics times radial factors, and these radial factorsare piecewise fitted to analytical functions [27,28]. We will oftenrefer to this representation as a multipolar expansion, but it is mostimportant to recall that the multipoles of the expansion are functionsof r (effective multipoles), with the right behavior at the origin,their values being zero at r = 0 for l �= 0 in such a way that theelectron contribution to the electrostatic potential remains finiteat nuclei.

The package consists of a set of programs designed for thepartition and representation of the molecular electron density

in atomic fragments as well as for the computation of severalone-electron functionals from this representation [29]. The ver-sion reported herein is prepared to work with densities computedwith Gaussian basis sets by any standard computational package,at any level of computation: Hartree–Fock (HF), Multiconfigura-tional (MC), Configuration Interaction (CI), Density Functional The-ory (DFT) and so forth. The only requirement is that density mustbe expressed in terms of a basis set of Contracted Gaussian func-tions (CGTO) in the LCAO scheme.

Instructions for the installation by means of a Makefile in aLinux environment are included in the package, and an installerfor Microsoft Windows is also supplied.

In Section 2, we briefly introduce the physics which supportsthe method. The mathematical developments will be reduced tofundamental equations pertaining the definition of the atomic frag-ments, those required for their expansion in terms of regular solidharmonics and the equations involved in the computation of anumber of functionals of the density in terms of this expansion.The reader will be addressed to suitable references for further de-tails.

The general structure of the package is outlined in Section 3,paying attention to the modular structure and the link betweenthe different modules. A concise description of every module isalso provided in this section. In Section 4, the performance of thepackage is analyzed and illustrated with several examples. Finally,the main features of the Graphical User Interface (GUI) are sum-marized in the last section.

2. Deformed atoms in molecules

In a LCAO calculation (at any level of computation) the electrondensity is expressed as a linear combination of products of pairsof basis set functions (charge distributions in the sequel):

ρ(r) =∑

i

∑j

ρi jχi(r)χ j(r) (2.1)

the coefficients being the density matrix elements.The Deformed Atoms in Molecules method (DAM) [20,21] pro-

vides a way to decompose the total density of a molecule thusexpressed as a sum of atom-centered densities:

ρ(r) =∑

A

ρ A(rA) (2.2)

with the atomic fragments, ρ A(rA), determined by a least deforma-tion criterion. Every atomic fragment consists of all the one-centercharge distributions placed in the atom and a portion of everytwo-center distributions with one function centered in it:

ρ A(rA) =∑

a

∑a′

ρaa′χa(rA)χa′ (rA)

+ 2∑B �=A

∑a

∑b

ρabdAab(rA) (2.3)

Page 3: DAMQT: A package for the analysis of electron density in molecules

1656 R. López et al. / Computer Physics Communications 180 (2009) 1654–1660

where A, B, . . . label the nuclei, a, a′ , b, b′ label the subsets of thebasis functions, and dA

ab(rA) is the part of the two-center distribu-tion χa(rA)χb(rB) assigned to A.

The atomic fragments are expanded in regular spherical har-monics times radial factors:

ρ A(rA) =∞∑

l=0

l∑m=−l

zml (rA)ρ A

lm(rA), (2.4)

where zml (r) are the regular spherical harmonics defined as:

zml (r) = rl(−1)m P |m|

l (cos θ)Φm(φ) (2.5)

with Φm(φ) = cos(mφ) for m � 0, Φm(φ) = sin(|m|φ) for m < 0,and P |m|

l (z) being the associated the Legendre functions [30].The radial factors ρ A

lm(r) are piecewise expanded in terms ofproducts of exponentials times polynomials of r [27,28]:

ρ Alm(r) ≈ e−ξi r

ni∑k=0

c(i)k (l,m)

[ti(r)

]k(2.6)

with the intervals defined by λi−1 � r � λi ; i = 1, . . . ,n, and thevariable ti(r), by:

ti(r) ≡ 2r − λi−1

λi − λi−1− 1 (2.7)

except for the last interval in which λi = ∞ and ti(r) = ξi(r −λi−1).Eqs. (2.4) to (2.7) enable the efficient calculation of functionals

of the density. In particular, the electrostatic potential in a point ris obtained by [29]:

V (r) =N∑

A=1

{ζA

rA−

∞∑l=0

l∑m=−l

zml (rA)

[Q A

lm(rA)

r2l+1A

+ qAlm(rA)

]}, (2.8)

where ζA is the charge of nucleus A. Omitting the A index forsimplicity, the auxiliary functions Q lm and qlm for each atom aregiven by:

Q lm(r) = 4π

2l + 1

r∫0

dr′r′ 2l+2ρlm(r′)

= 4π

2l + 1

{U (i)

lm +∑

k

c(i)k (l,m)

r∫λi−1

dr′r′ 2l+2e−ξi r′[ti(r

′)]k

}

(2.9)

and

qlm(r) = 4π

2l + 1

∞∫r

dr′ r′ρlm(r′)

= 4π

2l + 1

{u(i)

lm +∑

k

c(i)k (l,m)

λi∫r

dr′ r′e−ξi r′[

ti(r′)]k

}(2.10)

with

U (i)lm =

i−1∑j=1

∑k

c( j)k (l,m)

λ j∫λ j−1

dr′ r′ 2l+2e−ξ j r′[

t j(r′)]k

(2.11)

and

u(i)lm =

n∑j=i+1

∑k

c( j)k (l,m)

λ j∫λ j−1

dr′ r′e−ξ j r′[

t j(r′)]k

. (2.12)

Notice that, in points placed far away from the nucleus of a givenatom, A, the quantities qA

lm(r) tend to zero, the Q Alm(r) become con-

stant (multipolar moments), and the contribution of the atom to themolecular potential is:

V Along-range(r) = ζA − Q A

00

rA−

∞∑l=1

l∑m=−l

zml (rA)

Q Alm

r2l+1A

. (2.13)

In this case, every atom behaves as a point charge, whose value isζA − Q A

00, plus a set of point multipoles of values −Q lm (= −U (n)

lm ).This fact is used in DAMQT for defining a long-range radius foreach atom according to a given threshold. This radius is definedas the λi such that, for r � λi , V A(r) can be computed from thelong-range expansion with an absolute error below the thresh-old. This practical definition is intended for accelerating compu-tation.

The electric field at r is given by:

E(r) =N∑

A=1

{ζArA

r3A

−∞∑

l=0

l∑m=−l

EAlm(rA)

}, (2.14)

where EAlm(rA) are the components of the electrostatic field of the

electron clouds:

EAlm(r) = iE A

lm,x(r) + jE Alm,y(r) + kE A

lm,z(r). (2.15)

These components can be computed in terms of the Q lm and qlmtoo. Omitting again the index A for simplicity, they can be writtenas:

El±m,x(r)

=[

z±(m+1)

l+1 (r)

r2l+3− (l + 1 − m)(l + 2 − m)

z±(m−1)

l+1 (r)

r2l+3

]Q lm(r)

2

+ [z±(m+1)

l−1 (r) − (l + m)(l + m − 1)z±(m−1)

l−1 (r)]qlm(r)

2, (2.16)

El±m,y(r)

= ±{[

z∓(m+1)

l+1 (r)

r2l+3+ (l + 1 − m)(l + 2 − m)

z∓(m−1)

l+1 (r)

r2l+3

]Q lm(r)

2

+ [z∓(m+1)

l−1 (r) + (l + m)(l + m − 1)z∓(m−1)

l−1 (r)]qlm(r)

2

}, (2.17)

El±m,z(r) = (l + 1 − m)z±m

l+1(r)

r2l+3Q lm(r)

− (l + m)z±ml−1(r)qlm(r). (2.18)

In Eqs. (2.16) to (2.18) the following conventions have been used:m � 0; for m = 0, only the upper sign holds; z−0

l (r) = 0; andz±m

l (r) = 0 if m > l.In the same way, the Hellmann–Feynman force [31,32] on a nu-

cleus, A, can be computed by:

FA(r) = ζA

{iqA

11 + jqA1 −1 + kqA

10

+N∑

B �=A

[ζB(RA − RB)

|RA − RB |3 −∞∑

l=0

l∑m=−l

EBlm(RA − RB)

]}. (2.19)

Obviously, the previous comment about the long-range behaviorof the Q lm and qlm and its consequences in computational savingsalso holds for electric field and Hellmann–Feynman forces.

Eqs. (2.8) to (2.19) are the basis of the algorithm used inDAMQT for evaluating these functionals with a computationalcost several orders of magnitude lower than the direct com-

Page 4: DAMQT: A package for the analysis of electron density in molecules

R. López et al. / Computer Physics Communications 180 (2009) 1654–1660 1657

Fig. 1. DAMQT structure.

putation from the density itself as given by (2.1) and its inte-grals. Some examples on the performance (accuracy and cost)of the algorithms implemented in DAMQT are given in Sec-tion 4.

It is important to remark here that, once the expansions (2.6)have been obtained, the cost of the evaluation of all these func-tionals linearly increases with the number of centers and is inde-pendent of the basis set size, in contrast with the procedure basedon Eq. (2.1) and its integrals in which the cost scales with thesquare of the number of basis functions.

3. Structure of the package

DAMQT has a modular structure with three levels (see Fig. 1).On the top, there appear the interfaces with standard packages forquantum mechanical calculations. It includes also the GUI designedto facilitate usage. This GUI has been developed using Trolltech’s Qtlibrary [33], thus enabling portability between different operatingsystems.

The second level consists of a single program, GDAM, whichcomputes the exponents and coefficients of the radial factors fit asgiven by Eq. (2.6), the integrals over the intervals in Eqs. (2.11) and(2.12), and the multipolar moments of the fragments, Q A

lm . Thisprogram also fits the integrals appearing in the right-hand side ofEqs. (2.9) and (2.10). All these data are stored in a file with ex-tension .rpd which will be read by the third level programs. Sincethese data are essential for the modules computing the function-als, GDAM must be run at least once for every project. For thisreason, the GUI blocks the execution of any program in the lowerlevel until the .rpd file has been created.

The third level (lowest) contains the modules for the analysisof the density and the computation of its functionals. The currentversion has the following modules:

• GDAMDEN: fast computation of the density and density defor-mations including 3D grid generation for plotting.

• GDAMPOT: fast computation of the electrostatic potential in-cluding 3D grid generation.

• GDAMFIELD: fast computation of electric field lines includingfile generation for 3D plotting.

• GDAMFORCES: Hellmann–Feynman forces on the atoms.

• GDAMFRAD: tabulation of radial factors and their first and sec-ond derivatives with respect to r.

The analysis of the density with GDAMDEN is one of the mostcharacteristic features of DAMQT and therefore it deserves a briefcomment. The atomic partition of the density provided by DAMpermits to isolate the contributions of atoms or groups of atoms(functional groups, for instance) to the molecular density. This sep-aration is facilitated in DAMQT, where single atoms or groups canbe chosen for their analysis.

Furthermore, the expansion of the atomic fragments in a se-ries of regular spherical harmonics allows for the separation ofthe different multipolar contributions. In particular, it is interest-ing to separate the spherical contributions of the atomic fragments(terms corresponding to z0

0) from the remaining ones (the defor-mations). This separation gives support to the concepts of atomicand molecular deformations within the DAM framework. Thoughplots of these deformations may resemble the figures obtainedwith previously reported methods for computing density differ-ences [34–36], we notice that the deformations in DAM are definedwithout appealing to any reference, thus avoiding the arbitrarinessimplicit in the choice of a particular reference.

The structure of molecular deformations has proved to be verysuggestive in the attempt to link the quantum mechanical descrip-tion of the electron density with the usual picture of the empiricalstructural chemistry [37]. The deformation patterns of the densitygive support to important concepts that chemists have coined indecades of experimental practice and that constitute the scaffold-ing of their reasoning on chemical facts.

Modules GDAMDEN, GDAMPOT, GDAMFIELD, and GDAMFORCESrender files for 3D plotting that can be handled by the graphicsviewer. Files with extensions .xyz, .plt, .fre, .fri, .frt, .fcf, .fnc are alsocompatible with gOpenMol [38–40], the last five corresponding togOpenMol’s .txt format for vector plotting.

4. Performance

As it has been pointed out above, besides the conceptual frame-work that DAM provides for the analysis and interpretation of theelectron density, it also enables a fast evaluation of the density it-self and of the molecular electrostatic potential, electric field and

Page 5: DAMQT: A package for the analysis of electron density in molecules

1658 R. López et al. / Computer Physics Communications 180 (2009) 1654–1660

Table 1Computation time and accuracy of electron density.

Molecule Basis set(size)

Referencetime/s

DAMtime/s

DAMDENtime/s

Highesterror/au

Std. dev./au

CH4 cc-pVTZ (86) 27 0.6 8 4×10−4 1×10−6

CH3Cla cc-pVDZ (47) 11 0.5 8 1×10−3 6×10−7

CH3Cla cc-pVTZ (106) 40 0.8 8 1×10−3 4×10−6

CH3Cla cc-pVQZ (204) 144 1.8 8 4×10−3 2×10−6

anthracene cc-pVDZ (246) 300 4.0 38 2×10−4 1×10−5

4-aminepyridine

cc-pVTZ (294) 371 3.8 17 2 ×10−4 4×10−6

a Points corresponding to densities higher than 100 (very close to a nucleus) havebeen excluded from statistics: a single point in cc-pVDZ and cc-pVTZ, two points incc-pVQZ.

Table 2Computation time and accuracy of electrostatic potential.

Molecule Basis set(size)

Referencetime/s

DAMPOTtime/s

Highesterror/au

Std. dev./au

CH4 cc-pVTZ (86) 759 5 5× 10−6 1×10−7

CH3Cl cc-pVDZ (47) 745 5 3× 10−4 1×10−6

CH3Cl cc-pVTZ (106) 1961 6 3× 10−4 8×10−7

CH3Cl cc-pVQZ (204) 6122 6 3× 10−4 8×10−7

anthracene cc-pVDZ (246) 18 761 18 2× 10−4 8×10−7

4-aminepyridine

cc-pVTZ (294) 19 732 12 6× 10−4 2×10−6

forces on the nuclei, with an accuracy that is sufficient for manypractical purposes.

We will illustrate this performance by analyzing the tabula-tion of the electron density and the electrostatic potential overa grid for some selected molecules and basis sets. In all cases,the highest available expansion (lmax = 10) has been chosen, anda tabulation was carried out over a Low resolution grid of DAMQT(65 × 65 × 65), with points equally spaced inside a box of di-mensions: a ∈ [3 + amin,3 + amax] (where a means x, y and z) incase of density, and a ∈ [2 ∗ (3 + amin),2 ∗ (3 + amax)] for potential.Here amin and amax are respectively the lowest and highest valuesof the corresponding atomic coordinates of the nuclei. Referenceand DAMDEN times correspond to the computation of the full grid(274 625 points) with a program using the original density matrixexpressed in the basis set, and the program using the atomic ex-pansion (DAMDEN). Time corresponding to the computation of theatomic expansion (DAM time) is independent of the grid size. Timesmeasured on an Intel(R) Pentium(R) 4 CPU at 3.20 GHz, using g++4.2.2 and Intel’s ifort 10.0 compilers.

Table 1 shows the computational time and accuracy in case ofthe density. The biggest error is found at points with high density(close to a nucleus). As it can be seen in the table, the calculationof the atomic expansion of the density with DAM is a very fastprocess, and the evaluation of density from this expansion withDAMDEN is quite faster than the computation from the basis func-tions and the elements of the density matrix.

In case of the electrostatic potential and electric field, theatomic expansion of the density is even more advantageous. AsTable 2 shows, the algorithm based in this expansion (DAMPOT)yields the electrostatic potential with a computational cost severalorders lower than reference computation from density matrix andelectrostatic potential integrals, and with an accuracy that can besufficient for many purposes. Here also the error mainly concen-trates in points where the potential is higher, and in these pointsthe relative error remains below 10−5. A similar performance isfound in the evaluation of the electric field.

Finally, it is important to remark that the cost of the evaluationof the density, electrostatic potential and electric field from theatomic expansion of the density is independent of the number ofbasis functions. This number only affects the cost of attaining the

atomic expansion (DAM) but, as it is shown in Table 1, this is anextremely fast process.

5. The Graphical User Interface

DAMQT is supplied with a GUI written in C++ and based onTrolltech’s Qt library [33]. The main window, as shown in Fig. 2,has a standard design with a menu bar and a toolbar in the top,the application driving menu on the left and a big display area(main panel) with two tabs labeled as Results and Pictures.

The driving menu contains seven tabs labeled as: Import file,Atomic densities, Density, Electrostatic potential, H-F forces on nuclei,Electrostatic field and Radial factors. When pressing any of thesetabs, a context submenu is opened with the corresponding settingoptions plus an Exec key. Pressing this key, the selected moduleis launched to be executed with these settings, and the stan-dard output of the module is directed to the main panel (Resultstab).

When the tab Pictures is clicked, the main panel turns into agraphics display area for plotting. A graphics viewer menu is dis-played on the right with the plotting options as well.

A succint description of the content of the driving menu fol-lows. Details can be found in the user’s guide (manual_en.pdf).

Import file: invokes the initialization module in which the projectis defined. Files containing the geometry and basis set (.ggbs)and the density matrix (.den) are retrieved from a suitable lo-cation or generated by an interface to some standard packages.On execution it will render an input file with default values ofthe options for the remaining modules (.inp).

Atomic densities: invokes the GDAM program for the representationof the density according to the DAM method. Execution of thismodule is mandatory if the file containing this representation(.rpd) has not been generated for the project. The remainingmodules remain blocked until the file has been created.

Density: module for the analysis, tabulation and grid generation ofthe density and atomic fragments.

Electrostatic potential: module for 3D grid generation of the elec-trostatic potential computed from the DAM expansion.

H-F forces on nuclei: module for computation of Hellmann–Feynmanforces on the nuclei from the DAM expansion. Files with vec-tors representing the forces are created to be plotted with thegraphics viewer.

Electrostatic field: module for computation of electric field linesand file generation for 3D plotting.

Radial factors: module for tabulation of radial factors and their firstand second derivatives.

The graphics viewer menu contains five tabs: Options, Geometry,Surfaces, Forces and Field lines which are briefly outlined here.

Options: general settings for the graphics viewer.Geometry: geometry file and settings for drawing.Surfaces: 3D surface files and contours settings for plotting. It

works with the 3D grids generated by the Density mod-ule GDAMDEN (-d.plt) and the Electrostatic Potential moduleGDAMPOT (-p.plt).

Forces: files with Hellmann–Feynman force vectors (.fre, .fri, .frt,.fcf, .fnc) and display options for the vectors.

Field lines: files with electric field lines (.cam) and options for dis-play.

A detailed description of the options and different types of filesgenerated by DAMQT can be found in the documentation filemanual_en.pdf included in the package.

Page 6: DAMQT: A package for the analysis of electron density in molecules

R. López et al. / Computer Physics Communications 180 (2009) 1654–1660 1659

Fig. 2. Graphical User Interface.

References

[1] P. Politzer, R.R. Harris, J. Am. Chem. Soc. 92 (1970) 6451.[2] P. Politzer, E.W. Stout, Chem. Phys. Lett. 8 (1971) 519.[3] P. Politzer, Theoret. Chim. Acta 23 (1971) 203.[4] P. Politzer, S.D. Elliot, B.F. Meroney, Chem. Phys. Lett. 23 (1973) 331.[5] R. Daudel, Compt. Rend. Acad. Sci. 237 (1953) 601–603.[6] C. Aslangul, R. Constanciel, R. Daudel, P. Kottis, Adv. Quantum Chem. 6 (1972)

93.[7] C. Aslangul, R. Constanciel, R. Daudel, L. Esnault, E.V. Ludeña, Int. J. Quantum

Chem. 8 (1974) 499.[8] R. Daudel, Quantum Theory of the Chemical Bond, Reidel, Dordrecht, 1974.[9] R.F.W. Bader, T.T. Nguyen, Y. Tal, J. Chem. Phys. 70 (1979) 4316.

[10] R.F.W. Bader, T.T. Nguyen-Dang, Adv. Quantum Chem. 14 (1981) 63.[11] R.F.W. Bader, Atoms in Molecules, Clarendon Press, Oxford, 1990.[12] A. Mazziotti, R.G. Parr, G. Simons, J. Chem. Phys. 59 (1973) 939.[13] V. Mujica, E. Squitieri, P. Nieto, J. Mol. Struct. (Theochem) 115 (2000)

501.[14] A. Martín Pendás, A. Costales, V. Luaña, Phys. Rev. B 55 (1997) 4275.[15] D.S. Kosov, P.L.A. Popelier, J. Chem. Phys. 113 (2000) 3969.[16] F.L. Hirschfeld, Theoret. Chim. Acta 44 (1977) 129.[17] R.F. Stewart, E.R. Davidson, W.J. Simpson, J. Chem. Phys. 42 (1965) 3175.[18] R.F. Stewart, Isr. J. Chem. 16 (1977) 124.[19] A.T.B. Gilbert, P.M.W. Gill, S.W. Taylor, J. Chem. Phys. 120 (2004) 7887.[20] J. Fernández Rico, R. López, G. Ramírez, J. Chem. Phys. 110 (1999) 4213.

Page 7: DAMQT: A package for the analysis of electron density in molecules

1660 R. López et al. / Computer Physics Communications 180 (2009) 1654–1660

[21] J. Fernández Rico, R. López, I. Ema, G. Ramírez, J. Chem. Phys. 117 (2002) 533.[22] J. Fernández Rico, R. López, J.M. García de la Vega, J.I. Fernández Alonso, J. Mol.

Struct. (Theochem) 120 (1985) 163.[23] J. Fernández Rico, J.R. Álvarez Collado, M. Paniagua, Mol. Phys. 56 (1985) 1145.[24] J. Fernández Rico, R. López, M. Paniagua, J.I. Fernández Alonso, Int. J. Quantum

Chem. 29 (1986) 1155.[25] J. Fernández Rico, J.R. Álvarez Collado, M. Paniagua, R. López, Int. J. Quantum

Chem. 30 (1986) 671.[26] J.M. García de la Vega, R. López, J.R. Álvarez Collado, J. Fernández Rico, J.I.

Fernández Alonso, in: J. Maruani (Ed.), Molecules in Physics, Chemistry andBiology, vol. III, Kluwer, Amsterdam, 1989, p. 31.

[27] J. Fernández Rico, R. López, I. Ema, G. Ramírez, E.V. Ludeña, J. Comput.Chem. 25 (2004) 1355.

[28] J. Fernández Rico, R. López, I. Ema, G. Ramírez, J. Mol. Struct. (Theochem) 727(2005) 115.

[29] J. Fernández Rico, R. López, I. Ema, G. Ramírez, J. Comput. Chem. 25 (2004)1347.

[30] I.S. Gradshteyn, I.M. Ryzhik, Table of Integrals, Series, and Products, AcademicPress, New York, 1994 (Eqs. 8.7 and 8.8).

[31] R.P. Feynman, Phys. Rev. 56 (1939) 340.[32] H. Hellmann, Einführung in die Quantemchemie, Deutiche, Leipzig, 1937.[33] http://trolltech.com/solutions/solutions-opensource.[34] M. Roux, S. Besnainou, R. Daudel, J. Chim. Phys. 54 (1958) 218.[35] M. Roux, S. Besnainou, R. Daudel, J. Chim. Phys. 55 (1958) 754.[36] M. Roux, M. Cornille, L. Burnelle, J. Chem. Phys. 37 (1962) 933.[37] J. Fernández Rico, R. López, I. Ema, G. Ramírez, J. Chem. Theory Comput. 106

(2006) 1986.[38] L. Laaksonen, J. Mol. Graph. 10 (1992) 33.[39] D.L. Bergman, L. Laaksonen, A. Laaksonen, J. Mol. Graph. Model. 15 (1997) 301.[40] http://www.csc.fi/gopenmol/.