![]() |
kdotpy
|
Public Member Functions | |
__init__ (self, k, eival, bmin, bmax=None, aligned_with_e0=False) | |
__str__ (self) | |
bindex (self) | |
get_zero_energy (self) | |
set_zero_energy (self, e0, g0=0, relax=False) | |
match_gap (self, eival, accuracy=1e-6, in_place=False) | |
align_eival (self, eival, do_sort=True, **ba_kwds) | |
interpolate (self, other, k_new, component=None, gridvar=None) | |
Public Attributes | |
k = k | |
eival = np.array(eival) | |
n = len(self.eival) | |
int | bmin = bmin |
int | bmax = self.bmin + self.n - 1 |
bool | aligned_with_e0 = aligned_with_e0 |
Container class for eigenvalues plus a minimum and maximum band index Attributes: k Vector instance. Momentum value. (The input may be numeric, but this is converted to Vector by __init__().) eival Array of eigenvalues. n Integer. Number of eigenvalues. bmin Nonzero integer. Minimum band index (index for the smallest eigenvalue). bmax Nonzero integer. Maximum band index (index for the largest eigenvalue). (The input may be None. In that case, the value is set automatically based on bmin and n. aligned_with_e0 True or False. Whether the band indices were aligned with the zero energy. This should be set to True if the band indices were set directly from e0, or is the band indices are obtained from another BandAlignPoint or a DiagDataPoint with aligned_with_e0 set to True.
kdotpy.bandalign.base.BandAlignPoint.__init__ | ( | self, | |
k, | |||
eival, | |||
bmin, | |||
bmax = None, | |||
aligned_with_e0 = False ) |
kdotpy.bandalign.base.BandAlignPoint.__str__ | ( | self | ) |
kdotpy.bandalign.base.BandAlignPoint.align_eival | ( | self, | |
eival, | |||
do_sort = True, | |||
** | ba_kwds ) |
Align a set of eigenvalues to the current BandAlignPoint instance. Arguments: eival Numpy array. Energies that should be aligned, i.e., to which band indices should be assigned. do_sort True or False. Whether the resulting BandAlignPoint instance should contain a sorted array of eigenvalues (True) or the eigenvalues as given by eival (False). **ba_kwds Keyword arguments passed to align_energies(). Return: A BandAlignPoint instance with the eigenvalues eival.
kdotpy.bandalign.base.BandAlignPoint.bindex | ( | self | ) |
Get sorted array of band indices
kdotpy.bandalign.base.BandAlignPoint.get_zero_energy | ( | self | ) |
Get 'zero energy', i.e., the energy between bands -1 and 1.
kdotpy.bandalign.base.BandAlignPoint.interpolate | ( | self, | |
other, | |||
k_new, | |||
component = None, | |||
gridvar = None ) |
Interpolate (or extrapolate) two BandAlignPoint instances to a third one. Interpolate the two sets of energies and define band indices at a 'new' momentum or magnetic-field value. Arguments: self The present BandAlignPoint instance. 'First value'. other BandAlignPoint instance. 'Second value'. k_new Vector instance. Target momentum or magnetic-field value. component String or None. Vector component that is used as 'interpolation variable'. For example, 'kx'. gridvar String or None. The grid variable, either 'k', 'b', or 'a'. This is the prefix for the vector component (see information in momentum.py) Returns: BandAlignPoint instance at k_new.
kdotpy.bandalign.base.BandAlignPoint.match_gap | ( | self, | |
eival, | |||
accuracy = 1e-6, | |||
in_place = False ) |
Match and select a (sub)set of eigenvalues of the current BandAlignPoint. Arguments: eival Numpy array. Energies that should be selected. accuracy Float. The maximum difference for comparing the values in eival to those of the present instance. in_place True or False. If True, return the present instance restricted to the given subset. If False, return a new BandAlignPoint instance. Returns: A new BandAlignPoint instance or the present instance.
kdotpy.bandalign.base.BandAlignPoint.set_zero_energy | ( | self, | |
e0, | |||
g0 = 0, | |||
relax = False ) |
Set zero energy. Arguments: e0 Float. Energy where to 'pin' the band indices to. By default (for g0 = 0), this is the energy neutral gap, between bands -1 and 1. g0 Integer. Gap index at energy e0. The band indices below and above the gap are set to -1 and 1 if g0 == 0, g0 - 1 and g0 if g0 < 0, and g0 and g0 + 1 if g0 > 0. relax True or False. If False (default), require that both the energies above and below the gap must be defined. If True, allow one to be undefined.
bool kdotpy.bandalign.base.BandAlignPoint.aligned_with_e0 = aligned_with_e0 |
kdotpy.bandalign.base.BandAlignPoint.bmax = self.bmin + self.n - 1 |
kdotpy.bandalign.base.BandAlignPoint.bmin = bmin |
kdotpy.bandalign.base.BandAlignPoint.eival = np.array(eival) |
kdotpy.bandalign.base.BandAlignPoint.k = k |
kdotpy.bandalign.base.BandAlignPoint.n = len(self.eival) |