In [11]:
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rc
rc('text', usetex=True)
def binomial(n, k):
uvector = np.array(range(k+1, n+1))
lvector = np.array(range(1, n-k+1))
return np.e**(np.log(uvector).sum() - np.log(lvector).sum())
In [14]:
he4 = (2, 2)
c12 = (6,6)
o16 = (8,8)
ca40 = (20,20)
nuclei = [he4, c12, o16, ca40]
labels = [r"${}^4$He", r"${}^{12}$C", r"${}^{16}$O", r"${}^{40}$Ca"]
x = range(1, 201)
In [16]:
for label, nucleus in zip(labels, nuclei):
p = np.array([binomial(n, nucleus[0]) for n in x])
n = p = np.array([binomial(n, nucleus[1]) for n in x])
y = p*n
plt.plot(x, y, linewidth=2, label=label)
plt.xlabel('Number of single particle states', fontsize=18)
plt.ylabel('Number of Slater determinants', fontsize=18)
plt.legend(loc=2)
plt.tight_layout()
plt.yscale('log')
plt.savefig("slater_determinants.pdf")
plt.show()
In [ ]: