# Driver for conventional coupled-cluster methods

`ElemCo.CCDriver`

— Module`CCDriver`

Module for coupled-cluster drivers.

The `CCDriver`

module contains the main driver routines for running coupled-cluster calculations.

## Exported functions

`ElemCo.CCDriver.ccdriver`

— Method`ccdriver(EC::ECInfo, method; fcidump="", occa="-", occb="-")`

Run electronic structure calculation for `EC::ECInfo`

using `method::String`

.

The integrals are read from `fcidump::String`

. If `fcidump::String`

is empty, the integrals from `EC.fd`

are used. The occupied α orbitals are given by `occa::String`

(default: "-"). The occupied β orbitals are given by `occb::String`

(default: "-"). If `occb::String`

is empty, the occupied β orbitals are the same as the occupied α orbitals (closed-shell case). The occupation strings can be given as a `+`

separated list, e.g. `occa = 1+2+3`

or equivalently `1-3`

. Additionally, the spatial symmetry of the orbitals can be specified with the syntax `orb.sym`

, e.g. `occa = "-5.1+-2.2+-4.3"`

.

`ElemCo.CCDriver.dfccdriver`

— Method`dfccdriver(EC::ECInfo, method)`

Run electronic structure calculation for `EC::ECInfo`

using `method::String`

.

The integrals are calculated using density fitting.

## Internal functions

`ElemCo.CCDriver.check_fcidump`

— Method`check_fcidump(EC::ECInfo, fcidump)`

Read the integrals from `fcidump`

if it is not empty.

`ElemCo.CCDriver.check_occs`

— Method`check_occs(EC::ECInfo, occa, occb)`

Check the occupation strings `occa`

and `occb`

and set the corresponding options in `WfOptions`

. Return the previous values of `occa`

and `occb`

.

`ElemCo.CCDriver.checkset_unrestricted_closedshell!`

— Method`checkset_unrestricted_closedshell!(ecmethod::ECMethod, closed_shell, unrestricted)`

Check if the method is unrestricted/closed-shell and if necessary set the corresponding options in `ECMethod`

. Return `closed_shell_method::Bool`

.

`ElemCo.CCDriver.eval_cc_groundstate`

— Method`eval_cc_groundstate(EC::ECInfo, ecmethod::ECMethod, energies::NamedTuple; save_pert_t3=false)`

Evaluate the coupled-cluster ground-state energy for the integrals in `EC.fd`

. Fock matrix and HF energy must be calculated before. Return the updated `energies::NamedTuple`

with the correlation energy (`method*"c"`

) and the total energy (field `method`

) (with `-`

in `method`

replaced by `_`

).

`ElemCo.CCDriver.eval_df_mo_integrals`

— Method`eval_df_mo_integrals(EC::ECInfo, energies::NamedTuple)`

Evaluate the density-fitted integrals in MO basis and store in the correct file.

Return the reference energy as `HF`

field in NamedTuple and `true`

if the integrals are calculated using unresctricted orbitals.

`ElemCo.CCDriver.eval_dfcc_groundstate`

— Method`eval_dfcc_groundstate(EC::ECInfo, ecmethod::ECMethod, energies::NamedTuple)`

Evaluate the coupled-cluster ground-state energy for the DF integrals, which have to be calculated before. Return the updated `energies::NamedTuple`

with the correlation energy (`method*"c"`

) and the total energy (field `method`

) (with `-`

in `method`

replaced by `_`

).

`ElemCo.CCDriver.eval_hf_energy`

— Method`eval_hf_energy(EC::ECInfo, energies::NamedTuple, closed_shell)`

Evaluate the Hartree-Fock energy for the integrals in `EC.fd`

. Return the updated `energies::NamedTuple`

with the Hartree-Fock energy (field `HF`

).

`ElemCo.CCDriver.eval_mp2_energy`

— Method`eval_mp2_energy(EC::ECInfo, energies::NamedTuple, closed_shell, restricted)`

Evaluate the MP2 energy for the integrals in `EC.fd`

. Fock matrix and HF energy must be calculated before. Return the updated `energies::NamedTuple`

with same-spin(`MP2SS`

), opposite-spin(`MP2OS`

), open-shell(`MP2O`

) components, SCS-MP2 energy (`SCSMP2`

), correlation energy (`MP2c`

) and the MP2 energy (field `MP2`

).

`ElemCo.CCDriver.eval_svd_dc_ccsdt`

— Method`eval_svd_dc_ccsdt(EC::ECInfo, ecmethod::ECMethod, energies::NamedTuple)`

Evaluate the coupled-cluster ground-state energy for the integrals in `EC.fd`

using SVD-Triples. Fock matrix and HF energy must be calculated before. Return the updated `energies::NamedTuple`

with the correlation energy (`method*"c"`

) and the total energy (field `method`

) (with `-`

in `method`

replaced by `_`

).

`ElemCo.CCDriver.output_2d_energy`

— Method`output_2d_energy(EC::ECInfo, En, energies::NamedTuple, method; print=true)`

Print the energy components for 2D methods and return the updated `energies::NamedTuple`

with singlet(`"SING"*method`

), triplet(`"TRIP"*method`

), singlet correlation(`"SING"*method*"c"`

) and triplet correlation(`"TRIP"*method*"c"`

) components (with `-`

in `method`

replaced by `_`

).

`ElemCo.CCDriver.output_energy`

— Method`output_energy(EC::ECInfo, En::NamedTuple, energies::NamedTuple, mname; print=true)`

Print the energy components and return the updated `energies::NamedTuple`

with correction to the correlation energy (`mname*"correction"`

, e.g., ΔMP2, if available), same-spin(`mname*"SS"`

), opposite-spin(`mname*"OS"`

), open-shell(`mname*"O"`

) components, SCS energy (`"SCS"*mname`

), correlation energy (`mname*"c"`

) and the total energy (field `mname`

) (with `-`

in `mname`

replaced by `_`

).