Structure
Contents
Index
DFControl.Structures.Atom
DFControl.Structures.DFTU
DFControl.Structures.Element
DFControl.Structures.Orbital
DFControl.Structures.Projection
DFControl.Structures.Structure
Base.getindex
DFControl.Structures.a
DFControl.Structures.b
DFControl.Structures.c
DFControl.Structures.cell_parameters
DFControl.Structures.create_supercell
DFControl.Structures.element
DFControl.Structures.high_symmetry_kpath
DFControl.Structures.high_symmetry_kpoints
DFControl.Structures.international
DFControl.Structures.niggli_reduce
DFControl.Structures.polyhedron
DFControl.Structures.scale_cell!
DFControl.Structures.set_position!
DFControl.Structures.symmetry_operators
DFControl.Structures.update_geometry!
DFControl.Structures.volume
DFControl.Structures.Structure
— TypeStructure(cell::Mat3, atoms::Vector{Atom})
The structure on which the Calculations
will be performed.
Structure(cif_file::String)
Creates a Structure
from the supplied cif file.
Base.getindex
— Methodgetindex(structure::Structure, i::Int)
getindex(structure::Structure, name::Symbol)
getindex(structure::Structure, el::Element)
Returns the i
th atom in structure
, or all atoms with name
or are of element el
.
DFControl.Structures.update_geometry!
— Functionupdate_geometry!(str1::Structure, str2::Structure)
Updates the spatial parameters of the atoms
and cell
of the first structure to those found in the second.
DFControl.Structures.polyhedron
— Functionpolyhedron(at::Atom, atoms::Vector{Atom}, order::Int)
polyhedron(at::Atom, str::Structure, order::Int)
Returns a polyhedron around the atom, i.e. the order
closest atoms. The returned atoms will be ordered according to their distance to the first one. In the case of a structure rather than a set of atoms, the search will be performed over all atoms in the structure.
Symmetries
This functionality relies on spglib
to find the symmetries of the Structure
and supply various related quantities.
DFControl.Structures.high_symmetry_kpath
— Functionhigh_symmetry_kpath(s::Structure, npoints_per_segment::Int; package=QE, kwargs...)
Generates a QE bands calculation compliant high symmetry kpath, to be used with e.g. set_kpoints!(bands_calculation, kpoints)
.
DFControl.Structures.high_symmetry_kpoints
— Functionhigh_symmetry_kpoints(s::Structure; tolerance = 1e-5)
Returns (kpoints, path)
where kpoints
are the high-symmetry k-points, and path
are the sections of the high symmetry path through the first Brillouin Zone.
DFControl.Structures.international
— Functioninternational(s::Structure; tolerance=1.0e-5)
Returns the international symbol of the space group of the structure.
DFControl.Structures.niggli_reduce
— Functionniggli_reduce(s::Structure; tolerance=1.0e-5)
Returns the niggli reduced Structure
.
DFControl.Structures.symmetry_operators
— Functionsymmetry_operators(s::Structure; maxsize=52, tolerance=1.0e-5)
Finds and returns all the rotations and translations that are symmetry operators of the structure.
Cell
The lattice vectors are stored as the columns of the cell
.
DFControl.Structures.a
— Functiona(str::Structure)
First lattice vector.
DFControl.Structures.b
— Functionb(str::Structure)
Second lattice vector.
DFControl.Structures.c
— Functionc(str::Structure)
Third lattice vector.
DFControl.Structures.cell_parameters
— Functioncell_parameters(cell::Mat3)
cell_parameters(str::Structure)
Parameters (a, b, c, α, β, γ)
of the calculation cell returned in a NamedTuple
.
DFControl.Structures.volume
— Functionvolume(cell::Mat3)
volume(str::Structure)
Calculates the volume for the unit cell.
DFControl.Structures.create_supercell
— Functioncreate_supercell(structure::Structure, na::Int, nb::Int, nc::Int; make_afm=false)
create_supercell(structure::Structure, na::UnitRange, nb::UnitRange, nc::UnitRange; make_afm=false)
Takes a structure and creates a supercell from it with: the given amount of additional cells if (na::Int, nb::Int, nc::Int
) along the a, b, c direction, or amount of cells specified by the ranges i.e. -1:1, -1:1, -1:1
would create a 3x3x3 supercell. If make_afm
is set to true
all the labels and magnetizations of the magnetic atoms will be reversed in a checkerboard fashion.
DFControl.Structures.scale_cell!
— Functionscale_cell!(structure::Structure, scalemat::Matrix)
Rescales the cell of the structure
.
Atom
DFControl.Structures.Atom
— TypeAtom(name::Symbol, element::Element, position_cart::Point3{Length}, position_cryst::Point3;
pseudo::String = "",
projections::Vector{Projection} = Projection[],
magnetization::Vec3 = Vec3(0.0, 0.0, 0.0),
dftu::DFTU = DFTU())
Representation of an atom
.
The name
of the atom
is used as an identifier for the atom
type, in the sense that atoms with the same pseudo
, projections
, magnetization
and dftu
attributes should belong to the same type. This also means that during sanity checks atoms that are not of the same type will be given different names. This is done in this way because it often makes sense to change these parameters on all atoms of the same kind at the same time, but still allow the flexibility to change them for individual atoms as well.
position_cart
should have a valid Unitful.Length
type such as Ang
.
See documentation for Element
for further information on this attribute.
DFControl.Structures.set_position!
— Functionset_position!(at::Atom, pos::AbstractVector{T}, unit_cell::Mat3) where {T<:Real}
Updates the position of the atom to this. The unit cell is used to make sure both position_cryst
and position_cart
are correct.
Element
DFControl.Structures.Element
— TypeElement(symbol::Symbol, Z::Int, name::String, atomic_weight::Float64, color::NTuple{3, Float64})
Represents an element. Most conveniently used trough the function element
.
DFControl.Structures.element
— Functionelement(sym::Symbol)
Returns the predefined Element
with symbol sym
, i.e. element(:Si)
will return the pregenerated Silicon Element
.
Pseudo Potentials
Missing docstring for set_pseudos!
. Check Documenter's build log for details.
Missing docstring for configure_pseudoset
. Check Documenter's build log for details.
Missing docstring for list_pseudosets
. Check Documenter's build log for details.
See the section on Configuration for a demonstration on how to set up pseudopotential sets.
Magnetization
Magnetization can be set on a per Atom
basis. It will partially determine the unique Atom
types and also what calculation flags should be set in order to allow for the magnetic calculation (either colinear or non-colinear).
Projections
These projections will mainly be used for generating Wannier90 inputs, and to distinguish which indices in the Wannier90 output matrices correspond to the various atoms/orbitals.
DFControl.Structures.Projection
— TypeProjection(orbital::Orbital, start::Int, last::Int)
A Wannier90 Projection
, representing an Orbital
with indices from start
to last
.
Orbitals
DFControl.Structures.Orbital
— TypeOrbital(name::String, size::Int, l::Int, mr::Int)
Wannier90 orbital as defined in the Wannier90 User Guide. The name
will be written in the projections
block of the Wannier90 input.
DFT + U
DFControl.Structures.DFTU
— TypeDFTU(;l ::Int = -1,
U ::T = zero(T),
J0::T = zero(T),
α ::T = zero(T),
β ::T = zero(T),
J ::Vector{T} = T[zero(T)])
DFT+U parameters for a given Atom
.