---
name: "sc_CLSCF"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_CLSCF"
---

# sc\_CLSCF(3)

The CLSCF class is a base for classes implementing a self-consistent procedure for closed-shell molecules.

## NAME

sc::CLSCF - The **CLSCF** class is a base for classes implementing a self-consistent procedure for closed-shell molecules.

## SYNOPSIS

`#include <clscf.h>`

Inherits **sc::SCF**.

Inherited by **sc::CLHF**, and **sc::CLKS**.

### Public Member Functions

**CLSCF** (**StateIn** &)\
 **CLSCF** (const **Ref**\< **KeyVal** \> &)\
 The **KeyVal** constructor:  void **save\_data\_state** (**StateOut** &)\
 Save the base classes (with save\_data\_state) and the members in the same order that the **StateIn** CTOR initializes them.  void **print** (std::ostream &o=**ExEnv::out0**()) const\
 Print information about the object.  double **occupation** (int irrep, int vectornum)\
 Returns the occupation.  int **n\_fock\_matrices** () const\
 **RefSymmSCMatrix** **fock** (int i)\
 Returns closed-shell Fock matrix in AO basis (excluding XC contribution in KS DFT).  **RefSymmSCMatrix** **effective\_fock** ()\
 Returns closed-shell Fock matrix in MO basis (including XC contribution for KS DFT).  **RefSymmSCMatrix** **density** ()\
 Returns the **SO** density.  void **symmetry\_changed** ()\
 Call this if you have changed the molecular symmetry of the molecule contained by this **MolecularEnergy**.  int **spin\_polarized** ()\
 Return 1 if the alpha density is not equal to the beta density.

### Protected Member Functions

void **set\_occupations** (const **RefDiagSCMatrix** &evals)\
 void **init\_vector** ()\
 void **done\_vector** ()\
 void **reset\_density** ()\
 double **new\_density** ()\
 double **scf\_energy** ()\
 **Ref**\< **SCExtrapData** \> **extrap\_data** ()\
 void **init\_gradient** ()\
 void **done\_gradient** ()\
 **RefSymmSCMatrix** **lagrangian** ()\
 **RefSymmSCMatrix** **gradient\_density** ()\
 void **init\_hessian** ()\
 void **done\_hessian** ()\
 void **two\_body\_deriv\_hf** (double \*grad, double exchange\_fraction)\

### Protected Attributes

**Ref**\< **PointGroup** \> **most\_recent\_pg\_**\
 int **user\_occupations\_**\
 int **tndocc\_**\
 int **nirrep\_**\
 int \* **initial\_ndocc\_**\
 int \* **ndocc\_**\
 **ResultRefSymmSCMatrix** **cl\_fock\_**\
 **RefSymmSCMatrix** **cl\_dens\_**\
 **RefSymmSCMatrix** **cl\_dens\_diff\_**\
 **RefSymmSCMatrix** **cl\_gmat\_**\

### Additional Inherited Members

## Detailed Description

The **CLSCF** class is a base for classes implementing a self-consistent procedure for closed-shell molecules.

## Constructor & Destructor Documentation

### sc::CLSCF::CLSCF (const Ref\< KeyVal \> &)

The **KeyVal** constructor:

- `total_charge`

  This floating point number gives the total charge of the molecule. The default is 0.

- `docc`

  This vector of integers gives the total number of doubly occupied orbitals of each irreducible representation. By default, this will be chosen to make the molecule uncharged and the electrons will be distributed among the irreducible representations according to the orbital energies.

## Member Function Documentation

### RefSymmSCMatrix sc::CLSCF::density ()` [virtual]`

Returns the **SO** density.

Implements **sc::Wavefunction**.

### void sc::CLSCF::done\_gradient ()` [protected]`, ` [virtual]`

Implements **sc::SCF**.

### void sc::CLSCF::done\_hessian ()` [protected]`, ` [virtual]`

Implements **sc::SCF**.

### void sc::CLSCF::done\_vector ()` [protected]`, ` [virtual]`

Implements **sc::SCF**.

### RefSymmSCMatrix sc::CLSCF::effective\_fock ()` [virtual]`

Returns closed-shell Fock matrix in MO basis (including XC contribution for KS DFT).

Implements **sc::SCF**.

### Ref\< SCExtrapData \> sc::CLSCF::extrap\_data ()` [protected]`, ` [virtual]`

Implements **sc::SCF**.

### RefSymmSCMatrix sc::CLSCF::fock (int i)` [virtual]`

Returns closed-shell Fock matrix in AO basis (excluding XC contribution in KS DFT). Use **effective\_fock()** if you want the full KS Fock matrix. Argument i must be 0.

Implements **sc::SCF**.

### RefSymmSCMatrix sc::CLSCF::gradient\_density ()` [protected]`, ` [virtual]`

Implements **sc::SCF**.

### void sc::CLSCF::init\_gradient ()` [protected]`, ` [virtual]`

Implements **sc::SCF**.

### void sc::CLSCF::init\_hessian ()` [protected]`, ` [virtual]`

Implements **sc::SCF**.

### void sc::CLSCF::init\_vector ()` [protected]`, ` [virtual]`

Implements **sc::SCF**.

### RefSymmSCMatrix sc::CLSCF::lagrangian ()` [protected]`, ` [virtual]`

Implements **sc::SCF**.

### int sc::CLSCF::n\_fock\_matrices () const` [virtual]`

Implements **sc::SCF**.

### double sc::CLSCF::new\_density ()` [protected]`, ` [virtual]`

Implements **sc::SCF**.

### double sc::CLSCF::occupation (int irrep, int vectornum)` [virtual]`

Returns the occupation. The irreducible representation and the vector number within that representation are given as arguments.

Implements **sc::OneBodyWavefunction**.

### void sc::CLSCF::print (std::ostream & = ExEnv::out0`()`) const` [virtual]`

Print information about the object.

Reimplemented from **sc::MolecularEnergy**.

### void sc::CLSCF::reset\_density ()` [protected]`, ` [virtual]`

Implements **sc::SCF**.

### void sc::CLSCF::save\_data\_state (StateOut &)` [virtual]`

Save the base classes (with save\_data\_state) and the members in the same order that the **StateIn** CTOR initializes them. This must be implemented by the derived class if the class has data.

Reimplemented from **sc::MolecularEnergy**.

### double sc::CLSCF::scf\_energy ()` [protected]`, ` [virtual]`

Implements **sc::SCF**.

### void sc::CLSCF::set\_occupations (const RefDiagSCMatrix & evals)` [protected]`, ` [virtual]`

Implements **sc::SCF**.

### int sc::CLSCF::spin\_polarized ()` [virtual]`

Return 1 if the alpha density is not equal to the beta density.

Implements **sc::Wavefunction**.

### void sc::CLSCF::symmetry\_changed ()` [virtual]`

Call this if you have changed the molecular symmetry of the molecule contained by this **MolecularEnergy**.

Reimplemented from **sc::MolecularEnergy**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
