球谐函数作图

现代电子结构理论作业

  • 作业:球谐函数作图
  • 日期:2021年4月25日
1
2
3
4
5
6
7
8
import numpy as np
import matplotlib as mpl
from matplotlib import cm
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

mpl.rcParams['font.size'] = 24
mpl.rcParams['figure.figsize'] = (16, 10)

$l = 0$ 时

$m_l = 0$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = 1 / 2\pi^{1/2}$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_0 = 1 / (2 * np.pi) ** 0.5

s 轨道:

$$s = s_0$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = R_0
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, color="yellow", linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()

s 轨道

$l = 1$ 时

$m_l = 0$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = \frac{1}{2} (3/\pi)^{1/2}{\rm cos}\theta$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_0 = 0.5 * (3 / np.pi) ** 0.5 * np.cos(THETA)

$m_l = 1$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = -\frac{1}{2} (3/2\pi)^{1/2}{\rm sin}\theta e^{i\varphi}$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_p1 = -0.5 * (3 / (2 * np.pi)) ** 0.5 * np.sin(THETA) * np.exp(1j * PHI)

$m_l = -1$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = \frac{1}{2} (3/2\pi)^{1/2}{\rm sin}\theta e^{-i\varphi}$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_n1 = 0.5 * (3 / (2 * np.pi)) ** 0.5 * np.sin(THETA) * np.exp(-1j * PHI)

$p_z$ 轨道:

$$p_z = p_0$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fig = plt.figure(figsize=plt.figaspect(0.5)*1.5)
ax = fig.add_subplot(111, projection='3d')

R = R_0
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()

p 轨道

$p_x$ 轨道:

$$p_x = \frac{1}{\sqrt{2}}(p_{-1} - p_{+1})$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = 1 / np.sqrt(2) * (R_n1 - R_p1)
R = R.real
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()
/home/storage/.local/miniconda3/envs/vasp/lib/python3.6/site-packages/ipykernel_launcher.py:11: RuntimeWarning: invalid value encountered in true_divide
  # This is added back by InteractiveShellApp.init_path()

p 轨道

$p_y$ 轨道:

$$p_x = \frac{i}{\sqrt{2}}(p_{-1} + p_{+1})$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = 1j / np.sqrt(2) * (R_n1 + R_p1)
R = R.real
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()
/home/storage/.local/miniconda3/envs/vasp/lib/python3.6/site-packages/ipykernel_launcher.py:11: RuntimeWarning: invalid value encountered in true_divide
  # This is added back by InteractiveShellApp.init_path()

p 轨道

$l = 2$ 时

$m_l = 0$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = \frac{1}{4} (5/\pi)^{1/2}(3{\rm cos}^2\theta - 1)$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_0 = 0.25 * (5 / np.pi) ** 0.5 * (3 * np.cos(THETA) ** 2 - 1)

$m_l = 1$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = -\frac{1}{2} (15/2 \pi)^{1/2}{\rm cos}\theta {\rm sin}\theta e^{i\varphi}$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_p1 = -0.5 * (15 / (2 * np.pi)) ** 0.5 * np.cos(THETA) * np.sin(THETA) * np.exp(1j * PHI)

$m_l = -1$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = \frac{1}{2} (15/2 \pi)^{1/2}{\rm cos}\theta {\rm sin}\theta e^{-i\varphi}$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_n1 = 0.5 * (15 / (2 * np.pi)) ** 0.5 * np.cos(THETA) * np.sin(THETA) * np.exp(-1j * PHI)

$m_l = 2$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = \frac{1}{4} (15/2 \pi)^{1/2} {\rm sin}^2\theta e^{2i\varphi}$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_p2 = 0.25 * (15 / (2 * np.pi)) ** 0.5 * np.sin(THETA) ** 2 * np.exp(2j * PHI)

$m_l = -2$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = \frac{1}{4} (15/2 \pi)^{1/2} {\rm sin}^2\theta e^{-2i\varphi}$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_n2 = 0.25 * (15 / (2 * np.pi)) ** 0.5 * np.sin(THETA) ** 2 * np.exp(-2j * PHI)

$d_{z^2}$ 轨道:

$$d_{z^2} = d_0$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = R_0
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()

