next up previous
Next: 8. Conclusions Up: Localised spherical-wave basis set Previous: 6. Non-local pseudopotential

7. Computational implementation

The results in equations (19,20,22, 23) have been written in a form which shows that in general each term can be represented by a real numerical prefactor, integers which are the powers of $\{R, q_{n \ell}, q_{n' \ell'} \}$ and one further integer to signify the presence of one of the terms $\{ {\sin q_{n \ell}
R},{\sin q_{n' \ell'} R}, {\cos q_{n \ell} R}, {\cos q_{n' \ell'} R}
\}$. When these terms are combined and differentiated by the ${\hat D}_{\ell m}$, the general term also needs integers to represent powers of $\{x_{\alpha \beta}, y_{\alpha \beta}, z_{\alpha \beta}, R_{\alpha
\beta}, r_{\alpha}, r_{\beta} \}$. Therefore a general term in the expressions for $S_{\alpha \beta}$ and $T_{\alpha \beta}$ could be represented by a data structure consisting of one real variable $g$ and ten integer variables $I_{1-10}$ as follows:
\begin{displaymath}
g \frac{x_{\alpha \beta}^{I_1} y_{\alpha \beta}^{I_2} z_{\al...
...\rightarrow
\{ g,I_1,I_2,I_3,I_4,I_5,I_6,I_7,I_8,I_9,I_{10} \}
\end{displaymath} (36)

with the following correspondence between $f(R)$ and $I_{10}$:
$\displaystyle \qquad f(R)$ $\textstyle =$ $\displaystyle \left\{1 , {\sin q_{n \ell} R} , {\sin q_{n' \ell'} R}
, {\cos q_{n \ell} R} , {\cos q_{n' \ell'} R} \right\}$  
$\displaystyle \rightarrow I_{10}$ $\textstyle =$ $\displaystyle \left\{ 0 , 1 , 2 , 3 , 4 \right\} .$ (37)

A recursive function can be written to manipulate these encoded terms and perform the differentiation by the ${\hat D}_{\ell m}$, which can themselves be generated using the recursion rules for the associated Legendre polynomials. Thus it is straightforward to write a code which starts from equation (14) and generates the results up to arbitrary values of $\ell$ for $S_{\alpha \beta}$ and $T_{\alpha \beta}$ for the cases when ${\bf R}_{\alpha \beta} \not= 0$. The results for ${\bf R}_{\alpha \beta} = 0$ are simple enough to be coded within the program which uses this basis.

We have successfully implemented this basis set in a total-energy pseudopotential code and are currently performing preliminary calculations. For a given ionic configuration the matrix elements between the basis states can be calculated initially and stored on disk for use during the calculation.


next up previous
Next: 8. Conclusions Up: Localised spherical-wave basis set Previous: 6. Non-local pseudopotential
Peter Haynes