next up previous contents
Next: SCF procedure Up: Program Structure Previous: Program Structure   Contents

Data initialization

mchf requires a number of input items for proper calculations, The first part of the program data() shown on Figure  6.11, is designed to handle both, input processing and memory management.

Estimates of the radial wave functions are taken from the file wfn.inp, if provided. Otherwise, hydrogenic estimates are used. Upon completion (either a maximum of 200 iterations or a change in the weighted average energy of less that $10^{-8}$ a.u., in default mode) an updated wfn.out file is produced. During the course of the calculation an intermediate orbital results are written to the wfn.out file, for restart purposes in case of process termination for some reason.

Figure 6.11: Subroutine data(). After reading parameters from cfg.h, memory for cfgs and coefficients is allocated in alloc_mem. wavefn() reads the input wave function form wfn.inp. spintgrl() reads input files with the integral data and calls alcsts() for pointer initialization and memory management.
\begin{figure}\begin{center}
\centerline{\epsfig{figure=tex/fig/mchf_data.epsi,height=8cm}}\end{center}\end{figure}

Figure 6.12 shows the data structure of the interaction matrix (hmx) and the associated pointers (ico and ih). For each nonzero matrix element ico accounts for the number of total angular coefficients as the matrix is traversed in the direction of the arrows. The row index of each non-zero element is stored in ih.

Figure 6.12: Data Structure of the interaction matrix.
\begin{figure}\begin{center}
\centerline{\psfig{figure=tex/fig/mchf_data_mat.epsi}}\end{center}\end{figure}

Each coefficient data structure consists of two quantities:
coeff numerical coefficient (double precision)
inptr index pointer to an integral (integer)

Thus the position of each integral needs to be known in advance and this is achieved by generating all possible integrals from the orbital set once initially, before the start of the SCF iterations.

During the initial phase of data initialization, data() allocates memory for the problem, the details are covered in section  6.3.


next up previous contents
Next: SCF procedure Up: Program Structure Previous: Program Structure   Contents
2001-10-11