Orbital tools
ElemCo.OrbTools — Module
OrbToolsA collection of tools for working with orbitals
Exported functions
ElemCo.OrbTools.guess_orb — Method
guess_orb(EC::ECInfo, guess::Symbol)Calculate starting guess for MO coefficients. Type of initial guess for MO coefficients is given by guess.
See ScfOptions.guess for possible values.
ElemCo.OrbTools.guess_pos_orb — Method
guessposorb(EC::ECInfo, guess::Symbol)
Calculate starting guess for MO positron coefficients. Type of initial guess for MO coefficients is given by guess.
See ScfOptions.guess for possible values.
ElemCo.OrbTools.left_from_right_rotations — Method
left_from_right_rotations(cMOr::SpinMatrix)Calculate left biorthogonal rotation coefficients from right BO coefficients.
ElemCo.OrbTools.load_left_right_rotations — Method
load_left_right_rotations(EC::ECInfo) -> (left::SpinMatrix, right::SpinMatrix)Load (last) left and right orbital rotations from file WfOptions.dump.
If the type of the rotations does not contain the word biorthogonal, the same rotation is returned for left and right (can be checked with ===).
ElemCo.OrbTools.load_orbitals — Method
load_orbitals(EC::ECInfo; start::Bool=false)Load (last) orbitals from file WfOptions.dump.
If start=true, load from wf.start instead. If the basis has changed, the orbitals will be projected onto the new basis. Returns ::SpinMatrix.
ElemCo.OrbTools.load_positron_orbitals — Method
load_positron_orbitals(EC::ECInfo)Load (last) positron orbitals from file WfOptions.dump.
Returns ::SpinMatrix.
ElemCo.OrbTools.load_rotations — Method
load_rotations(EC::ECInfo)Load (last) orbital rotations from file WfOptions.dump.
Returns ::SpinMatrix.
ElemCo.OrbTools.normalize_phase! — Method
normalize_phase!(cMO)Normalize the phase of the MO coefficients in cMO.
The phase is chosen such that the first largest coefficient is positive.
ElemCo.OrbTools.orbital_energies — Function
orbital_energies(EC::ECInfo, spincase::Symbol=:α)Return orbital energies for a given spincase∈{:α,:β}.
ElemCo.OrbTools.project_onto_basis — Method
project_onto_basis(cMO::SpinMatrix, old_basis::BasisSet, new_basis::BasisSet; check=false)Project the MO coefficients onto a new basis.
If check is true, the function will check whether the projection is needed and return the same array cMO if it is not (i.e., it can be checked with ===).
ElemCo.OrbTools.rotate_orbs — Function
rotate_orbs(EC::ECInfo, orb1, orb2, angle=90; spin::Symbol=:α)Rotate orbitals orb1 and orb2 from WfOptions.dump by angle degrees. For unrestricted orbitals, spin can be :α or :β.
ElemCo.OrbTools.rotate_orbs! — Function
rotate_orbs!(cMO::Matrix, orb1, orb2, angle=90)Rotate orbitals orb1 and orb2 from cMO by angle degrees.
cMO is a matrix of MO coefficients.
ElemCo.OrbTools.show_orbitals — Function
show_orbitals(EC::ECInfo, cMO::Matrix, basis::BasisSet, range=1:size(cMO,2)Print the MO coefficients in cMO with respect to the atomic orbitals in basis.
range is a range of molecular orbitals to be printed.
ElemCo.OrbTools.show_orbitals — Function
show_orbitals(EC::ECInfo, range=nothing)Print the MO coefficients in WfOptions.dump with respect to the atomic orbitals.
range is a range of molecular orbitals to be printed.
ElemCo.OrbTools.try_load_starting_orbitals — Method
try_load_starting_orbitals(EC::ECInfo) -> (SpinMatrix, Bool)Try to load starting orbitals from wf.start file.
If wf.start is set, load and project orbitals from that file.
Returns (cMO, loaded) where loaded indicates if orbitals were successfully loaded. If no orbitals are available, returns (SpinMatrix{Float64}(), false).
Internal functions
ElemCo.OrbTools.guess_hcore — Method
guess_hcore(EC::ECInfo)Guess MO coefficients from core Hamiltonian.
ElemCo.OrbTools.guess_pos_hcore — Method
guess_pos_hcore(EC::ECInfo)Guess MO coefficients for positron from core Hamiltonian.
ElemCo.OrbTools.guess_positron — Method
guess_positron(EC::ECInfo)Initialize positron MO coefficients as zeroes.
ElemCo.OrbTools.guess_sad — Method
guess_sad(EC::ECInfo)Guess MO coefficients from atomic densities.