Orbital tools

Exported functions

ElemCo.OrbTools.load_left_right_rotationsMethod
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 ===).

source
ElemCo.OrbTools.load_orbitalsMethod
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.

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

source
ElemCo.OrbTools.project_onto_basisMethod
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 ===).

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

source
ElemCo.OrbTools.show_orbitalsFunction
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.

source
ElemCo.OrbTools.try_load_starting_orbitalsMethod
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).

source

Internal functions