Subband structure of carbon nanotubes: Difference between revisions
From phys824
Jump to navigationJump to search
No edit summary |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
* [https://wiki.fysik.dtu.dk/ase/ase/structure.html Create GNR atom coordinates using ASE] | * [https://wiki.fysik.dtu.dk/ase/ase/structure.html Create GNR atom coordinates using ASE] | ||
==Metallic ( | ==Metallic (7,0) CNT using LCAO== | ||
* | *cnt7-0_lcao.py: | ||
<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 nanotube | |||
# ------------------------------------------------------------- | |||
# Bulk configuration | |||
# ------------------------------------------------------------- | |||
cnt = nanotube(7, 0, length=1, bond=1.4, symbol='C') | |||
cnt.center() | |||
write('cnt.traj', cnt) | |||
# 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') | |||
cnt.set_calculator(calc) | |||
cnt.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], cnt.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 e.g. for plotting with gnuplot | |||
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> | ||
==Semiconducting ( | ==Semiconducting (7,7) CNT using LCAO== | ||
* | * cnt7-7_lcao.py: | ||
<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 nanotube | |||
# ------------------------------------------------------------- | |||
# Bulk configuration | |||
# ------------------------------------------------------------- | |||
cnt = nanotube(7, 7, length=1, bond=1.4, symbol='C') | |||
cnt.center() | |||
write('cnt.traj', cnt) | |||
# 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') | |||
cnt.set_calculator(calc) | |||
cnt.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], cnt.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 e.g. for plotting with gnuplot | |||
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> |
Latest revision as of 12:18, 16 November 2014
Tools
Metallic (7,0) CNT using LCAO
- cnt7-0_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 nanotube # ------------------------------------------------------------- # Bulk configuration # ------------------------------------------------------------- cnt = nanotube(7, 0, length=1, bond=1.4, symbol='C') cnt.center() write('cnt.traj', cnt) # 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') cnt.set_calculator(calc) cnt.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], cnt.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 e.g. for plotting with gnuplot 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
Semiconducting (7,7) CNT using LCAO
- cnt7-7_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 nanotube # ------------------------------------------------------------- # Bulk configuration # ------------------------------------------------------------- cnt = nanotube(7, 7, length=1, bond=1.4, symbol='C') cnt.center() write('cnt.traj', cnt) # 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') cnt.set_calculator(calc) cnt.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], cnt.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 e.g. for plotting with gnuplot 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