A class for calculating blochstates.
The configuration for which the eigenstate should be calculated.
Type: A BulkConfiguration
The quantum number of the desired eigenstate.
Type: integer 0
Default:
0
The spin to calculate the eigenstate for.
Type: Spin.Up | Spin.Down
Default:
Spin.Up
The k-point in fractional coordinates that the Bloch state should be calculated for.
Type: A list containing three floats, e.g. [0.0, 0.5, -0.5].
Default:
[0,0,0]
A BlochState object provides the following methods:
derivatives(x, y, z): Calculate the derivative in the point x,y,z.
evaluate(x, y, z): Evaluate in the point x,y,z
gridCoordinate(i, j, k): Return the coordinate for a given grid index.
nlprint(stream): Print a string containing an ASCII table useful for plotting the Bloch state.
scale(scale): Scale the field with a double.
shape(): Query function for getting the shape of the data.
spin(): Qurry function for the spin.
toArray(): Return the values of the grid as a numpy array slicing off any units.
unit(): Get the unit of the data in the grid.
unitCell(): Return the unit cell for the grid.
volumeElement(): Get the volume element of the grid.
Calculate and save the Bloch state for a gold FCC crystal in a NetCDF file.
# Define lattice
lattice = FaceCenteredCubic(4.08*Angstrom)
# Define elements
elements = [Gold]
# Define coordinates
coordinates = [[2.0, 2.0, 2.0]]*Angstrom
# Set up configuration
bulk_configuration = BulkConfiguration(
lattice,
elements,
coordinates
)
# Define a a calculator
bulk_configuration.setCalculator(LCAOCalculator())
# Calculate and save the Bloch state with quantum number 0
bloch_state = BlochState(bulk_configuration, quantum_number=5,
k_point=[0.0, 0.5, 0.5])
nlsave('bloch_state.nc', bloch_state)
For examples on how to average and handle 3-d grids, see the examples for ElectronDifferenceDensity and ElectrostaticDifferencePotential.