Spatials
QuantumLattices.Spatials.heatmap
— Constant@recipe plot(reciprocalspace::BrillouinZone, data::AbstractMatrix{<:Number})
@recipe plot(reciprocalspace::ReciprocalZone, data::AbstractMatrix{<:Number})
Define the recipe for the heatmap visualization of data on a Brillouin/reciprocal zone.
QuantumLattices.Spatials.line
— Constant@recipe plot(path::ReciprocalPath, data::AbstractVector{<:Number})
@recipe plot(path::ReciprocalPath, data::AbstractMatrix{<:Number})
Define the recipe for the line visualization of data along a reciprocal path.
QuantumLattices.QuantumNumbers.Momentum₁
— MethodMomentum₁{N}(momentum::AbstractVector{<:Number}, reciprocals::AbstractVector{<:AbstractVector{<:Number}}; atol=atol, rtol=rtol) where N
Construct a 1d quantum momentum by the coordinates.
QuantumLattices.QuantumNumbers.Momentum₂
— MethodMomentum₂{N₁, N₂}(momentum::AbstractVector{<:Number}, reciprocals::AbstractVector{<:AbstractVector{<:Number}}; atol=atol, rtol=rtol) where {N₁, N₂}
Construct a 2d quantum momentum by the coordinates.
QuantumLattices.QuantumNumbers.Momentum₃
— MethodMomentum₃{N₁, N₂, N₃}(momentum::AbstractVector{<:Number}, reciprocals::AbstractVector{<:AbstractVector{<:Number}}; atol=atol, rtol=rtol) where {N₁, N₂, N₃}
Construct a 3d quantum momentum by the coordinates.
QuantumLattices.Spatials.AbstractLattice
— TypeAbstractLattice{N, D<:Number, M}
Abstract type of a unitcell-described lattice.
It should have the following contents:
name::Symbol
: the name of the latticecoordinates::Matrix{D}
: the coordinates of the latticevectors::SVector{M, SVector{N, D}}
: the translation vectors of the lattice
QuantumLattices.Spatials.Bond
— TypeBond{K, P<:Point}
A generic bond, which could contains several points.
QuantumLattices.Spatials.Bond
— MethodBond(point::Point)
Bond(kind, point₁::Point, point₂::Point, points::Point...)
Construct a bond.
QuantumLattices.Spatials.BrillouinZone
— TypeBrillouinZone{K, P<:Momentum, S<:SVector, N} <: ReciprocalSpace{K, S}
The Brillouin zone of a lattice.
QuantumLattices.Spatials.BrillouinZone
— MethodBrillouinZone(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, nk)
BrillouinZone{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, nk) where K
BrillouinZone(::Type{P}, reciprocals::AbstractVector{<:AbstractVector{<:Number}}) where {P<:Momentum}
BrillouinZone{K}(::Type{P}, reciprocals::AbstractVector{<:AbstractVector{<:Number}}) where {K, P<:Momentum}
Construct a Brillouin zone.
QuantumLattices.Spatials.Lattice
— TypeLattice{N, D<:Number, M} <: AbstractLattice{N, D, M}
Simplest lattice.
A simplest lattice can be constructed from its coordinates and translation vectors.
QuantumLattices.Spatials.Lattice
— MethodLattice(lattice::AbstractLattice, ranges::NTuple{N, Int}, boundaries::NTuple{N, Union{Char, String, Symbol}}=ntuple(i->'O', Val(N)); mode::Symbol=:nonnegative) where N
Lattice(lattice::AbstractLattice, ranges::NTuple{N, UnitRange{Int}}, boundaries::NTuple{N, Union{Char, String, Symbol}}=ntuple(i->'O', Val(N))) where N
Construct a lattice from the translations of another.
QuantumLattices.Spatials.Lattice
— MethodLattice(coordinates::NTuple{N, Number}...; name::Symbol=:lattice, vectors::Union{AbstractVector{<:AbstractVector{<:Number}}, Nothing}=nothing) where N
Lattice(coordinates::AbstractVector{<:Number}...; name::Symbol=:lattice, vectors::Union{AbstractVector{<:AbstractVector{<:Number}}, Nothing}=nothing)
Construct a lattice.
QuantumLattices.Spatials.Neighbors
— TypeNeighbors{K, V<:Number} <: CompositeDict{K, V}
Neighbor vs. bond length maps.
QuantumLattices.Spatials.Neighbors
— MethodNeighbors(lattice::AbstractLattice, nneighbor::Integer; coordination::Integer=12)
Get the neighbor vs. bond length map of a lattice up to the nneighbor
th order.
QuantumLattices.Spatials.Point
— TypePoint{N, D<:Number}
A point in a unitcell-described lattice.
QuantumLattices.Spatials.Point
— MethodPoint(site::Integer, rcoordinate::SVector{N, D}, icoordinate::SVector{N, D}) where {N, D<:Number}
Point(site::Integer, rcoordinate::NTuple{N, <:Number}, icoordinate::NTuple{N, <:Number}=ntuple(i->0, Val(N))) where N
Point(site::Integer, rcoordinate::AbstractVector{<:Number}, icoordinate::AbstractVector{<:Number}=zero(SVector{length(rcoordinate), Int}))
Construct a labeled point.
QuantumLattices.Spatials.ReciprocalCurve
— TypeReciprocalCurve{K, S<:SVector} <: ReciprocalSpace{K, S}
A curve in the reciprocal space.
QuantumLattices.Spatials.ReciprocalCurve
— MethodReciprocalCurve(path::ReciprocalPath)
Construct a reciprocal curve from a reciprocal path.
QuantumLattices.Spatials.ReciprocalCurve
— MethodReciprocalCurve(curve::AbstractVector{<:NTuple{N, Number}}) where N
ReciprocalCurve(curve::AbstractVector{<:AbstractVector{<:Number}})
ReciprocalCurve{K}(curve::AbstractVector{<:NTuple{N, Number}}) where {K, N}
ReciprocalCurve{K}(curve::AbstractVector{<:AbstractVector{<:Number}}) where K
Construct a curve in the reciprocal space.
QuantumLattices.Spatials.ReciprocalPath
— TypeReciprocalPath{K, S<:SVector, N, R} <: ReciprocalSpace{K, S}
A path in the reciprocal space.
QuantumLattices.Spatials.ReciprocalPath
— MethodReciprocalPath(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, contents::NamedTuple{(:points, :labels), <:Tuple{<:Tuple, <:Tuple}}; length=100, ends=nothing)
ReciprocalPath{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, contents::NamedTuple{(:points, :labels), <:Tuple{<:Tuple, <:Tuple}}; length=100, ends=nothing) where K
ReciprocalPath(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, points::NTuple{N, Number}...; labels=points, length=100, ends=nothing) where N
ReciprocalPath(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, points::Tuple{Vararg{NTuple{N, Number}}}; labels=points, length=100, ends=nothing) where N
ReciprocalPath{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, points::NTuple{N, Number}...; labels=points, length=100, ends=nothing) where {K, N}
ReciprocalPath{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, points::Tuple{Vararg{NTuple{N, Number}}}; labels=points, length=100, ends=nothing) where {K, N}
ReciprocalPath(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, segments::Pair{<:NTuple{N, Number}, <:NTuple{N, Number}}...; labels=segments, length=100, ends=nothing) where N
ReciprocalPath(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, segments::Tuple{Vararg{Pair{<:NTuple{N, Number}, <:NTuple{N, Number}}}}; labels=segments, length=100, ends=nothing) where N
ReciprocalPath{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, segments::Pair{<:NTuple{N, Number}, <:NTuple{N, Number}}...; labels=segments, length=100, ends=nothing) where {K, N}
ReciprocalPath{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, segments::Tuple{Vararg{Pair{<:NTuple{N, Number}, <:NTuple{N, Number}}}}; labels=segments, length=100, ends=nothing) where {K, N}
Construct a path in the reciprocal space.
For connected segments,
- when
length
is an integer, it specifies the length of each segment except for the last whose length will belength+1
; - when
ends
isnothing
, the start point will be included while the end point will be not for each segment except for the last both points of which will be included.
- when
For disconnected segments, they can be partitioned into several connected parts, and the rules for connected segments apply for each of such connected parts.
With the above rules, all the points along the assigned path will be counted once and only once with the largest homogeneity.
QuantumLattices.Spatials.ReciprocalSpace
— TypeReciprocalSpace{K, P<:SVector} <: SimpleNamedVectorSpace{K, P}
Abstract type of reciprocal spaces.
QuantumLattices.Spatials.ReciprocalZone
— TypeReciprocalZone{K, S<:SVector, V<:Number} <: ReciprocalSpace{K, S}
A zone in the reciprocal space.
QuantumLattices.Spatials.ReciprocalZone
— MethodReciprocalZone(reciprocals::AbstractVector{<:AbstractVector{<:Number}}; length=100, ends=(true, false))
ReciprocalZone{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}; length=100, ends=(true, false)) where K
ReciprocalZone(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, bounds::Pair{<:Number, <:Number}...; length=100, ends=(true, false))
ReciprocalZone{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, bounds::Pair{<:Number, <:Number}...; length=100, ends=(true, false)) where K
ReciprocalZone(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, bounds::AbstractVector{<:Pair{<:Number, <:Number}}; length=100, ends=(true, false))
ReciprocalZone{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, bounds::AbstractVector{<:Pair{<:Number, <:Number}}; length=100, ends=(true, false)) where K
ReciprocalZone(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, bounds::Tuple{Vararg{Pair{<:Number, <:Number}}}; length=100, ends=(true, false))
ReciprocalZone{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, bounds::Tuple{Vararg{Pair{<:Number, <:Number}}}; length=100, ends=(true, false)) where K
Construct a rectangular zone in the reciprocal space.
QuantumLattices.Spatials.ReciprocalZone
— MethodReciprocalZone(brillouinzone::BrillouinZone)
Construct a reciprocal zone from a Brillouin zone.
QuantumLattices.Spatials.@hexagon_str
— Macrohexagon"P₁-P₂-P₃-..."
hexagon"P₁-P₂-P₃-..., 120°"
hexagon"P₁-P₂-P₃-..., 60°"
Construct a tuple of start-stop point pairs for the hexagonal reciprocal space.
QuantumLattices.Spatials.@line_str
— Macroline"P₁-P₂-P₃-..."
Construct a tuple of start-stop point pairs for the one dimensional reciprocal space.
QuantumLattices.Spatials.@rectangle_str
— Macrorectangle"P₁-P₂-P₃-..."
Construct a tuple of start-stop point pairs for the rectangular reciprocal space.
Base.eltype
— Methodeltype(bond::Bond)
eltype(::Type{<:Bond{K, P} where K}) where {P<:Point}
Get the point type contained in a generic bond.
Base.getindex
— Methodgetindex(lattice::AbstractLattice, i::Integer) -> SVector
Get the ith coordinate.
Base.getindex
— Methodgetindex(bond::Bond, i::Integer) -> Point
Get the ith point contained in a generic bond.
Base.iterate
— Functioniterate(bond::Bond, state=1)
Iterate over the points contained in a generic bond.
Base.length
— Methodlength(lattice::AbstractLattice) -> Int
Get the number of points contained in a lattice.
Base.length
— Methodlength(bond::Bond) -> Int
Get the number of points contained in a generic bond.
Base.reverse
— Methodreverse(bond::Bond) -> Bond
Get the reversed bond.
Base.step
— Methodstep(path::ReciprocalPath, i::Integer) -> dtype(path)
Get the step between the ith and the (i+1)th points in the path.
QuantumLattices.Spatials.azimuth
— Methodazimuth(v::AbstractVector{<:Number}) -> Number
Get the azimuth angle in radians of a vector.
QuantumLattices.Spatials.azimuthd
— Methodazimuthd(v::AbstractVector{<:Number}) -> Number
Get the azimuth angle in degrees of a vector.
QuantumLattices.Spatials.bonds!
— Methodbonds!(bonds::Vector, lattice::AbstractLattice, nneighbor::Integer; coordination::Integer=12)
bonds!(bonds::Vector, lattice::AbstractLattice, neighbors::Neighbors) -> typeof(bonds)
Get the required bonds of a lattice and append them to the input bonds.
QuantumLattices.Spatials.bonds
— Methodbonds(lattice::AbstractLattice, nneighbor::Integer; coordination::Integer=12) -> Vector{Bond{Int, Point{dimension(lattice), dtype(lattice)}}}
bonds(lattice::AbstractLattice, neighbors::Neighbors) -> Vector{Bond{keytype(neighbors), Point{dimension(lattice), dtype(lattice)}}}
Get the required bonds of a lattice.
QuantumLattices.Spatials.direction
— Methoddirection(v::Char, args...) -> SVector{3, <:Number}
direction(v::Number, unit::Symbol) -> SVector{2, <:Number}
direction(v::Tuple{Number, Number}, unit::Symbol) -> SVector{3, <:Number}
direction(v::AbstractVector{<:Number}, args...) -> AbstractVector{<:Number}
Get the unit vector that specifies the direction of a vector.
QuantumLattices.Spatials.distance
— Methoddistance(p₁::AbstractVector{<:Number}, p₂::AbstractVector{<:Number}) -> Number
Get the distance between two points.
Compared to norm(p₁-p₂)
, this function avoids the memory allocation for p₁-p₂
, thus is more efficient.
QuantumLattices.Spatials.distance
— Methoddistance(path::ReciprocalPath) -> dtype(path)
distance(path::ReciprocalPath, i::Integer) -> dtype(path)
distance(path::ReciprocalPath, i::Integer, j::Integer) -> dtype(path)
Get the distance
- of the total path,
- from the start point to the ith point in the path,
- from the ith point to the jth point in the path (when i is greater than j, the value is negative).
QuantumLattices.Spatials.icoordinate
— Methodicoordinate(bond::Bond) -> SVector
Get the icoordinate of the bond.
QuantumLattices.Spatials.interlinks
— Methodinterlinks(cluster₁::AbstractMatrix{<:Number}, cluster₂::AbstractMatrix{<:Number}, neighbors::Neighbors) -> Vector{Tuple{Int, Int, Int}}
Use kdtree to get the intercluster nearest neighbors.
QuantumLattices.Spatials.isintracell
— Methodisintracell(bond::Bond) -> Bool
Judge whether a bond is intra the unit cell of a lattice.
QuantumLattices.Spatials.isintracell
— Methodisintracell(point::Point) -> Bool
Judge whether a point is intra the unitcell.
QuantumLattices.Spatials.isintratriangle
— Methodisintratriangle(
p::AbstractVector{<:Number}, p₁::AbstractVector{<:Number}, p₂::AbstractVector{<:Number}, p₃::AbstractVector{<:Number};
vertexes::NTuple{3, Bool}=(true, true, true), edges::NTuple{3, Bool}=(true, true, true), atol::Real=atol, rtol::Real=rtol
) -> Bool
Judge whether a point belongs to the interior of a triangle whose vertexes are p₁
, 'p₂' and p₃
with the give tolerance. vertexes
and edges
define whether the interior should contain the vertexes or edges, respectively.
- The vertexes are in the order (p₁, p₂, p₃) and the edges are in the order (p₁p₂, p₂p₃, p₃p₁).
- The edges do not contain the vertexes.
QuantumLattices.Spatials.isonline
— Methodisonline(
p::AbstractVector{<:Number}, p₁::AbstractVector{<:Number}, p₂::AbstractVector{<:Number};
ends::Tuple{Bool, Bool}=(true, true), atol::Real=atol, rtol::Real=rtol
) -> Bool
Judge whether a point is on a line segment whose end points are p₁
and p₂
with the given tolerance. ends
defines whether the line segment should contain its ends.
QuantumLattices.Spatials.isparallel
— Methodisparallel(v₁::AbstractVector{<:Number}, v₂::AbstractVector{<:Number}; atol::Real=atol, rtol::Real=rtol) -> Int
Judge whether two vectors are parallel to each other with the given tolerance, 0
for not parallel, 1
for parallel and -1
for antiparallel.
QuantumLattices.Spatials.issubordinate
— Methodissubordinate(coordinate::AbstractVector{<:Number}, vectors::AbstractVector{<:AbstractVector{<:Number}}; atol::Real=atol, rtol::Real=rtol) -> Bool
Judge whether a coordinate belongs to a lattice defined by vectors
with the given tolerance.
QuantumLattices.Spatials.matrix
— Methodmatrix(vs::AbstractVector{<:AbstractVector}) -> Matrix
Convert a vector of vector to a matrix.
QuantumLattices.Spatials.minimumlengths
— Functionminimumlengths(cluster::AbstractVector{<:Number}, vectors::AbstractVector{<:AbstractVector{<:Number}}, nneighbor::Integer=1; coordination::Integer=12) -> Vector{Float}
minimumlengths(cluster::AbstractMatrix{<:Number}, vectors::AbstractVector{<:AbstractVector{<:Number}}, nneighbor::Integer=1; coordination::Integer=12) -> Vector{Float}
Use kdtree to search the lowest several minimum bond lengths within a lattice translated by a cluster.
When the translation vectors are not empty, the lattice will be considered periodic in the corresponding directions. Otherwise the lattice will be open in all directions. To search for the bonds across the periodic boundaries, the cluster will be pre-translated to become a supercluster, which has open boundaries but is large enough to contain all the nearest neighbors within the required order. The coordination
parameter sets the average number of each order of nearest neighbors. If it is to small, larger bond lengths may not be searched, and the result will contain Inf
. This is a sign that you may need a larger coordination
. Another situation that Inf
appears in the result occurs when the minimum lengths are searched in open lattices. Indeed, the cluster may be too small so that the required order just goes beyond it. In this case the warning message can be safely ignored.
QuantumLattices.Spatials.polar
— Methodpolar(v::AbstractVector{<:Number}) -> Number
Get the polar angle in radians of a vector.
QuantumLattices.Spatials.polard
— Methodpolard(v::AbstractVector{<:Number}) -> Number
Get the polar angle in degrees of a vector.
QuantumLattices.Spatials.rcoordinate
— Methodrcoordinate(bond::Bond) -> SVector
Get the rcoordinate of the bond.
QuantumLattices.Spatials.reciprocals
— Methodreciprocals(lattice::AbstractLattice) -> Vector{<:SVector}
Get the reciprocal translation vectors of the dual lattice.
QuantumLattices.Spatials.reciprocals
— Methodreciprocals(vectors::AbstractVector{AbstractVector{<:Number}}) -> AbstractVector{<:AbstractVector{<:Number}}
Get the reciprocals dual to the input vectors.
QuantumLattices.Spatials.rotate
— Methodrotate(vector::AbstractVector{<:Number}, angle::Number; axis::Tuple{Union{AbstractVector{<:Number}, Nothing}, Tuple{<:Number, <:Number}}=(nothing, (0, 0))) -> AbstrctVector{<:Number}
rotate(cluster::AbstractMatrix{<:Number}, angle::Number; axis::Tuple{Union{AbstractVector{<:Number}, Nothing}, Tuple{<:Number, <:Number}}=(nothing, (0, 0))) -> AbstractMatrix{<:Number}
Get a rotated vector/cluster of the original one by a certain angle around an axis.
The axis is determined by a point it gets through (nothing
can be used to denote the origin), and its polar as well as azimuth angles in radians. The default axis is the z axis.
- The result is given by the Rodrigues' rotation formula.
- Only 2 and 3 dimensional vectors can be rotated.
- When the input vectors are 2 dimensional, both the polar and azimuth of the axis must be 0.
QuantumLattices.Spatials.save
— Methodsave(filename::AbstractString, path::ReciprocalPath, data::Union{AbstractVector{<:Number}, AbstractMatrix{<:Number}})
save(filename::AbstractString, path::ReciprocalPath, y::AbstractVector{<:Number}, data::Union{AbstractMatrix{<:Number}, AbstractArray{<:Number, 3}})
save(filename::AbstractString, reciprocalspace::Union{BrillouinZone, ReciprocalZone}, data::Union{AbstractMatrix{<:Number}, AbstractArray{<:Number, 3}})
Save data to delimited files.
QuantumLattices.Spatials.selectpath
— Methodselectpath(brillouinzone::BrillouinZone, contents::NamedTuple{(:points, :labels), <:Tuple{<:Tuple, <:Tuple}}; ends=nothing, atol::Real=atol, rtol::Real=rtol) -> Tuple(ReciprocalPath, Vector{Int})
selectpath(brillouinzone::BrillouinZone, points::NTuple{N, Number}...; labels=points, ends=nothing, atol::Real=atol, rtol::Real=rtol) where N -> Tuple(ReciprocalPath, Vector{Int})
selectpath(brillouinzone::BrillouinZone, points::Tuple{Vararg{NTuple{N, Number}}}; labels=points, ends=nothing, atol::Real=atol, rtol::Real=rtol) where N -> Tuple(ReciprocalPath, Vector{Int})
selectpath(brillouinzone::BrillouinZone, segments::Pair{<:NTuple{N, Number}, <:NTuple{N, Number}}...; labels=segments, ends=nothing, atol::Real=atol, rtol::Real=rtol) where N -> Tuple(ReciprocalPath, Vector{Int})
selectpath(brillouinzone::BrillouinZone, segments::Tuple{Vararg{Pair{<:NTuple{N, Number}, <:NTuple{N, Number}}}}; labels=segments, ends=nothing, atol::Real=atol, rtol::Real=rtol) where N -> Tuple(ReciprocalPath, Vector{Int})
Select a path from a BrillouinZone
. Return a ReciprocalPath
and the positions of the equivalent points in the BrillouinZone
.
- For connected segments, the start point will be included while the stop point will be not for each segment except for the last both points of which will be included if
ends
isnothing
. - For disconnected segments, they can be partitioned into several connected parts, and the rule for connected segments applies for each of such connected parts.
With the above rules, all the points along the assigned path will be counted once and only once.
QuantumLattices.Spatials.setup
— Method@recipe plot(path::ReciprocalPath, y::AbstractVector{<:Number}, data::AbstractArray{<:Number, 3}; subtitles=nothing, subtitlefontsize=8, nrow=nothing, ncol=nothing, clims=nothing)
@recipe plot(reciprocalspace::BrillouinZone, data::AbstractArray{<:Number, 3}; subtitles=nothing, subtitlefontsize=8, nrow=nothing, ncol=nothing, clims=nothing)
@recipe plot(reciprocalspace::ReciprocalZone, data::AbstractArray{<:Number, 3}; subtitles=nothing, subtitlefontsize=8, nrow=nothing, ncol=nothing, clims=nothing)
Define the recipe for the heatmap visualization of a series of data on
- the x-y plain with the x axis being a reciprocal path,
- a Brillouin zone,
- a reciprocal zone.
QuantumLattices.Spatials.shrink
— Methodshrink(reciprocalzone::ReciprocalZone{K}, ranges::Vararg{OrdinalRange{<:Integer}, N}) where {K, N} -> ReciprocalZone
Shrink a reciprocal zone.
QuantumLattices.Spatials.ticks
— Methodticks(path::ReciprocalPath) -> Tuple{Vector{dtype(path)}, Vector{String}}
Get the position-label pairs of the ticks of a path.
QuantumLattices.Spatials.tile
— Methodtile(cluster::AbstractVector{<:Number}, vectors::AbstractVector{<:AbstractVector{<:Number}}, translations) -> AbstractMatrix{<:Number}
tile(cluster::AbstractMatrix{<:Number}, vectors::AbstractVector{<:AbstractVector{<:Number}}, translations) -> AbstractMatrix{<:Number}
Tile a supercluster by translations of the input cluster.
Basically, the final supercluster is composed of several parts, each of which is a translation of the original cluster, with the translation vectors specified by vectors
and each set of the translation indices contained in translations
. When translation vectors are empty, a copy of the original cluster will be returned.
QuantumLattices.Spatials.translate
— Methodtranslate(cluster::AbstractVector{<:Number}, vector::AbstractVector{<:Number}) -> AbstractVector{<:Number}
translate(cluster::AbstractMatrix{<:Number}, vector::AbstractVector{<:Number}) -> AbstractMatrix{<:Number}
Get the translated cluster of the original one by a vector.
QuantumLattices.Spatials.volume
— Methodvolume(vectors::AbstractVector{<:AbstractVector{<:Number}}) -> Number
volume(v::AbstractVector{<:Number}) -> Number
volume(v₁::AbstractVector{<:Number}, v₂::AbstractVector{<:Number}) -> Number
volume(v₁::AbstractVector{<:Number}, v₂::AbstractVector{<:Number}, v₃::AbstractVector{<:Number}) -> Number
Get the volume spanned by the input vectors.
QuantumLattices.Spatials.volume
— Methodvolume(brillouinzone::BrillouinZone) -> Number
Get the volume of a Brillouin zone.
QuantumLattices.Spatials.volume
— Methodvolume(reciprocalzone::ReciprocalZone) -> Number
Get the volume of a reciprocal zone.
QuantumLattices.decompose
— Methoddecompose(m::AbstractMatrix{<:Number}, m₀::AbstractMatrix{<:Number}) -> Number
decompose(m::AbstractMatrix{<:Number}, ms::Tuple{Vararg{AbstractMatrix{<:Number}}}) -> Tuple{Vararg{Number}}
decompose(m::AbstractMatrix{<:Number}, ms::AbstractVector{<:AbstractMatrix{<:Number}}) -> Vector{<:Number}
Decompose a matrix.
QuantumLattices.decompose
— Methoddecompose(v₀::AbstractVector{<:Number}, v₁::AbstractVector{<:Number}) -> Number
decompose(v₀::AbstractVector{<:Number}, v₁::AbstractVector{<:Number}, v₂::AbstractVector{<:Number}) -> Tuple{Number, Number}
decompose(v₀::AbstractVector{<:Number}, v₁::AbstractVector{<:Number}, v₂::AbstractVector{<:Number}, v₃::AbstractVector{<:Number}) -> Tuple{Number, Number, Number}
decompose(v₀::AbstractVector{<:Number}, vs::AbstractVector{<:AbstractVector{<:Number}}) -> Vector{<:Number}
Decompose a vector with respect to input basis vectors.
QuantumLattices.dimension
— Methoddimension(lattice::AbstractLattice) -> Int
dimension(::Type{<:AbstractLattice{N}}) where N -> Int
Get the space dimension of the lattice.
QuantumLattices.dimension
— Methoddimension(bond::Bond) -> Int
dimension(::Type{<:Bond{K, P} where K}) where {P<:Point} -> Int
Get the space dimension of a concrete bond.
QuantumLattices.dimension
— Methoddimension(point::Point) -> Int
dimension(::Type{<:Point{N}}) where N -> Int
Get the spatial dimension of a point.
QuantumLattices.dtype
— Methoddtype(lattice::AbstractLattice)
dtype(::Type{<:AbstractLattice{N, D} where N}) where {D<:Number}
Get the data type of the coordinates of a lattice.
QuantumLattices.dtype
— Methoddtype(bond::Bond)
dtype(::Type{<:Bond{K, P} where K}) where {P<:Point}
Get the data type of the coordinates of the points contained in a generic bond.
QuantumLattices.dtype
— Methoddtype(point::Point)
dtype(::Type{<:Point{N, D} where N}) where {D<:Number}
Get the data type of the coordinates of a point.
QuantumLattices.expand
— Methodexpand(momentum::Momentum, reciprocals::AbstractVector{<:AbstractVector{<:Number}}) -> eltype(reciprocals)
Expand the momentum from integral values to real values with the given reciprocals.
RecipesBase.apply_recipe
— Function@recipe plot(lattice::AbstractLattice, neighbors::Union{Int, Neighbors}, filter::Function=bond->true; siteon=false)
Define the recipe for the visualization of a lattice.
RecipesBase.apply_recipe
— Method@recipe plot(path::ReciprocalCurve)
Define the recipe for the visualization of a reciprocal curve.
RecipesBase.apply_recipe
— Method@recipe plot(path::ReciprocalPath, y::AbstractVector{<:Number}, data::AbstractMatrix{<:Number})
Define the recipe for the heatmap visualization of data on the x-y plain with the x axis being a reciprocal path.
RecipesBase.apply_recipe
— Method@recipe plot(path::ReciprocalPath)
Define the recipe for the visualization of a reciprocal path.
RecipesBase.apply_recipe
— Method@recipe plot(reciprocalspace::ReciprocalSpace)
Define the recipe for the visualization of a reciprocal space.