# 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.is_unrestricted_MO`

— Method`is_unrestricted_MO(cMO)`

Return `true`

if `cMO`

is unrestricted MO coefficients of the form [CMOα, CMOβ].

`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

`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::AbstractArray, orb1, orb2, angle=90)`

Rotate orbitals `orb1`

and `orb2`

from `cMO`

by `angle`

degrees.

`cMO`

is a matrix of MO coefficients.

## 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.