Band structure of bulk graphene: Difference between revisions
From phys824
Jump to navigationJump to search
No edit summary |
|||
Line 12: | Line 12: | ||
<pre> | <pre> | ||
from gpaw import GPAW, FermiDirac | |||
from ase import Atoms | |||
from ase.io import read, write | |||
from gpaw import GPAW, PoissonSolver, Mixer | |||
from ase.structure import bulk | |||
# ------------------------------------------------------------- | |||
# Bulk configuration | |||
# ------------------------------------------------------------- | |||
gnr = bulk('C', 'hcp', a=2.4612, c=6.709) | |||
gnr.positions=([[ 0. , 0., 0.], [ 1.23060, 0.7104873, 0. ]]) | |||
#gnr.center() | |||
write('gnr.traj', gnr) | |||
# Make self-consistent calculation and save results | |||
calc = GPAW(h=0.18, | |||
mode='lcao', | |||
xc='PBE', | |||
basis='szp(dzp)', | |||
kpts=(5,5,1), | |||
occupations=FermiDirac(width=0.05, maxiter=2000), | |||
mixer=Mixer(beta=0.010, nmaxold=8, weight=100.0), | |||
poissonsolver=PoissonSolver(eps=1e-12), | |||
txt='band_sc.txt') | |||
gnr.set_calculator(calc) | |||
gnr.get_potential_energy() | |||
calc.write('band_sc.gpw') | |||
from ase.dft.kpoints import ibz_points, get_bandpath | |||
points = ibz_points['hexagonal'] | |||
G = points['Gamma'] | |||
K = points['K'] | |||
M = points['M'] | |||
kpts, x, X = get_bandpath([K, G, M, K], gnr.cell, 40) | |||
calc = GPAW('band_sc.gpw', | |||
mode='lcao', | |||
xc='PBE', | |||
basis='szp(dzp)', | |||
kpts=kpts, | |||
txt='band_harris.txt', | |||
fixdensity=True, | |||
parallel={'domain': 1}, | |||
usesymm=None, | |||
convergence={'bands': 'all'}) | |||
if calc.input_parameters['mode'] == 'lcao': | |||
calc.scf.reset() | |||
calc.get_potential_energy() | |||
calc.write('band_harris.gpw') | |||
</pre> | </pre> |
Revision as of 10:27, 26 October 2012
Graphene using grid
Graphene using LCAO
from gpaw import GPAW, FermiDirac from ase import Atoms from ase.io import read, write from gpaw import GPAW, PoissonSolver, Mixer from ase.structure import bulk # ------------------------------------------------------------- # Bulk configuration # ------------------------------------------------------------- gnr = bulk('C', 'hcp', a=2.4612, c=6.709) gnr.positions=([[ 0. , 0., 0.], [ 1.23060, 0.7104873, 0. ]]) #gnr.center() write('gnr.traj', gnr) # Make self-consistent calculation and save results calc = GPAW(h=0.18, mode='lcao', xc='PBE', basis='szp(dzp)', kpts=(5,5,1), occupations=FermiDirac(width=0.05, maxiter=2000), mixer=Mixer(beta=0.010, nmaxold=8, weight=100.0), poissonsolver=PoissonSolver(eps=1e-12), txt='band_sc.txt') gnr.set_calculator(calc) gnr.get_potential_energy() calc.write('band_sc.gpw') from ase.dft.kpoints import ibz_points, get_bandpath points = ibz_points['hexagonal'] G = points['Gamma'] K = points['K'] M = points['M'] kpts, x, X = get_bandpath([K, G, M, K], gnr.cell, 40) calc = GPAW('band_sc.gpw', mode='lcao', xc='PBE', basis='szp(dzp)', kpts=kpts, txt='band_harris.txt', fixdensity=True, parallel={'domain': 1}, usesymm=None, convergence={'bands': 'all'}) if calc.input_parameters['mode'] == 'lcao': calc.scf.reset() calc.get_potential_energy() calc.write('band_harris.gpw')