TAPE21 contains all the information you need to evaluate the charge density or a Molecular Orbital (MO) in any point in space. Most of the information is located in section Basis:
A list of function characteristics (kx,ky,kz,kr,alf), including the core orthogonalization functions. This list does not run over all bas functions used in the molecule: if a particular function is used on the atoms of a given atomtype, the function occurs only once in the list, but in the molecule it occurs as many times as there are atoms of that type.
With array nbptr you locate the subsections in the
function list that correspond to the different types of atoms: for atom
type i the functions nbptr(i)...nbptr(i+1)-1.
The distinct atom types are listed in an early section of the standard output file.
Array nqptr gives the number of atoms for type i: nqptr(i+1)-nqptr(i). With this information
you construct the complete list of all functions. Repeat the subsection of
type i as many times as there are atoms of that type: the complete list can be
considered to be constructed as a double loop, the outer being over the atom
types, the inner over the atoms that belong to that type.
The total 'overall' list of functions you obtain in this way contains naos functions.
Note that in this way we have implicitly also defined a list of all atoms, where all atoms that belong to a particular atom type are contiguous. This list is the so-called 'internal' atom ordering, which may not be identical to the order in which atoms were specified in input, under atoms.
For a given symmetry representation
(Sections S) the array npart gives the indices of the basis
functions in the overall list that are used to describe orbitals in this
In case of an unrestricted run the array npart applies for either spin: the same basis functions are used; the expansion coefficients for the molecular orbitals are different of course.
In the symmetry-representation sections Eigen_bas gives the expansion coefficients that describe the MOs. The expansion refer to the functions indicated by npart, and the function characteristics are given by the arrays kx,ky,kz,kr,alf, and bnorm, i.e. the expansion is in normalized functions.
The value of an MO is now obtained as a summation of values of primitive basis functions. For the evaluation of any such basis function you have to take into account that its characteristics are defined in the local coordinate system of its atom.
To obtain the charge density you sum all MOs, squared and multiplied by the respective occupation numbers (array froc in the appropriate irrep section).
Note that the auxiliary program densf, which is provided with the ADF package, generates orbital and density values on a user-specified grid. See the utilities document.