manual   quickstart   instguide   update   basis

Next: 17.4.3 Implementing new hybrid-functionals Up: 17.4 Density Functionals Previous: 17.4.1 Alias density functionals   Contents   Index   PDF

17.4.2 Implementing new functionals

New functionals are implemented based upon the automatic code generation (ACG) program (doi:10.1016/S0010-4655(01)00148-5 ). In order to work the program requires the maple mathematics program and an XSLT parser, defined by the variable XSLT in CONFIG.

The format of the input file is an XML file containing all of the information about the new functional. All density functional XML files are placed in the directory lib/df and are automatically activated on the next instance of the make command in the MOLPRO base directory.

The root element of the XML document is content. At the next level the element, functional is expected, 1 per file.

The functional element has an id attribute which is used as the keyword for the functional in MOLPRO, and optional doi attribute for specifying a reference. The allowed elements are defined in table 8.

Table 8: Elements allowed for defining functionals
title Text to appear as a heading for the functional documentation
tex Text to document the functional


The final element is maple for which multiple cases are allowed. A typical maple expression such as
A:=1.2:
is written as
<maple lhs="A">1.2</maple>.
To input a Maple procedure such as
add_together:=proc(a,b) a+b end:
one should write
<maple lhs="add_together" proc="a,b">a+b</maple>.
As an example the Perdew-Wang 1991 GGA exchange functional is given below:
<?xml version="1.0" encoding="ISO-8859-1"?>
<content>
 <functional id="PW91X">
  <title>Perdew-Wang 1991 GGA Exchange Functional</title>
  <maple lhs="g">1/2*E(2*rho(s))</maple>
  <maple lhs="G">1/2*E(2*rho(s))</maple>
  <maple lhs="E" proc="n"> -3/(4*Pi)*(3*Pi^2)^(1/3)*n^(4/3)*F(S)</maple>
  <maple lhs="S">chi(s)/(2*(6*Pi^2)^(1/3))</maple>
  <maple lhs="F" proc="S">
   (1+0.19645*S*arcsinh(7.7956*S) + (0.2743-0.1508*exp(-100*S^2))*S^2)/
   (1+0.19645*S*arcsinh(7.7956*S)+0.004*S^4)
  </maple>
 </functional>
</content>



Next: 17.4.3 Implementing new hybrid-functionals Up: 17.4 Density Functionals Previous: 17.4.1 Alias density functionals   Contents   Index   PDF

manual   quickstart   instguide   update   basis

molpro@molpro.net 2012-02-09