# Orbital tools

`ElemCo.OrbTools`

— Module`OrbTools`

A 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.load_orbitals`

— Function`load_orbitals(EC::ECInfo, orbsfile::String="")`

Load (last) orbitals.

- from file
`orbsfile`

if not empty - from file
`WfOptions.orb`

if not empty - error if all files are empty

Returns `::MOs`

.

`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.rotate_orbs`

— Function`rotate_orbs(EC::ECInfo, orb1, orb2, angle=90; spin::Symbol=:α)`

Rotate orbitals `orb1`

and `orb2`

from `WfOptions.orb`

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.orb`

with respect to the atomic orbitals.

`range`

is a range of molecular orbitals to be printed.

## Internal functions

`ElemCo.OrbTools.guess_hcore`

— Method`guess_hcore(EC::ECInfo)`

Guess MO coefficients from core Hamiltonian.

`ElemCo.OrbTools.guess_sad`

— Method`guess_sad(EC::ECInfo)`

Guess MO coefficients from atomic densities.