forte2.scf.scf_base#

Module Contents#

class forte2.scf.scf_base.SCFBase#

Bases: abc.ABC, forte2.base_classes.mixins.SystemMixin, forte2.base_classes.mixins.MOsMixin

Abstract base class for SCF calculations.

Parameters:
chargeint

Charge of the system.

do_diisbool, optional, default=True

Whether to perform DIIS acceleration.

diis_startint, optional, default=1

Which iteration to start collecting DIIS error vectors.

diis_nvecint, optional, default=8

How many DIIS error vectors to keep.

diis_minint, optional, default=2

Minimum number of DIIS vectors to perform extrapolation.

e_tolfloat, optional, default=1e-9

Energy convergence tolerance.

d_tolfloat, optional, default=1e-6

RMS density change convergence tolerance.

maxiterint, optional, default=100

Maximum iteration for SCF.

guess_typestr, optional, default=”minao”

Initial guess type for the SCF calculation. Can be “minao” (SAP) or “hcore”.

level_shiftfloat, optional

Level shift for the SCF calculation. If None, no level shift is applied.

level_shift_threshfloat, optional, default=1e-5

If energy change is below this threshold, level shift is turned off.

die_if_not_convergedbool, optional, default=True

Whether to raise an error if the SCF calculation does not converge.

Attributes:
Clist[NDArray]

The MO coefficients.

Dlist[NDArray]

The density matrices.

Efloat

The total energy of the system.

Flist[NDArray]

The Fock matrices.

epslist[NDArray]

The orbital energies.

Raises:
RuntimeError

If the SCF calculation does not converge within the maximum number of iterations.

charge: int#
do_diis: bool = True#
diis_start: int = 1#
diis_nvec: int = 8#
diis_min: int = 2#
e_tol: float = 1e-09#
d_tol: float = 1e-06#
maxiter: int = 100#
guess_type: str = 'minao'#
level_shift: float = None#
level_shift_thresh: float = 1e-05#
die_if_not_converged: bool = True#
executed: bool = False#
converged: bool = False#
run()#

Run the SCF calculation.

Returns:
selfSCFBase

The SCF object.