Example 5: real \(p_x\) and \(d_{x^2-y^2}\) orbitals#
Real orbitals illustrate why PETAL2D treats real and complex fields differently. A real field obeys
\[
\rho_{-m}(r)=\rho_m(r)^*,
\]
so nonzero harmonics occur in conjugate pairs.
\(p_x\): an \(m=\pm1\) pair#
Using
\[
x=r\cos\theta
=\frac{r}{2}\left(e^{i\theta}+e^{-i\theta}\right),
\]
a localized \(p_x\)-like orbital contains equal \(m=+1\) and \(m=-1\) power. PETAL2D therefore treats \((1,-1)\) as one adaptive selection unit rather than keeping either member alone and creating an artificial complex reconstruction.
Run:
python examples/px_orbital.py
=== p_x-like orbital ===
domain_consistency: 1.00000003
selected_pairs: [(1, -1)]
retained_modes: [1, -1]
reconstruction_error_percent: 2.70394e-14
target_reached: True
m power fraction r_power_support r_amplitude_support r_cutoff retained
----------------------------------------------------------------------------------------------------
-1 1.250000e-01 5.000000e-01 4.08711 4.2065 4.2065 True
1 1.250000e-01 5.000000e-01 4.08711 4.2065 4.2065 True
The real \(p_x\) orbital has equal \(m=\pm1\) power.#
Conjugate-pair selection preserves the signed real orbital.#
\(d_{x^2-y^2}\): an \(m=\pm2\) pair#
Similarly,
\[
x^2-y^2=r^2\cos2\theta
=\frac{r^2}{2}\left(e^{i2\theta}+e^{-i2\theta}\right),
\]
so a real \(d_{x^2-y^2}\)-like orbital contains equal \(m=\pm2\) power.
python examples/dx2_y2_orbital.py
=== d_(x^2-y^2)-like orbital ===
domain_consistency: 1.00000000
selected_pairs: [(2, -2)]
retained_modes: [2, -2]
reconstruction_error_percent: 4.43516e-14
target_reached: True
m power fraction r_power_support r_amplitude_support r_cutoff retained
----------------------------------------------------------------------------------------------------
-2 2.500000e-01 5.000000e-01 4.37494 4.52437 4.52437 True
2 2.500000e-01 5.000000e-01 4.37494 4.52437 4.52437 True
The \(d_{x^2-y^2}\) orbital has equal \(m=\pm2\) power.#
Signed original field and retained-mode reconstruction.#