d 轨道

$d_{x^2-y^2}$ 轨道:

$$d_{x^2-y^2} = \frac{1}{\sqrt2}(d_{+2} + d_{-2})$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = 1 / np.sqrt(2) * (R_p2 + R_n2)
R = R.real
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()
/home/storage/.local/miniconda3/envs/vasp/lib/python3.6/site-packages/ipykernel_launcher.py:11: RuntimeWarning: invalid value encountered in true_divide
  # This is added back by InteractiveShellApp.init_path()

d 轨道

$d_{xy}$ 轨道:

$$d_{xy} = \frac{1}{i\sqrt2}(d_{+2} - d_{-2})$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = 1 / (1j * np.sqrt(2)) * (R_p2 - R_n2)
R = R.real
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()
/home/storage/.local/miniconda3/envs/vasp/lib/python3.6/site-packages/ipykernel_launcher.py:11: RuntimeWarning: invalid value encountered in true_divide
  # This is added back by InteractiveShellApp.init_path()

d 轨道

$d_{yz}$ 轨道:

$$d_{yz} = \frac{1}{i\sqrt2}(d_{+1} + d_{-1})$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = 1 / (1j * np.sqrt(2)) * (R_p1 + R_n1)
R = R.real
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()
/home/storage/.local/miniconda3/envs/vasp/lib/python3.6/site-packages/ipykernel_launcher.py:11: RuntimeWarning: invalid value encountered in true_divide
  # This is added back by InteractiveShellApp.init_path()

d 轨道

$d_{zx}$ 轨道:

$$d_{zx} = \frac{1}{\sqrt2}(d_{+1} - d_{-1})$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = 1 / (np.sqrt(2)) * (R_p1 - R_n1)
R = R.real
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()
/home/storage/.local/miniconda3/envs/vasp/lib/python3.6/site-packages/ipykernel_launcher.py:11: RuntimeWarning: invalid value encountered in true_divide
  # This is added back by InteractiveShellApp.init_path()

d 轨道

$l = 3$ 时

$m_l = 0$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = \frac{1}{4} (7/\pi)^{1/2}(2 - 5{\rm sin}^2\theta) {\rm cos}\theta$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_0 = 0.25 * (7 / np.pi) ** 0.5 * (2 - 5 * np.sin(THETA) ** 2) * np.cos(THETA)

$m_l = 1$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = -\frac{1}{8} (21/ \pi)^{1/2} (5{\rm cos}^2 \theta - 1){\rm sin}\theta e^{i\varphi}$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_p1 = -0.125 * (21 / np.pi) ** 0.5 * (5 * np.cos(THETA) ** 2 - 1) * np.sin(THETA) * np.exp(1j * PHI)

$m_l = -1$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = \frac{1}{8} (21/ \pi)^{1/2} (5{\rm cos}^2 \theta - 1){\rm sin}\theta e^{-i\varphi}$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_n1 = 0.125 * (21 / np.pi) ** 0.5 * (5 * np.cos(THETA) ** 2 - 1) * np.sin(THETA) * np.exp(-1j * PHI)

$m_l = 2$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = \frac{1}{4} (105/ 2\pi)^{1/2} {\rm cos}\theta {\rm sin}^2\theta e^{2i\varphi}$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_p2 = 0.25 * (105 / (2 * np.pi)) ** 0.5 * np.cos(THETA) * np.sin(THETA) ** 2 * np.exp(2j * PHI)

$m_l = -2$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = \frac{1}{4} (105/ 2\pi)^{1/2} {\rm cos}\theta {\rm sin}^2\theta e^{-2i\varphi}$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_n2 = 0.25 * (105 / (2 * np.pi)) ** 0.5 * np.cos(THETA) * np.sin(THETA) ** 2 * np.exp(-2j * PHI)

$m_l = 3$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = -\frac{1}{8} (35/ \pi)^{1/2} {\rm sin}^3\theta e^{3i\varphi}$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_p3 = -0.125 * (35 / np.pi) ** 0.5 * np.sin(THETA) ** 3 * np.exp(3j * PHI)

$m_l = -3$

球谐函数:
$$Y_{lm_l}(\theta, \varphi) = \frac{1}{8} (35/ \pi)^{1/2} {\rm sin}^3\theta e^{-3i\varphi}$$

