BlochWavefun¶
BlochWavefun is a class that defines single-particle Bloch wavefunctions
associated valence electron pairs in a crystal (solid). This class is similar to the :attr`Wavefun` class except that it contains quantities related to k-points, such as the number of k-points (nkpts). The wavefunctions are indexed by k-points as well as by single-particle energy (Kohn-Sham eigenvalue).
Class Function List¶
-
class
BlochWavefun¶ -
BlochWavefun()¶ Constructor that returns an empty
BlochWavefunobject.
-
BlochWavefun(psi) Constructor that returns a
BlochWavefunobject associated with the planewave coefficients specified by the cell arraypsi, which contains nkpts cells. Each cell of :attr`psi` is a 2D array with ncols columns.
-
BlochWavefun(psi, n1, n2, n3) Constructor that returns a
BlochWavefunobject associated with the planewave coefficients specified by the cell arraypsi, which contains nkpts cells. Each cell is a n1*n2*n3 by ncols array.
-
BlochWavefun(psi, n1, n2, n3, wks) Constructor that returns a
BlochWavefunobject associated with the planewave coefficients specified by the cell arraypsi, which contains nkpts cells as well as the weights associated with each k-point. Each cell is a n1*n2*n3 by ncols array.
-
We can also add and subtract two Wavefun objects X and Y by simply writing X+Y or X-Y. We can transpose X by using X.' and conjugate transpose by using X'. The inner product of
X and Y can be simply written as X'*Y. The Hadamard product of X and Y can be written as X*.Y. The pointwise power of each element of X can be written as X.^p, where p is an integer or floating point number.
A subset of wavefunctions in X can be extracted by using MATLAB’s subreference notation X(:,i:j), where i <= j are indices that are less than or equal to the number of wavefunctions in X.
Wavefun objects can also be concatnated if their dimensions match, e.g.,
Z = [X Y].
Class Attribute List¶
n1¶An integer that specifies the number of real space grid points in the x direction.
n2¶An integer that specifies the number of real space grid points in the y direction.
n3¶An integer that specifies the number of real space grid points in the z direction.
nrows¶An integer that specifies the number of planewave coefficients for each of the wavefunctions.
ncols¶An integer that specifies the number of wavefunctions contained in the object.
idxnz¶An array of integers that gives the indices of the nonzero planewave coefficients (stored in
psi) for each of the wavefunctions when it is reshaped from a 3D array to a 1D vector.
iscompact¶An integer that indicates whether only the nonzero planewave coefficients for each wavefunction are stored (in a compact format). It should be set to 1 if a compact is used, and 0 otherwise.
trans¶An integer that indicates whether the wavefunction itself (0) or the transpose of it is stored (1).
occ¶An integer array that gives the occupation number for each of the stored wavefunction.