The file integral.c consists of various mathematical functions which are used for existing atoms. These include data checking or the functions mentioned in C. F. Bunge, J. A. Barrientos and A. V. Bunge, Atomic Data and Nuclear Data Tables, Vol. 53, No. 1, January 1993, pages 114 to 118. Mathematical operations for creating new orbitals are provided in gauss.c.
This procedure computes the factorial of parameter n.
float XANormalizationConstant(orbital_value_ptr curr_data)
The normalization constant, which is necessary to modify the Clementi type orbital data of the atom data file to Slater type, is calculated. If this is not possible the global value FLOAT_RETURN_ERROR will be returned.
n + 0.5
(2 * alpha)
Normalization = ---------------------------
0.5
(2 * n)!
float XAPrimitiveBasis(orbital_value_ptr curr_data, float r)
The primitive basis can be defined as an element of the sum in XARadialAtomicOrbital.
n - 1 -alpha * r
PrimitiveBasis = n * r * e
float XARadialAtomicOrbital(atom_ptr curr_atom, char *orbital_string, float r)
By using XANormalizationConstant and XAPrimitiveBasis the procedure XARadialAtomicOrbital calculates the sum of the data section of the orbital orbital_string for the float value r. If this is not possible the value FLOAT_RETURN_ERROR will be returned.
RadialAtomic = sum (S * c )
j jk jk
float XASum(atom_ptr curr_atom, char *orbital_string, float r)
The creation of pseudo orbitals is based on using Slater type orbitals, therefore the stored Clementi type orbitals have to be modified to Slater type by XASum.
The previous functions used the formulas given by the Atomic Data and Nuclear Data Tables, whereas XASum is based on a slightly different one. The difference is that the exponent n is not decreased by one before calculating the sum. In case of an error the value FLOAT_RETURN_ERROR is returned to the calling function.
float XAIntegralElement(int arg, orbital_value_ptr *curr_data)
The basic function to calculate the XAIntegral for given orbitals. For atomic orbitals the integral from 0 to infinity over the XASum results in the following formula:
c * n!
Integral = ------------------
n + 1
alpha
where c, alpha and n are the final values when the different orbital sums are multiplied element by element. The elements are send as an curr_data array to the XAIntegralElement procedure. arg tells XAIntegralElement of how many element the array is build up.
float XAIntegral(atom_ptr curr_atom, int arg, ...)
For a very good introduction in programming procedures with variable parameter
lists see H. M. Deitel, P. J. Deitel, C How To Program, Prentice Hall
International. This powerful C feature is used to create a function
which can be used for any number of orbitals orbital_string. arg
gives the number of orbitals and each string is fetched by the va_arg(ap,
char *) call. For an explanation of the variable j look at the
following example:
Orbital Sum elements 1S 1S1 1S2 1S3 2S 2S1 2S2 3S 3S1 3S2 3S3
The procedure XAIntegral(atom, 3, "1S", "2S", "3S") is called. This results in the following steps.
Parameters j values 1S1 2S1 3S1 2 -> 1 : : 3S2 : : 3S3 1S1 2S2 3S1..3S3 2 -> 1 -> 0 1S2 2S1 3S1..3S3 2 -> 1 1S2 2S2 3S1..3S3 2 -> 1 -> 0 1S3 2S1 3S1..3S3 2 -> 1 : : :
The procedure XAIntegralElement is called with "Parameters" at each line, and in XAIntegralElement the different sum elements are multiplied and the integral from 0 to infinity is calculated.