1
2
3
4
5
6
phi = np.linspace(0, np.pi * 2, 50)
theta = np.linspace(0, np.pi, 50)

THETA, PHI = np.meshgrid(theta, phi)

R_n3 = 0.125 * (35 / np.pi) ** 0.5 * np.sin(THETA) ** 3 * np.exp(-3j * PHI)

$f_{z^3}$ 轨道:

$$f_{z^3} = f_0$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = R_0
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()

f 轨道

$f_{xz^2}$ 轨道:

$$f_{xz^2} = \frac{1}{\sqrt{2}}(d_{-1} - d_{+1})$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = 1 / np.sqrt(2) * (R_n1 - R_p1)
R = R.real
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()
/home/storage/.local/miniconda3/envs/vasp/lib/python3.6/site-packages/ipykernel_launcher.py:11: RuntimeWarning: invalid value encountered in true_divide
  # This is added back by InteractiveShellApp.init_path()

f 轨道

$f_{yz^2}$ 轨道:

$$f_{xz^2} = \frac{i}{\sqrt{2}}(d_{-1} + d_{+1})$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = 1j / np.sqrt(2) * (R_n1 + R_p1)
R = R.real
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()
/home/storage/.local/miniconda3/envs/vasp/lib/python3.6/site-packages/ipykernel_launcher.py:11: RuntimeWarning: invalid value encountered in true_divide
  # This is added back by InteractiveShellApp.init_path()

f 轨道

$f_{z(x^2-y^2)}$ 轨道:

$$f_{z(x^2-y^2)} = \frac{1}{\sqrt{2}}(d_{-2} + d_{+2})$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = 1 / np.sqrt(2) * (R_n2 + R_p2)
R = R.real
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()
/home/storage/.local/miniconda3/envs/vasp/lib/python3.6/site-packages/ipykernel_launcher.py:11: RuntimeWarning: invalid value encountered in true_divide
  # This is added back by InteractiveShellApp.init_path()

f 轨道

$f_{xyz}$ 轨道:

$$f_{xyz} = \frac{i}{\sqrt{2}}(d_{-2} - d_{+2})$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = 1j / np.sqrt(2) * (R_n2 - R_p2)
R = R.real
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()
/home/storage/.local/miniconda3/envs/vasp/lib/python3.6/site-packages/ipykernel_launcher.py:11: RuntimeWarning: invalid value encountered in true_divide
  # This is added back by InteractiveShellApp.init_path()

f 轨道

$f_{x(x^2-3y^2)}$ 轨道:

$$f_{x(x^2-3y^2)} = \frac{1}{\sqrt{2}}(d_{-3} - d_{+3})$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = 1 / np.sqrt(2) * (R_n3 - R_p3)
R = R.real
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()
/home/storage/.local/miniconda3/envs/vasp/lib/python3.6/site-packages/ipykernel_launcher.py:11: RuntimeWarning: invalid value encountered in true_divide
  # This is added back by InteractiveShellApp.init_path()

f 轨道

$f_{y(3x^2-y^2)}$ 轨道:

$$f_{y(3x^2-y^2)} = \frac{i}{\sqrt{2}}(d_{-3} + d_{+3})$$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

R = 1j / np.sqrt(2) * (R_n3 + R_p3)
R = R.real
R_abs = np.abs(R)
X = R_abs * np.sin(THETA) * np.cos(PHI)
Y = R_abs * np.sin(THETA) * np.sin(PHI)
Z = R_abs * np.cos(THETA)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=cm.autumn(R / R_abs), linewidth=0, antialiased=False, alpha=0.5)

ax.set_xlim(-0.4, 0.4)
ax.set_ylim(-0.4, 0.4)
ax.set_zlim(-0.4, 0.4)

plt.show()
/home/storage/.local/miniconda3/envs/vasp/lib/python3.6/site-packages/ipykernel_launcher.py:11: RuntimeWarning: invalid value encountered in true_divide
  # This is added back by InteractiveShellApp.init_path()

f 轨道

1
2


文章作者: 喵函数
文章链接: https://eigenmiao.site/2021/04/25/homework-02/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 本征喵的小站