19.01.2015 Views

MOLPRO

MOLPRO

MOLPRO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

17 THE DENSITY FUNCTIONAL PROGRAM 121<br />

17.4.2 Implementing new functionals<br />

New functionals are implemented based upon the automatic code generation (ACG) program<br />

(doi:10.1016/S0010-4655(01)00148-5 ). In order to work the program requires the maple mathematics<br />

program and an XSLT parser, defined by the variable XSLT in CONFIG.<br />

The format of the input file is an XML file containing all of the information about the new<br />

functional. All density functional XML files are placed in the directory lib/df and are automatically<br />

activated on the next instance of the make command in the <strong>MOLPRO</strong> base directory.<br />

The root element of the XML document is content. At the next level the element, functional<br />

is expected, 1 per file.<br />

The functional element has an id attribute which is used as the keyword for the functional<br />

in <strong>MOLPRO</strong>, and optional doi attribute for specifying a reference. The allowed elements are<br />

defined in table 8. The final element is maple for which multiple cases are allowed. A typical<br />

title<br />

tex<br />

Text to appear as a heading for the functional documentation<br />

Text to document the functional<br />

maple expression such as<br />

A:=1.2:<br />

is written as<br />

1.2.<br />

To input a Maple procedure such as<br />

Table 8: Elements allowed for defining functionals<br />

add_together:=proc(a,b) a+b end:<br />

one should write<br />

a+b.<br />

As an example the Perdew-Wang 1991 GGA exchange functional is given below:<br />

<br />

<br />

<br />

Perdew-Wang 1991 GGA Exchange Functional<br />

1/2*E(2*rho(s))<br />

1/2*E(2*rho(s))<br />

-3/(4*Pi)*(3*Piˆ2)ˆ(1/3)*nˆ(4/3)*F(S)<br />

chi(s)/(2*(6*Piˆ2)ˆ(1/3))<br />

<br />

(1+0.19645*S*arcsinh(7.7956*S) + (0.2743-0.1508*exp(-100*Sˆ2))*Sˆ2)/<br />

(1+0.19645*S*arcsinh(7.7956*S)+0.004*Sˆ4)<br />

<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!