ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki
ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki
ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>ASE</strong> <strong>Manual</strong>, <strong>Release</strong> 3.6.1.2828<br />
# Phonon calculator<br />
N = 7<br />
ph = Phonons(atoms, calc, supercell=(N, N, N), delta=0.05)<br />
ph.run()<br />
# Read forces and assemble the dynamical matrix<br />
ph.read(acoustic=True)<br />
# High-symmetry points in the Brillouin zone<br />
points = ibz_points[’fcc’]<br />
G = points[’Gamma’]<br />
X = points[’X’]<br />
W = points[’W’]<br />
K = points[’K’]<br />
L = points[’L’]<br />
U = points[’U’]<br />
point_names = [’$\Gamma$’, ’X’, ’U’, ’L’, ’$\Gamma$’, ’K’]<br />
path = [G, X, U, L, G, K]<br />
# Band structure in meV<br />
path_kc, q, Q = get_bandpath(path, atoms.cell, 100)<br />
omega_kn = 1000 * ph.band_structure(path_kc)<br />
# Calculate phonon DOS<br />
omega_e, dos_e = ph.dos(kpts=(50, 50, 50), npts=5000, delta=5e-4)<br />
omega_e *= 1000<br />
# Plot the band structure and DOS<br />
import pylab as plt<br />
plt.figure(1, (8, 6))<br />
plt.axes([.1, .07, .67, .85])<br />
for n in range(len(omega_kn[0])):<br />
omega_n = omega_kn[:, n]<br />
plt.plot(q, omega_n, ’k-’, lw=2)<br />
plt.xticks(Q, point_names, fontsize=18)<br />
plt.yticks(fontsize=18)<br />
plt.xlim(q[0], q[-1])<br />
plt.ylabel("Frequency ($\mathrm{meV}$)", fontsize=22)<br />
plt.grid(’on’)<br />
plt.axes([.8, .07, .17, .85])<br />
plt.fill_between(dos_e, omega_e, y2=0, color=’lightgrey’, edgecolor=’k’, lw=1)<br />
plt.ylim(0, 35)<br />
plt.xticks([], [])<br />
plt.yticks([], [])<br />
plt.xlabel("DOS", fontsize=18)<br />
plt.show()<br />
148 Chapter 7. Documentation for modules in <strong>ASE</strong>