Convention of angular part of atomic basis functions
Summary of real spherical harmonics used in different first-principles programs.
Introduction
Unlike plane-wave, atomic basis functions appear in different formats and conventions among various ab initio or first-principles codes. The most obvious difference is in the radial part, which can be Gaussian type, Slater type or strictly localized numerical orbitals. The angular part, however, is more subtle and often overlooked. Instead of the complex spherical harmonics (CSH), real spherical harmonics (RSH) are generally used as the angular part to reduce the computational cost, each of which is a linear combination of CSH. As long as the transformation is complete, RSH can take different conventions. For one thing, the sign (or phase) of each function is not fixed. For the other, each code can choose their own way to align the RSH in the same angular momentum channel.
The choice of RSH convention should not affect the final results of observables, but can result in difference in intermediate matrices expanded in the atomic orbitals, such as the Hamiltonian and overlap matrices. This sometimes makes the comparison and conversion of matrices between different codes tricky. In this post, I will try to summarize the conventions of RSH used in several programs with atomic basis functions.
Definition
Here we define the CSH with the Condon-Shortley (C-S) convention
where $P^m_l$ is the associated Legendre polynomials without the C-S phase $(-1)^m$,
polar angles $\theta\in[0, \pi]$, azimuth $\phi\in[0, 2\pi)$, and
In terms of RSH, we use $S^m_l$ for notation. RSH are obtained through a unitary transformation from CSH
where
is the transformation matrix. For positive $m$, the polar angle part has the following parity with respect to $m$
Hence
From this we can derive the real and imaginary parts
Conventions in different codes
FHI-aims
Appendix J of FHI-aims manual mentions that a partly C-S phase is adopted in the code (computed using src/basis_set/SHEval.f90
)
Its equivalent expression as mentioned in the comments of src/external/ylm_real.f90
is
Using Eqs.
Basis functions in the same shell and l channel are aligned with ascending azimuth quantum number, i. e. -l, -(l-1), …, -1, 0, 1, 2, …, l.
ABACUS
The real spherical harmonics in ABACUS are defined as (from Sec. 3.2.1 of Chen Liao's thesis)
Comparing with
OpenMX
From this thread of the OpenMX forum, it seems that OpenMX uses the RSH defined on the wikipedia page
With this convention, RSH in OpenMX differ from those in ABACUS, i.e. Eq
The order is slightly tricky. Looking into function Set_Comp2Real
in SetPara_DFT.c
, where the transformation matrix from CSH to RSH is computed,1 the order of azimuth number for $l$ from 1 to 3 can be summarized in the table below.
array index | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
---|---|---|---|---|---|---|---|
p | 1 | -1 | 0 | ||||
d | 0 | 2 | -2 | 1 | -1 | ||
f | 0 | 1 | -1 | 2 | -2 | 3 | -3 |
For higher channels, the pattern follows that of f as can be derived from the rest code in this function. Therefore, ABACUS and OpenMX have the same order of azimuth number for $l \ge 3$.
PySCF
As mentioned in the documentation, PySCF follows the same phase convention and ordering as given in the Wikipedia (thus the same phase as OpenMX, same ordering as FHI-aims), with single exception: for the p functions, $p_x(1), p_y(-1), p_z(0)$ is used (same as OpenMX) instead of $p_y(-1), p_z(0), p_x(1)$.
ORCA
The convention of the solid spherical harmonics in ORCA is documented here. It seems to share the same order as ABACUS, but the phase and transformation matrix from CSH are not clear at first glance. MOKIT provides an py2orca
API to call ORCA's utility program orca_2mkl
. To fully understand the order and phase convention, I am afraid that one has to dive into this tool.
Comments powered by Disqus.