-
Notifications
You must be signed in to change notification settings - Fork 0
kspace
class BZ(Enum)
Enumeration of the possible Brillouin Zone symmetries used to set up the k points. Possible values are:
- Irreducible
- Half
- Full
- NoTimeReversal
class CriticalPointsOf(Enum)
Enumeration of the critical points of some common lattices (they are taken from here). Possible values are:
- CUB
- BCC
- FCC
- HEX
- TET
- BCT
- ORC
- ORCC
class UsualKShifts(Enum)
Some commonly used k shifts, as specified in the documentation of the shiftk variable. Possible values are:
- Unshifted = (0,0,0)
- Default = (1,1,1)
- BCC = (¼,¼,¼), (-¼,-¼,-¼)
- FCC = (½,½,½), (½,0,0), (0,½,0), (0,0,½)
- HEX = (1,0,0), (-½, √3/2, 0), (0,0,1)
class SymmetricGrid
Builder class to generate a KSpaceDefinition
using symmetries in the BZ.
def __init__(self, symmetry: BZ, shifts: UsualKShifts | tuple[Vec3D, ...])
k-shifts can either be a value from UsualKShifts
, or a tuple of (multiple) k vectors (Vec3D
)
def ofMonkhorstPack(self, a: int, b: int|None, c: int|None) -> KSpaceDefinition
Creates a Monkhorst-Pack grid with (a
,b
,c
) number of k-points with respect to the primitive axis of the reciprocal lattice. If only a
is provided, b
and c
will be automatically equal to it.
def fromSuperLattice(self, a: Vec3D, b: Vec3D, c: Vec3D) -> KSpaceDefinition
Define the super lattice to construct the k-grid. Arguments are the 3 vectors (in real space) that define such super lattice
def automatic(self, minLenght: float = 30.0) -> KSpaceDefinition
ABINIT will automatically generate a large set of possible k point grids, and select among this set, the grids that give a length of smallest vector larger than minLength
. Furthermore, when used with BZ.Irreducible
, the one that reduces to the smallest number of k points will be selected among these grids.
This procedure can be time-consuming. It is worth doing it once for a given unit cell and set of symmetries, but not use this procedure by default. The best is then to have
AbOut(<prefix>).KPointsSets(True)
, in order to get a detailed analysis of the set of grids.
def manual(*points: _V, normalize: float = 1.0) -> KSpaceDefinition
Define manually the k points in terms of reciprocal space primitive translations (not in cartesian coordinates). One can additionally define a normalization factor normalize
greater than 1, that divides each vector.
def path(
divisions: int|tuple[int,...],
points: str|iter[str|Vec3D]]],
pointSet: CriticalPointsOf|dict[str,Vec3D]] = {}
) -> KSpaceDefinition
Rely on points
to set up a band structure calculation along different lines (allowed only for iscf == -2
).
If the argument division
is:
- an integer, it is the number of points for the shortest segment (others will have their number proportional to their length accordingly)
- a tuple of integers, they are the number of points for each segment (thus
len(divisions)+1
must be equal to the number of points)
If pointSet
(dictionary with single characters as keys and Vec3D
as values), one can use a string to represent the points (or a mix of strings and vectors): it becomes useful especially for critical points.
The letter G stands for the Gamma point and will always be equal to
Vec3D(0,0,0)
, even if nopointSet
is specified
Example
from pynabi import Vec3D as V
# this path
p1 = path(10, (
V.zero(),
V(0.0, 0.5, 0.5),
V.uniform(0.5),
V(0.25, 0.75, 0.5)
))
# is equivalent to
p2 = path(10, "GXLW", CriticalPointsOf.FCC)
# You don't have to sacrifice the comfort of strings
# to pass through non critical points
p3 = path(10, ("GX", V(0.25,0.5,0.4), "LW"), CriticalPointsOf.FCC)
# For some application, it could be useful to define
# custom critical points and use them
ccp = {
'A': V(0.25,0.5,0.75),
'B': V(0.75,0.5,0.25),
'C': V(-0.5,0.25,0.4)
}
p4 = path(10, "GABGC", ccp) # note that 'G' is always (0,0,0)