XA Online Documentation, Inside XA "scan.c"

scan.c

Source file scan.c

This document explains the basic algorithms and functions which are used to read in data from RHF Tables atom files and to store the values in the atom data structure.

Comments

char *XAUpper(char *string)
char *XAAnalyzeError(int error_number)

The code is straight forward.

orbital_type_ptr XAInsertR(orbital_type_ptr start, int shell_value, char orbital, int r, float r_value)

inserts the R values, e.g. <R>, <1/R> etc., into the atom data structure.

The while loop, #1, looks for the orbital symbol in the atom structure. If the symbol is not found, #2, memory for a new orbital structure is allocated and the values are stored there. Otherwise, #3, the values are written into the existing orbital structure. The following while loop, #4, examines the shell pointers to look for a shell which has the same number as shell_value. If this one is not found, #5, a pointer to a new shell is created. Finally the R values can be stored.

orbital_type_ptr XAInsertData(orbital_type_ptr start, int shell_value, char orbital, int n_value, float alpha_value, float data)

stores the values of the data section of an atom data file into the atom structure.

This procedure works like XAInsertR which is mentioned above: if orbitals, shells or data blocks do not exist, new ones are created whereas existing ones are updated.

atom_ptr XAScan(char *filename)

XAScan opens the RHF Table file filenname and tries to read in the different atom data values. By extracting the values XAScan looks for certain keywords and stores the following data by calling the procedures XAInsertR and XAInsertData.


[return to home page][return to Inside XA]
Reinhard Schaffner, © 1995-05-30