Constructor for the bandstructure object.
The BulkConfiguration for which the bandstructure should be calculated.
Type: A BulkConfiguration.
Default:
None
The route to take through the Brillouin-zone.
Type: List of symmetry points of the unit cell, e.g. ['G','X','G'].
Default:
None
The number of points per segment of the route.
Type: A positive integer.
Default:
20.
A list of kpoints in which the bandstructrure should be calculated. This options is mutually exclusive to route, and points_per_segment.
Type: A list of 3 dimensional fractional k-points, e.g. [[0.0,0.0,0.0],[0.0,0.0,0.1],...]
Default:
None
The number of bands above the Fermi level.
Type: A positive integer.
Default:
None
A projection list object defining a projection.
Type: A PprojectionList object.
Default:
If no projection list is specified all orbitals will be used.
A Bandstructure object provides the following methods:
energyZero(): Return the energy zero
evaluate(spin): Return the bandstructure for a given spin
fermiLevel(): Return the Fermi level in absolute energy
fermiTemperature(): Return the Fermi_temperatures used in this bandstructure
kpoints(): Return the k-points used in this calculation
nlprint(stream): Print a string containing an ASCII table useful for plotting the bandstructure.
route(): Return the route used in this calculation
Calculate the bandstructure of silicon and save it to a file
# Setup a BulkConfiguration
bulk_configuration = BulkConfiguration(
bravais_lattice=FaceCenteredCubic(5.4306*Angstrom),
elements=[Silicon, Silicon],
cartesian_coordinates=[[ 0. , 0. , 0. ],
[ 1.35765, 1.35765, 1.35765]]*Angstrom)
# Define a calculator
calculator = HuckelCalculator(
basis_set = [CerdaHuckelParameters.Silicon_GW_diamond_Basis])
bulk_configuration.setCalculator(calculator)
# Calculate the bandstructure
bandstructure = Bandstructure(
configuration=bulk_configuration,
route=['G', 'X'],
points_per_segment=40,
bands_above_fermi_level=4
)
# Determine indirect band gap
energies = bandstructure.evaluate()
e_valence_max = energies[0][3]
e_conduction_min = energies[0][4]
i_valence_max=0
i_conduction_min=0
# Locate extrema
for i in range(energies.shape[0]):
#find maximum of valence band
if (energies[i][3] > e_valence_max):
e_valence_max=energies[i][3]
i_valence_max=i
#find minimum of conduction band
if (energies[i][4] < e_conduction_min):
e_conduction_min=energies[i][4]
i_conduction_min=i
# Print out results
print 'Valence band maximum (eV) ',e_valence_max, 'at ',
print bandstructure.kpoints()[i_valence_max]
print 'Conduction band minimum (eV)',e_conduction_min, 'at ',
print bandstructure.kpoints()[i_conduction_min]
print 'Band gap = %7.4f eV ' % (e_conduction_min-e_valence_max)
Note that the k-points are giving in units of reciprocal vectors, and in these units
.
To export the data of a bandstructure, use the method nlprint.
Symmetry points of the Brillouin zones can be found here BravaisLattice