Post

Convention of angular part of atomic basis functions

Summary of real spherical harmonics used in different first-principles programs.

Convention of angular part of atomic basis functions

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

Ylm(θ,ϕ)=(1)m2l+14π(lm)!(l+m)!Plm(cosθ)\ee\iimϕ(1)mKlmPlm(cosθ)\ee\iimϕ

where $P^m_l$ is the associated Legendre polynomials without the C-S phase $(-1)^m$,

Plm(cosθ)=(sinθ)mdmd(cosθ)m(Pl(cosθ)),

polar angles $\theta\in[0, \pi]$, azimuth $\phi\in[0, 2\pi)$, and

Klm2l+14π(lm)!(l+m)!

In terms of RSH, we use $S^m_l$ for notation. RSH are obtained through a unitary transformation from CSH

Slm=mmYlmΔmml,

where

Δmml=\braketYlmSlm

is the transformation matrix. For positive $m$, the polar angle part has the following parity with respect to $m$

KlmPlm=2l+14π(l+m)!(lm)!Plm=2l+14π(l+m)!(lm)!(1)m(lm)!(l+m)!Plm=(1)mKlmPlm

Hence

Ylm(θ,ϕ)=(1)mKlmPlm(cosθ)\ee\iimϕ=(1)m[(1)mKlmPlm(cosθ)\ee\iimϕ]=(1)mYlm(θ,ϕ)

From this we can derive the real and imaginary parts

ReYlm=12[Ylm+Ylm]=12[Ylm+(1)mYlm] ImYlm=12\ii[YlmYlm]=12\ii[Ylm(1)mYlm]

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)

Slm={2Kl\absmsin(\absmϕ)Pl\absm(cosθ)m<0KlmPlm(cosθ)m=0(1)m2Klmcos(mϕ)Plm(cosθ)m>0

Its equivalent expression as mentioned in the comments of src/external/ylm_real.f90 is

Slm={2ImYlmm<0Yl0m=02ReYlmm>0.

Using Eqs. (???) and (???), we can obtain the transformation from CSH

Slm={\ii2[Ylm(1)mYlm]m<0Yl0m=012[Ylm+(1)mYlm]m>0,

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)

Slm={\ii2[(1)mYlmYlm]m<0Yl0m=012[Ylm+(1)mYlm]m>0

Comparing with (???), we can see that RSH with $m\ge0$ are the same in ABACUS and FHI-aims, but those with $m<0$ differ by $(-1)^m$. Furthermore, RSH in ABACUS are stored in the order of 0, 1, -1, 2, -2, …, which is different from FHI-aims.

OpenMX

From this thread of the OpenMX forum, it seems that OpenMX uses the RSH defined on the wikipedia page

Slm={\ii2[Ylm(1)mYlm]m<0Yl0m=012[(1)mYlm+Ylm]m>0

With this convention, RSH in OpenMX differ from those in ABACUS, i.e. Eq (???), by the Condon-Shortley phase $(-1)^m$. RSH in OpenMX are same as those in FHI-aims for $m<0$, but differ by the C-S phase for $m>0$.

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 index0123456
p1-10    
d02-21-1  
f01-12-23-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.


This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.