Structure

Contents

Index

Base.getindexMethod
getindex(structure::Structure, i::Int)
getindex(structure::Structure, name::Symbol)
getindex(structure::Structure, el::Element)

Returns the ith atom in structure, or all atoms with name or are of element el.

source
DFControl.Structures.polyhedronFunction
polyhedron(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.

source

Symmetries

This functionality relies on spglib to find the symmetries of the Structure and supply various related quantities.

DFControl.Structures.high_symmetry_kpathFunction
high_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).

source
DFControl.Structures.high_symmetry_kpointsFunction
high_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.

source

Cell

Note

The lattice vectors are stored as the columns of the cell.

DFControl.Structures.create_supercellFunction
create_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.

source

Atom

DFControl.Structures.AtomType
Atom(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.

source
DFControl.Structures.set_position!Function
set_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.

source

Element

DFControl.Structures.ElementType
Element(symbol::Symbol, Z::Int, name::String, atomic_weight::Float64, color::NTuple{3, Float64})

Represents an element. Most conveniently used trough the function element.

source

Pseudo Potentials

Missing docstring.

Missing docstring for set_pseudos!. Check Documenter's build log for details.

Missing docstring.

Missing docstring for configure_pseudoset. Check Documenter's build log for details.

Missing docstring.

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.

Orbitals

DFT + U

DFControl.Structures.DFTUType
DFTU(;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.

source