Types
Manual
PeriodicGraphEmbeddings provide the new type PeriodicGraphEmbedding which wraps:
- A
PeriodicGraph - The list of positions of the vertices in a unit cell of the graph
- Optionally, a
Cellif the dimension of the graph is 3 or below, which contains the geometry of the unit cell.
A PeriodicGraphEmbedding can be built through different methods, depending on whether the list of positions should be permuted to be sorted, or offset to have all positions between 0 and 1 for instance:
PeriodicGraphEmbeddings.PeriodicGraphEmbedding — TypePeriodicGraphEmbedding{D,T}Embedding in euclidean space of a PeriodicGraph of dimension D. Each vertex is assigned a D-uplet of coordinates of type T.
PeriodicGraphEmbedding3D is provided as an alias for PeriodicGraphEmbedding{3}. Symmetry detection provided by PeriodicGraphEmbeddings.jl can only be performed on PeriodicGraphEmbedding3D.
PeriodicGraphEmbeddings.PeriodicGraphEmbedding3D — TypePeriodicGraphEmbedding3DAlias for PeriodicGraphEmbedding{3}
PeriodicGraphEmbeddings.PeriodicGraphEmbedding — MethodPeriodicGraphEmbedding{D,T}(graph::PeriodicGraph{D}, placement::AbstractMatrix{T}, cell::Cell=Cell()) where {D,T}
PeriodicGraphEmbedding{D}(graph::PeriodicGraph{D}, placement::AbstractMatrix{T}, cell::Cell=Cell()) where D
PeriodicGraphEmbedding(graph::PeriodicGraph{D}, placement::AbstractMatrix{T}, cell::Cell=Cell())Build a PeriodicGraphEmbedding{D,T} from the corresponding graph and placement of the vertices, such that each vertex has its fractional coordinate represented in a column of the matrix.
Coordinates out of [0, 1) are translated back to the unit cell with the corresponding offset added to the graph.
The cell optional argument will not be used if D > 3.
This function modifies the input graph if any element of placement is out of [0, 1).
To obtain a PeriodicGraphEmbedding with sorted positions, use SortedPeriodicGraphEmbedding instead
PeriodicGraphEmbeddings.SortedPeriodicGraphEmbedding — TypeSortedPeriodicGraphEmbedding{T}Constructor for PeriodicGraphEmbedding{D,T} where D with sorted positions.
PeriodicGraphEmbeddings.SortedPeriodicGraphEmbedding — MethodSortedPeriodicGraphEmbedding{T}(graph::PeriodicGraph{D}, placement::AbstractMatrix, cell::Cell=Cell()) where {D,T}Build a PeriodicGraphEmbedding{D,T} from the corresponding graph and placement of the vertices, so that the result has its vertices sorted by position.
Return the PeriodicGraphEmbedding as well as the permutation of the columns of placement that yielded the resulting order on the vertices.
The cell optional argument will not be used if D > 3.
This function modifies the input graph if any element of placement is out of [0, 1).
See also PeriodicGraphEmbedding{D,T}(graph, placement::AbstractMatrix{T}, cell) where {D,T} and SortedPeriodicGraphEmbedding(graph, placement::AbstractMatrix, cell).
SortedPeriodicGraphEmbedding(graph::PeriodicGraph{D}, placement::AbstractMatrix, cell::Cell=Cell()) where DBuild a PeriodicGraphEmbedding{D,T} from the corresponding graph and placement of the vertices, so that the result has its vertices sorted by position. T is determined as the smallest type between Rational{Int32}, Rational{Int64}, Rational{Int128} and Rational{BigInt} that can fit all the elements of placement with some additional margin.
Return the PeriodicGraphEmbedding as well as the permutation of the columns of placement that yielded the resulting order on the vertices.
The cell optional argument will not be used if D > 3.
This function modifies the input graph if any element of placement is out of [0, 1).
This function is inherently type-unstable since T cannot be statically determined. This can be useful because having a too large T may slow down later computations.
To provide the parameter explicitly, pass it to the SortedPeriodicGraphEmbedding constructor by calling SortedPeriodicGraphEmbedding{T}(graph, placement, cell).
See also PeriodicGraphEmbedding{D,T}(graph, placement::AbstractMatrix{T}, cell) where {D,T}.
PeriodicGraphEmbeddings.PeriodicGraphEmbedding — MethodPeriodicGraphEmbedding{D,T}(pge::PeriodicGraphEmbedding{N,S}) where {D,T,N,S}
PeriodicGraphEmbedding{D}(pge::PeriodicGraphEmbedding{N,S}) where {D,N,S}Return a PeriodicGraphEmbedding{D,T} with the same structural information as the input pge but embedded in D dimensions instead of N.
If T is not provided it defaults to S.
The same caveats that apply to PeriodicGraph{D}(graph::PeriodicGraph{N}) are valid here: namely, the dimensionality of the graph should be at least D and the behaviour is undefined if D < N and there are multiple non-identical connected components.
Moreover, if D < N, the N-D last coordinates of all vertices must be zero or this function will error.
Cell API
PeriodicGraphEmbeddings.Cell — TypeCell{T}Representation of a periodic cell in 3D. Contains information about the cell (axes lengths and angles) and its symmetry group, through its Hall number.
See PeriodicGraphEmbeddings.SPACE_GROUP_HALL, PeriodicGraphEmbeddings.SPACE_GROUP_FULL, PeriodicGraphEmbeddings.SPACE_GROUP_HM and PeriodicGraphEmbeddings.SPACE_GROUP_IT for the correspondance between Hall number and usual symbolic representations.
PeriodicGraphEmbeddings.cell_parameters — Functioncell_parameters(cell::Cell)Return ((lengths, angles), mat) where mat is the matrix of the cell in upper triangular format, lengths is the triplet (a, b, c) of lengths of the three axes, and angles is the triplet (α, β, γ) of angles between them.
PeriodicGraphEmbeddings.EquivalentPosition — TypeEquivalentPosition{T}Representation of a symmetry operation in 3D, defined by a matrix multiplication and addition.
Example
julia> eq = parse(EquivalentPosition, "1-x, z, y+1/2")
-x+1,z,y+1/2
julia> eq([1//3, 0, 1//4])
3-element StaticArrays.SVector{3, Rational{Int64}} with indices SOneTo(3):
2//3
1//4
1//2The type parameter T is the numeric type used to store the symmetry operations. It should be typically either Rational{Int} or Float64.
Missing docstring for Base.parse(::Type{EquivalentPosition}, s::AbstractString). Check Documenter's build log for details.
PeriodicGraphEmbeddings.find_refid — Functionfind_refid(eqs)Find the reference identifiers for the three dimensions for the CIF group called symmetry_equiv_pos_as_xyz or space_group_symop_operation_xyz. Usually this is simply ("x", "y", "z").