STFC
MPI für Kohlenforschung

University College London

Basis Set Library Functions

Introduction

These basis manipulation functions are designed to allow a basis set and ECP library to be interrogated by a range of QM code interfaces, thus allowing the same results to be obtained from different QM packages. The specification provided is a nested Tcl list structure, as described in the next section. It can be presented using the basisspec= argument to (some of) the QM interfaces, or the get_basis command can be used to extract a basis set from the library independently.

Structure of a Basis Set Specification String

The specification takes the form of a list of sublists, each containing a basis set name and a list of symbols. Here the newlines have been added for clarity, and ... denotes a variable length list.

{
  { basis1 { symbol1 symbol2 ... } }
  { basis2 { symbol3 ... } } 
  ... 
}

Each target element symbol is checked against each sublist in turn. If a match is found with any of the symbols, and if the basis set is available for the element in question, the named basis set is assigned. If more than one assignment is possible, the last one is retained.

Tcl "glob-style" pattern matching (see documentation for the string command) is used for the string comparisons, allowing use of * to match any set of characters. Also, if a symbol is specified as "all" it will match anything.

Case is ignored in the matching of atom symbols, and in the presentation of basis set names.

A basis specification of "null" can be used to denote that no basis set is required (this is needed since it is otherwise a fatal error to assign an incomplete basis set).

Examples

Consider the simplest specification, where the wild card "all" is used
 
{ { sto-3g all } }
All atoms are assigned as STO-3G. Because pattern matching is used, the following is equivalent:
 
{ { sto-3g *} }

To assign all atoms with a name beginning with c or h as 3-21G, and STO-3G for the remainder, use:

 
{ { sto-3g all } {3-21g {c* h*} } }

The list_basis_sets command - List information from the basis library

The command list_basis_sets can be used to establish which basis sets are available in the ChemShell basis set library.

Command Line Arguments

Argument Argument type Mandatory Default To specify
elements= Tcl list no all elements Elements for which data is required
format= keyword no by_basis Use by_basis to get a list of elements available for each basis set. Use by_element to list all basis sets available for a given element
list_option= keyword no minimal How much output, can be "full" or "minimal", in the "full" case with format=by_element the basis set is actually listed

The get_basis command - request basis set entries

The command get_basis will generally be invoked indirectly from within a QM interface using the basis_spec= argument, but it can be invoked directly to examine the basis sets.

Command Line Arguments

Argument Argument type Mandatory Default To specify
specification= Tcl list yes none details of the basis set required
coords= Fragment tag no all elements. system for which basis sets are needed. The default is to provide a basis for all supported elements

Structure of the list returned from get_basis

The list returned from get_basis has the following structure. [....] denotes that the previous element may be repeated one or more times.

   {
      { atomic-symbol 
               { angmom  { exp coef [....] } [ ... ] }
               [....] }
      [....]
   }
Where:
atomic symbol An alphabetic element symbol (e.g. H)
angmom S, P, L, D, F, G etc
exp Orbital exponent
coef expansion coefficient In the case of angmom=L there are two such coefficients

As an illustration of the structure, the following described the 3-21G basis assigned to C and H. Note that new-lines have been added for clarity, they are not part of the return value from get_basis.

   {C 
      {S {172.2560   0.0617669  } 
         {25.91090   0.358794  } 
         {5.533350   0.700713}} 
      {l {3.664980  -0.395897   0.236460} 
         {0.770545   1.215840   0.860619}} 
      {l {0.195857   1.000000   1.000000}}} 
   {H 
      {S {5.447178   0.156285  } 
         {0.824547   0.904691}} 
      {S {0.183192   1.000000}}
   }

Examples

The 3-21G C,H sample above was generated using the Tcl command

   set bas [ get_basis elements= "c h" specification= {{3-21g all}} ]

To allow for automatic substitution of basis sets that are not present, the following form could be used. Here (rather improbably) STO-3G is used for all elements, except for Z=1,6, where cc-pvdz is selected if available.

    set basisspec { {sto-3g all} { cc-pvdz {h he li be b c} } }
    set bas [ get_basis coords=c specification= $basisspec ]

