Subband structure of graphene nanoribbons: Difference between revisions
From phys824
Jump to navigationJump to search
No edit summary |
|||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Tools== | ==Tools== | ||
* [https://wiki.fysik.dtu.dk/ase/ase/structure.html | * [https://wiki.fysik.dtu.dk/ase/ase/structure.html How to create GNR atom coordinates using ASE] | ||
==8-ZGNR using grid== | ==8-ZGNR using grid== | ||
Line 8: | Line 8: | ||
<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 graphene_nanoribbon | |||
# ------------------------------------------------------------- | |||
# Bulk configuration | |||
# ------------------------------------------------------------- | |||
zgnr = graphene_nanoribbon(8, 1, type='zigzag', saturated=True, | |||
C_H=1.1, C_C=1.42086, vacuum=8.0, | |||
magnetic=False, initial_mag=0.0) | |||
zgnr.center() | |||
write('zgnr.traj', zgnr) | |||
# Make self-consistent calculation and save results | |||
calc = GPAW(h=0.18, | |||
mode='fd', | |||
xc='PBE', | |||
kpts=(1,1,9), | |||
maxiter=600, | |||
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') | |||
zgnr.set_calculator(calc) | |||
zgnr.get_potential_energy() | |||
calc.write('band_sc.gpw') | |||
# Calculate band structure along Gamma-X | |||
from ase.dft.kpoints import ibz_points, get_bandpath | |||
#points = ibz_points['fcc'] | |||
#G = points['Gamma'] | |||
#X = points['X'] | |||
G = (0, 0, 0) | |||
X = (0, 0, 0.5) | |||
kpts, x, X = get_bandpath([G, X], zgnr.cell, 60) | |||
calc = GPAW('band_sc.gpw', | |||
mode='fd', | |||
kpts=kpts, | |||
txt='band_harris.txt', | |||
fixdensity=True, | |||
maxiter=600, | |||
parallel={'domain': 1}, | |||
eigensolver='cg', # 'cg' is allowed for grid method only | |||
usesymm=None, | |||
convergence={'bands': 100}) | |||
# convergence={'bands': 'all'}) | |||
if calc.input_parameters['mode'] == 'lcao': | |||
calc.scf.reset() | |||
calc.get_potential_energy() | |||
ef = calc.get_fermi_level() | |||
calc.write('band_harris.gpw') | |||
calc = GPAW('band_harris', txt=None) | |||
import numpy as np | |||
eps_skn = np.array([[calc.get_eigenvalues(k,s) | |||
for k in range(60)] | |||
for s in range(1)]) - ef | |||
# Write the results to a file for plotting with some external package | |||
f = open('bands.dat', 'w') | |||
for n in range(66): | |||
for k in range(60): | |||
print >>f, k, eps_skn[0, k, n] | |||
print >>f | |||
</pre> | </pre> | ||
Line 20: | Line 98: | ||
from ase.io import read, write | from ase.io import read, write | ||
from gpaw import GPAW, PoissonSolver, Mixer | from gpaw import GPAW, PoissonSolver, Mixer | ||
from ase.structure import graphene_nanoribbon | from ase.structure import graphene_nanoribbon | ||
Line 53: | Line 131: | ||
# Calculate band structure along Gamma-X | # Calculate band structure along Gamma-X | ||
from ase.dft.kpoints import ibz_points, get_bandpath | from ase.dft.kpoints import ibz_points, get_bandpath | ||
G = (0, 0, 0) | G = (0, 0, 0) | ||
X = (0, 0, 0.5) | X = (0, 0, 0.5) | ||
Line 75: | Line 150: | ||
calc.get_potential_energy() | calc.get_potential_energy() | ||
ef = calc.get_fermi_level() | |||
calc.write('band_harris.gpw') | calc.write('band_harris.gpw') | ||
calc = GPAW('band_harris', txt=None) | calc = GPAW('band_harris', txt=None) | ||
import numpy as np | import numpy as np | ||
Line 88: | Line 157: | ||
eps_skn = np.array([[calc.get_eigenvalues(k,s) | eps_skn = np.array([[calc.get_eigenvalues(k,s) | ||
for k in range(60)] | for k in range(60)] | ||
for s in range(1)]) | for s in range(1)]) - ef | ||
# Write the results to a file for plotting with some external package | |||
f = open('bands.dat', 'w') | |||
for n in range(66): | for n in range(66): | ||
for k in range(60): | for k in range(60): | ||
print k, eps_skn[0, k, n] | print >>f, k, eps_skn[0, k, n] | ||
print | print >>f | ||
</pre> | </pre> |
Latest revision as of 14:47, 17 November 2014
Tools
8-ZGNR using grid
- zgnr_grid.py:
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 graphene_nanoribbon # ------------------------------------------------------------- # Bulk configuration # ------------------------------------------------------------- zgnr = graphene_nanoribbon(8, 1, type='zigzag', saturated=True, C_H=1.1, C_C=1.42086, vacuum=8.0, magnetic=False, initial_mag=0.0) zgnr.center() write('zgnr.traj', zgnr) # Make self-consistent calculation and save results calc = GPAW(h=0.18, mode='fd', xc='PBE', kpts=(1,1,9), maxiter=600, 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') zgnr.set_calculator(calc) zgnr.get_potential_energy() calc.write('band_sc.gpw') # Calculate band structure along Gamma-X from ase.dft.kpoints import ibz_points, get_bandpath #points = ibz_points['fcc'] #G = points['Gamma'] #X = points['X'] G = (0, 0, 0) X = (0, 0, 0.5) kpts, x, X = get_bandpath([G, X], zgnr.cell, 60) calc = GPAW('band_sc.gpw', mode='fd', kpts=kpts, txt='band_harris.txt', fixdensity=True, maxiter=600, parallel={'domain': 1}, eigensolver='cg', # 'cg' is allowed for grid method only usesymm=None, convergence={'bands': 100}) # convergence={'bands': 'all'}) if calc.input_parameters['mode'] == 'lcao': calc.scf.reset() calc.get_potential_energy() ef = calc.get_fermi_level() calc.write('band_harris.gpw') calc = GPAW('band_harris', txt=None) import numpy as np eps_skn = np.array([[calc.get_eigenvalues(k,s) for k in range(60)] for s in range(1)]) - ef # Write the results to a file for plotting with some external package f = open('bands.dat', 'w') for n in range(66): for k in range(60): print >>f, k, eps_skn[0, k, n] print >>f
8-ZGNR using LCAO
- zgnr_lcao.py:
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 graphene_nanoribbon # ------------------------------------------------------------- # Bulk configuration # ------------------------------------------------------------- zgnr = graphene_nanoribbon(8, 1, type='zigzag', saturated=True, C_H=1.1, C_C=1.42086, vacuum=8.0, magnetic=False, initial_mag=0.0) zgnr.center() write('zgnr.traj', zgnr) # Make self-consistent calculation and save results calc = GPAW(h=0.18, mode='lcao', xc='PBE', basis='szp(dzp)', kpts=(1,1,9), 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') zgnr.set_calculator(calc) zgnr.get_potential_energy() calc.write('band_sc.gpw') # Calculate band structure along Gamma-X from ase.dft.kpoints import ibz_points, get_bandpath G = (0, 0, 0) X = (0, 0, 0.5) kpts, x, X = get_bandpath([G, X], zgnr.cell, 60) 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() ef = calc.get_fermi_level() calc.write('band_harris.gpw') calc = GPAW('band_harris', txt=None) import numpy as np eps_skn = np.array([[calc.get_eigenvalues(k,s) for k in range(60)] for s in range(1)]) - ef # Write the results to a file for plotting with some external package f = open('bands.dat', 'w') for n in range(66): for k in range(60): print >>f, k, eps_skn[0, k, n] print >>f