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::AbstractMatrix{<:Number})Define the recipe for the line visualization of data along a reciprocal path.
QuantumLattices.Spatials.scatter — Constant@recipe plot(path::ReciprocalPath, data::AbstractMatrix{<:Number}, weights::AbstractArray{<:Number, 3}; weightmultiplier=5.0, weightcolors=nothing, weightlabels=nothing)Define the recipe for the scatter visualization of data along a reciprocal path with a series of weights.
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} <: AbstractVector{P}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, N, S<:SVector} <: FractionalReciprocalSpace{K, N, S}Brillouin zone of a lattice.
QuantumLattices.Spatials.BrillouinZone — MethodBrillouinZone(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, nk)
BrillouinZone{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, nk) where K
BrillouinZone{P}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}) where P
BrillouinZone{K, P}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}) where {K, P}Construct a Brillouin zone.
QuantumLattices.Spatials.FractionalReciprocalSpace — TypeFractionalReciprocalSpace{K, P<:SVector, N} <: ReciprocalSpace{K, P}Abstract type of reciprocal spaces with fractional coordinates.
QuantumLattices.Spatials.Lattice — TypeLattice(lattice::AbstractLattice, ranges::OneAtLeast{Int}, boundaries::OneAtLeast{Union{Char, String, Symbol}}=ntuple(i->'O', Val(fieldcount(typeof(ranges)))); mode::Symbol=:nonnegative)
Lattice(lattice::AbstractLattice, ranges::OneAtLeast{UnitRange{Int}}, boundaries::OneAtLeast{Union{Char, String, Symbol}}=ntuple(i->'O', Val(fieldcount(typeof(ranges)))))Construct a lattice from the translations of another.
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(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)
Lattice(coordinates::AbstractMatrix{<: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 nneighborth 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(reciprocalspace::ReciprocalSpace)Construct a reciprocal curve from a reciprocal space.
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 KConstruct 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::OneOrMore{Number}...; labels=points, length=100, ends=nothing)
ReciprocalPath{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, points::OneOrMore{Number}...; labels=points, length=100, ends=nothing) where K
ReciprocalPath(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, segments::Pair{<:OneOrMore{Number}, <:OneOrMore{Number}}...; labels=segments, length=100, ends=nothing)
ReciprocalPath{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, segments::Pair{<:OneOrMore{Number}, <:OneOrMore{Number}}...; labels=segments, length=100, ends=nothing) where KConstruct a path in the reciprocal space.
For connected segments,
- when
lengthis an integer, it specifies the length of each segment except for the last whose length will belength+1; - when
endsisnothing, 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.ReciprocalScatter — TypeReciprocalScatter{K, N, S<:SVector, V<:SVector{N}} <: FractionalReciprocalSpace{K, N, S}A set of scatter points in the reciprocal space.
QuantumLattices.Spatials.ReciprocalScatter — MethodReciprocalScatter(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, fractionals::AbstractVector{<:AbstractVector{<:Number}})
ReciprocalScatter{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, fractionals::AbstractVector{<:AbstractVector{<:Number}}) where KConstruct a set of reciprocal scatter points.
QuantumLattices.Spatials.ReciprocalScatter — MethodReciprocalScatter(reciprocalspace::FractionalReciprocalSpace)Construct a set of reciprocal scatter points from a reciprocal space with fractional coordinates.
QuantumLattices.Spatials.ReciprocalSpace — TypeReciprocalSpace{K, P<:SVector} <: VectorSpace{P}Abstract type of reciprocal spaces.
QuantumLattices.Spatials.ReciprocalZone — TypeReciprocalZone{K, N, S<:SVector, V<:Number} <: FractionalReciprocalSpace{K, N, 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::OneAtLeast{Pair{<:Number, <:Number}}; length=100, ends=(true, false))
ReciprocalZone{K}(reciprocals::AbstractVector{<:AbstractVector{<:Number}}, bounds::OneAtLeast{Pair{<:Number, <:Number}}; length=100, ends=(true, false)) where KConstruct 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.getindex — Methodgetindex(lattice::AbstractLattice, i::Integer) -> SVectorGet the ith coordinate.
Base.getindex — Methodgetindex(bond::Bond, i::Integer) -> PointGet the ith point contained in a generic bond.
Base.hash — Methodhash(brillouinzone::BrillouinZone, h::UInt)Hash a Brillouin zone.
Base.length — Methodlength(lattice::AbstractLattice) -> IntGet the number of points contained in a lattice.
Base.range — Methodrange(brillouinzone::BrillouinZone, i::Integer) -> StepRangeLen{Float64}Get the ith axis range of the fractional coordinates of a Brillouin zone.
Base.range — Methodrange(reciprocalzone::ReciprocalZone, i::Integer) -> StepRangeLen{Float64}Get the ith axis range of the fractional coordinates of a reciprocal zone.
Base.reverse — Methodreverse(bond::Bond) -> BondGet the reversed bond.
Base.step — Methodstep(path::ReciprocalPath, i::Integer) -> scalartype(path)Get the step between the ith and the (i+1)th points in the path.
LinearAlgebra.rank — Methodrank(reciprocalspace::FractionalReciprocalSpace) -> Int
rank(::Type{<:FractionalReciprocalSpace{K, N} where K}) where N -> IntGet the rank, i.e., the number of reciprocal lattice vectors of a reciprocal space with fractional coordinates.
QuantumLattices.QuantumOperators.matrix — Methodmatrix(vs::AbstractVector{<:AbstractVector}) -> MatrixConvert a vector of vector to a matrix.
QuantumLattices.QuantumOperators.scalartype — Methodscalartype(::Type{<:AbstractLattice{N, D} where N}) where {D<:Number}Get the data type of the coordinates of a lattice.
QuantumLattices.QuantumOperators.scalartype — Methodscalartype(::Type{<:Point{N, D} where N}) where {D<:Number}Get the data type of the coordinates of a point.
QuantumLattices.QuantumOperators.scalartype — Methodscalartype(::Type{<:ReciprocalSpace{K, P} where K}) where {P<:SVector}Get the data type of the coordinates of a reciprocal space.
QuantumLattices.Spatials.azimuth — Methodazimuth(v::AbstractVector{<:Number}) -> NumberGet the azimuth angle in radians of a vector.
QuantumLattices.Spatials.azimuthd — Methodazimuthd(v::AbstractVector{<:Number}) -> NumberGet the azimuth angle in degrees of a vector.
QuantumLattices.Spatials.bonds! — Methodbonds!(bonds::Vector, lattice::AbstractLattice, nneighbor::Integer; coordination::Integer=12) -> typeof(bonds)
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, ::Colon) -> Matrix{Bond{Colon, Point{dimension(lattice), scalartype(lattice)}}}Get the all-to-all bonds in a lattice.
QuantumLattices.Spatials.bonds — Methodbonds(lattice::AbstractLattice, nneighbor::Integer; coordination::Integer=12) -> Vector{Bond{Int, Point{dimension(lattice), scalartype(lattice)}}}
bonds(lattice::AbstractLattice, neighbors::Neighbors) -> Vector{Bond{keytype(neighbors), Point{dimension(lattice), scalartype(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}) -> NumberGet the distance between two points.
QuantumLattices.Spatials.distance — Methoddistance(path::ReciprocalPath) -> scalartype(path)
distance(path::ReciprocalPath, i::Integer) -> scalartype(path)
distance(path::ReciprocalPath, i::Integer, j::Integer) -> scalartype(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.dlmsave — Functiondlmsave(filename::AbstractString, x::AbstractVector{<:Number}, y::Union{AbstractVector{<:Number}, AbstractMatrix{<:Number}}, delim=' ')
dlmsave(filename::AbstractString, x::AbstractVector{<:Number}, y::AbstractVector{<:Number}, z::Union{AbstractMatrix{<:Number}, AbstractArray{<:Number, 3}}, delim=' ')
dlmsave(filename::AbstractString, reciprocalspace::Union{BrillouinZone, ReciprocalZone}, data::Union{AbstractMatrix{<:Number}, AbstractArray{<:Number, 3}}, delim=' '; fractional::Bool=true)
dlmsave(filename::AbstractString, reciprocalscatter::ReciprocalScatter, weights::AbstractMatrix{<:Number}, delim=' '; fractional::Bool=true)
dlmsave(filename::AbstractString, path::ReciprocalPath, data:AbstractMatrix{<:Number}, delim=' '; distance::Bool=true)
dlmsave(filename::AbstractString, path::ReciprocalPath, data::AbstractMatrix{<:Number}, weights::AbstractArray{<:Number, 3}, delim=' '; distance::Bool=true)
dlmsave(filename::AbstractString, path::ReciprocalPath, y::AbstractVector{<:Number}, data::Union{AbstractMatrix{<:Number}, AbstractArray{<:Number, 3}}, delim=' '; distance::Bool=true)Save data to delimited files.
QuantumLattices.Spatials.fractionals — Methodfractionals(brillouinzone::BrillouinZone) -> AbstractVector{SVector{rank(brillouinzone), scalartype(brillouinzone)}}Get the fractional coordinates of a Brillouin zone.
QuantumLattices.Spatials.fractionals — Methodfractionals(reciprocalscatter::ReciprocalScatter) -> Vector{<:SVector}Get the fractional coordinates of a reciprocal space.
QuantumLattices.Spatials.fractionals — Methodfractionals(reciprocalzone::ReciprocalZone) -> AbstractVector{SVector{rank(reciprocalzone), scalartype(reciprocalzone)}}Get the fractional coordinates of a reciprocal zone.
QuantumLattices.Spatials.icoordinate — Methodicoordinate(bond::Bond) -> SVectorGet 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.iscontinuous — Methodiscontinuous(brillouinzone::BrillouinZone) -> Bool
iscontinuous(::Type{<:BrillouinZone{K, P} where K}) where P -> BoolJudge whether a Brillouin zone is continuous.
QuantumLattices.Spatials.isdiscrete — Methodisdiscrete(brillouinzone::BrillouinZone) -> Bool
isdiscrete(::Type{<:BrillouinZone{K, P} where K}) where P -> BoolJudge whether a Brillouin zone is discrete.
QuantumLattices.Spatials.isintracell — Methodisintracell(bond::Bond) -> BoolJudge whether a bond is intra the unit cell of a lattice.
QuantumLattices.Spatials.isintracell — Methodisintracell(point::Point) -> BoolJudge 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
) -> BoolJudge 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.
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
) -> BoolJudge 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) -> IntJudge 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) -> BoolJudge whether a coordinate belongs to a lattice defined by vectors with the given tolerance.
QuantumLattices.Spatials.label — Methodlabel(reciprocalspace::ReciprocalSpace, i::Integer) -> String
label(::Type{<:ReciprocalSpace{K}}, i::Integer) where K -> StringGet the label of the ith axis of a reciprocal space.
QuantumLattices.Spatials.label — Methodlabel(reciprocalspace::ReciprocalSpace) -> Symbol
label(::Type{<:ReciprocalSpace{K}}) where K -> SymbolGet the label of a reciprocal space.
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.period — Methodperiod(brillouinzone::BrillouinZone, i::Integer) -> Integer/Inf
period(::Type{<:BrillouinZone{K, P} where K}, i::Integer) where P -> Integer/InfGet the ith period of a brillouin zone.
QuantumLattices.Spatials.periods — Methodperiods(brillouinzone::BrillouinZone) -> Tuple
periods(::Type{<:BrillouinZone{K, P} where K}) -> PGet the periods of a brillouin zone.
QuantumLattices.Spatials.polar — Methodpolar(v::AbstractVector{<:Number}) -> NumberGet the polar angle in radians of a vector.
QuantumLattices.Spatials.polard — Methodpolard(v::AbstractVector{<:Number}) -> NumberGet the polar angle in degrees of a vector.
QuantumLattices.Spatials.rcoordinate — Methodrcoordinate(bond::Bond) -> SVectorGet 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.reciprocals — Methodreciprocals(reciprocalspace::FractionalReciprocalSpace) -> AbstractVector{<:AbstractVector{<:Number}}Get the reciprocal lattice vectors of a reciprocal space with fractional coordinates.
QuantumLattices.Spatials.rotate — Methodrotate(vector::AbstractVector{<:Number}, angle::Number; axis::Tuple{Union{AbstractVector{<:Number}, Nothing}, Tuple{<:Number, <:Number}}=(nothing, (0, 0))) -> AbstractVector{<: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.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::OneOrMore{Number}...; labels=points, ends=nothing, atol::Real=atol, rtol::Real=rtol) -> Tuple(ReciprocalPath, Vector{Int})
selectpath(brillouinzone::BrillouinZone, segments::Pair{<:OneOrMore{Number}, <:OneOrMore{Number}}...; labels=segments, ends=nothing, atol::Real=atol, rtol::Real=rtol) -> 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
endsisnothing. - 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(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)
@recipe plot(path::ReciprocalPath, y::AbstractVector{<:Number}, 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
- a Brillouin zone,
- a reciprocal zone,
- the x-y plain with the x axis being a reciprocal path.
QuantumLattices.Spatials.shrink — Methodshrink(reciprocalzone::ReciprocalZone, ranges::OrdinalRange{<:Integer}...) -> ReciprocalZoneShrink a reciprocal zone.
QuantumLattices.Spatials.ticks — Methodticks(path::ReciprocalPath) -> Tuple{Vector{scalartype(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}) -> NumberGet the volume spanned by the input vectors.
QuantumLattices.Spatials.volume — Methodvolume(brillouinzone::BrillouinZone) -> NumberGet the volume of a Brillouin zone.
QuantumLattices.Spatials.volume — Methodvolume(reciprocalzone::ReciprocalZone) -> NumberGet the volume of a reciprocal zone.
QuantumLattices.decompose — Methoddecompose(m::AbstractMatrix{<:Number}, m₀::AbstractMatrix{<:Number}) -> Number
decompose(m::AbstractMatrix{<:Number}, ms::ZeroAtLeast{AbstractMatrix{<:Number}}) -> ZeroAtLeast{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 -> IntGet the space dimension of the lattice.
QuantumLattices.dimension — Methoddimension(bond::Bond) -> Int
dimension(::Type{<:Bond{K, P} where K}) where {P<:Point} -> IntGet the space dimension of a concrete bond.
QuantumLattices.dimension — Methoddimension(point::Point) -> Int
dimension(::Type{<:Point{N}}) where N -> IntGet the spatial dimension of a point.
QuantumLattices.dimension — Methoddimension(reciprocalspace::ReciprocalSpace) -> Int
dimension(::Type{<:ReciprocalSpace{K, P} where K}) where {P<:SVector} -> IntGet the spatial dimension of a reciprocal space.
QuantumLattices.expand — Methodexpand(reciprocalspace::FractionalReciprocalSpace, fractional::AbstractVector{<:Number}) -> AbstractVector{<:AbstractVector{<:Number}}Expand the fractional coordinate in a reciprocal space to the Cartesian coordinate.
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(reciprocalspace::FractionalReciprocalSpace; fractional=false, autolims=true)Define the recipe for the visualization of a reciprocal space with fractional coordinates.
When fractional is true, the fractional coordinates will be plotted. Otherwise the Cartesian coordinates will be plotted.
RecipesBase.apply_recipe — Method@recipe plot(curve::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(reciprocalscatter::ReciprocalScatter, weights::AbstractMatrix{<:Number}; fractional=true, weightmultiplier=1.0, weightcolors=nothing, weightlabels=nothing)Define the recipe for the scatter visualization of reciprocal points with a series of weights.