[gpaw-users] Au band struture
Chengjun Jin
chej at fysik.dtu.dk
Mon Nov 12 16:15:48 CET 2012
Dear All,
I am trying to calculate the band structure of bulk Au with PBE.
I did a band calculation along the Gamma--->X. However I got the band structure along the Gamma-->L.
This confused me. Could anyone take a look at my scripts?
Regards,
Chengjun
from ase.structure import bulk,molecule
from ase.io import read, write
from ase.visualize import view
from gpaw import GPAW
atom=bulk('Au', 'fcc', a=4.08)
#view(atom)
################
#scf
################
calc=GPAW(h=0.2,
kpts=(8,8,8),
txt='Au_sc.txt',
xc='PBE'
)
atom.set_calculator(calc)
atom.get_potential_energy()
calc.write('Au_sc.gpw')
################
#band structure
################
nkpt = 20
kpts = [(0,0.5 * k / (nkpt - 1), 0) for k in range(nkpt)]
calc=GPAW('Au_sc.gpw',
#mode='lcao',
txt='Au_harris.txt',
kpts=kpts,
fixdensity=True,
usesymm=None
)
#if calc.input_parameters['mode']=='lcao':
# calc.scf.reset()
calc.get_potential_energy()
calc.write('Au_harris.gpw')
################
#plot band
################
import matplotlib.pyplot as plt
from gpaw import GPAW
import numpy as np
calc = GPAW('Au_harris.gpw', txt=None)
nbands = calc.get_number_of_bands()
kpts = calc.get_ibz_k_points()
nkpts = len(kpts)
eigs = np.empty((nbands, nkpts), float)
print kpts
for k in range(nkpts):
eigs[:, k] = calc.get_eigenvalues(kpt=k)
# Subtract Fermi level from the self-consistent calculation
eigs -= GPAW('Au_sc.gpw', txt=None).get_fermi_level()
for n in range(nbands):
plt.plot(kpts[:, 1], eigs[n], '-xb')
plt.xlim(0,0.5)
plt.ylim(-10,6)
plt.show()
More information about the gpaw-users
mailing list