Extending the Basis Set Library.

The basis set library is stored in the ChemShell source tree, in the file chemsh/src/basis/load.tcl. It is a collection of Tcl procedures, one per basis set, with the name load_bas_basname, where basname is replaced by the required basis name. When executed, the procedure should set the array variable bas in the calling procedure so that bas(1) contains the basis set for z=1, etc..

As an example, consider the following routine that would set up the first three entries in the 3-21G basis.

proc load_bas_3-21g {} {
upvar bas bas
array set bas { 
   1 {{S {5.447178 0.156285} {0.824547 0.904691}} {S {0.183192 1.000000}}} 
   2 {{S {13.62670 0.175230} {1.999350 0.893483}} {S {0.382993 1.000000}}} 
   3 {{S {36.83820 0.0696686} {5.481720 0.381346} {1.113270 0.681702}}
      {L {0.540205 -0.263127 0.161546} {0.102255 1.14339 0.915663}}
      {L {0.028565 1.000000 1.000000}}}
  }
}

It is important to ensure that the procedure is defined before it is to be used (rather than relying on Tcl autoloading procedures) since the scripts rely on the a set of procedure definitions of the form load_bas_basname to provide a complete list of available basis sets. For basis sets stored in the load.tcl file mentioned above this is achieved by forcing a load via a dummy procedure. For user-added basis sets, the files can be sourced.

The ECP Library.

ECPs are handled in a corresponding way. The quantum interfaces should load ECPs as a required for the selected basis sets so no specific ECP selection string should be needed. It is actually generated by prepending the entry { null * } to the basis specification, which means that if there are no ECPs stored for a given basis set choice, a null ECP will be assigned. The command to access the library directly is get_ecp.

The ECPs are output in a form analogous to that basis sets, an example is given below (again new lines are added for clarity). An initial 2-element list (indicating lmax and ncore) precedes the basis set expansion. As an example, consider the return value from the following command: get_ecp elements=pt specification= {{ stuttgart_rsc * }}

{78 
  { 5  60} 
  {5 {H POTENTIAL} {2 1.000000000 .000000000}} 
  {0 {S-H POTENTIAL} {2 13.428651000 579.223861000} {2 6.714326000 29.669491000}}
  {1 {P-H POTENTIAL} {2 10.365944000 280.860774000} {2 5.182972000 26.745382000}}
  {2 {D-H POTENTIAL} {2 7.600479000 120.396444000} {2 3.800240000 15.810921000}}
  {3 {F-H POTENTIAL} {2 3.309569000 24.314376000}}
  {4 {G-H POTENTIAL} {2 5.277289000 -24.218675000}}
}

The structure of the ECP procedures is similar to that of the basis sets, as indicated in the following example:

proc load_ecp_stuttgart_rlc {} {
upvar bas bas
array set bas { 
  35 { 
       { 4  28} 
       {4 {G POTENTIAL} {2 1.000000000 .000000000}}
       {0 {S-G POTENTIAL} {2 5.021800000 61.513721000} {2 2.510900000 9.021493000}} 
       {1 {P-G POTENTIAL} {2 4.281400000 53.875864000} {2 2.140700000 4.629402000}}
       {2 {D-G POTENTIAL} {2 2.880000000 20.849677000} {2 1.440000000 2.965444000}}
       {3 {F-G POTENTIAL} {2 2.720700000 -8.161493000}}
   } 
   36 {
       { 5  28}
       {5 {H POTENTIAL} {2 1.000000000 .000000000}}
       {0 {S-H POTENTIAL} {2 5.877718000 73.915693900} {2 3.084622000 16.168250800}}
       {1 {P-H POTENTIAL} {2 5.164110000 58.517691010} {2 2.358302000 8.259100730}}
       ...
   }
...
}

Bugs and Limitations

  • It may be possible to generate a basis set specification that contains a mix of ECP and non-ecp basis sets such that when get_basis is called a non-ecp basis is assigned, and when get_ecp is called, the ECP is also chosen. This can be avoided by always placing ECP basis sets after non-ecp ones in the basis set specification listing.




This manual was generated using htp, an HTML pre-processor Powered by htp