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

# sc\_HSOSSCF(3)

The HSOSSCF class is a base for classes implementing a self-consistent procedure for high-spin open-shell molecules.

## NAME

sc::HSOSSCF - The **HSOSSCF** class is a base for classes implementing a self-consistent procedure for high-spin open-shell molecules.

## SYNOPSIS

`#include <hsosscf.h>`

Inherits **sc::SCF**.

Inherited by **sc::HSOSHF**, and **sc::HSOSKS**.

### Public Member Functions

**HSOSSCF** (**StateIn** &)\
 **HSOSSCF** (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.  double **alpha\_occupation** (int irrep, int vectornum)\
 Returns the alpha occupation.  double **beta\_occupation** (int irrep, int vectornum)\
 Returns the beta occupation.  int **n\_fock\_matrices** () const\
 **RefSymmSCMatrix** **fock** (int i)\
 Returns closed-shell (i==0) or open-shell (i==1) Fock matrix in AO basis (excluding XC contribution in KS DFT).  **RefSymmSCMatrix** **effective\_fock** ()\
 Returns effective Fock matrix in MO basis (including XC contribution for KS DFT).  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.  **RefSymmSCMatrix** **density** ()\
 Returns the **SO** density.  **RefSymmSCMatrix** **alpha\_density** ()\
 Return alpha electron densities in the **SO** basis.  **RefSymmSCMatrix** **beta\_density** ()\
 Return beta electron densities in the **SO** basis.

### 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 **tnsocc\_**\
 int **nirrep\_**\
 int \* **initial\_ndocc\_**\
 int \* **initial\_nsocc\_**\
 int \* **ndocc\_**\
 int \* **nsocc\_**\
 **ResultRefSymmSCMatrix** **cl\_fock\_**\
 **ResultRefSymmSCMatrix** **op\_fock\_**\
 **RefSymmSCMatrix** **cl\_dens\_**\
 **RefSymmSCMatrix** **cl\_dens\_diff\_**\
 **RefSymmSCMatrix** **cl\_gmat\_**\
 **RefSymmSCMatrix** **op\_dens\_**\
 **RefSymmSCMatrix** **op\_dens\_diff\_**\
 **RefSymmSCMatrix** **op\_gmat\_**\
 **RefSymmSCMatrix** **cl\_hcore\_**\

### Additional Inherited Members

## Detailed Description

The **HSOSSCF** class is a base for classes implementing a self-consistent procedure for high-spin open-shell molecules.

## Constructor & Destructor Documentation

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

The **KeyVal** constructor.

- `total_charge`

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

- `nsocc`

  This integer gives the total number of singly occupied orbitals, $n\_thrm{socc}$. If this is not given, then multiplicity will be read.

- `multiplicity`

  This integer gives the multiplicity, $m$, of the molecule. The number of singly occupied orbitals is then $n\_thrm{socc} = m - 1$. If neither nsocc nor multiplicity is given, then if, in consideration of total\_charge, the number of electrons is even, the default $n\_thrm{socc}$ is 2. Otherwise, it is 1.

- `ndocc`

  This integer gives the total number of doubly occupied orbitals $n\_thrm{docc}$. The default $n\_thrm{docc} = (c - n\_thrm{socc})/2$.

- `socc`

  This vector of integers gives the total number of singly occupied orbitals of each irreducible representation. By default, the $n\_thrm{socc}$ singly occupied orbitals will be distributed according to orbital eigenvalues. If socc is given, then docc must be given and they override nsocc, multiplicity, ndocc, and total\_charge.

- `docc`

  This vector of integers gives the total number of doubly occupied orbitals of each irreducible representation. By default, the $n\_thrm{docc}$ singly occupied orbitals will be distributed according to orbital eigenvalues. If docc is given, then socc must be given and they override nsocc, multiplicity, ndocc, and total\_charge.

- `maxiter`

  This has the same meaning as in the parent class, **SCF**; however, the default value is 100.

- `level_shift`

  This has the same meaning as in the parent class, **SCF**; however, the default value is 1.0.

## Member Function Documentation

### RefSymmSCMatrix sc::HSOSSCF::alpha\_density ()` [virtual]`

Return alpha electron densities in the **SO** basis.

Reimplemented from **sc::Wavefunction**.

### double sc::HSOSSCF::alpha\_occupation (int irrep, int vectornum)` [virtual]`

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

Reimplemented from **sc::OneBodyWavefunction**.

### RefSymmSCMatrix sc::HSOSSCF::beta\_density ()` [virtual]`

Return beta electron densities in the **SO** basis.

Reimplemented from **sc::Wavefunction**.

### double sc::HSOSSCF::beta\_occupation (int irrep, int vectornum)` [virtual]`

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

Reimplemented from **sc::OneBodyWavefunction**.

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

Returns the **SO** density.

Implements **sc::Wavefunction**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Returns effective Fock matrix in MO basis (including XC contribution for KS DFT).

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

### double sc::HSOSSCF::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::HSOSSCF::print (std::ostream & = ExEnv::out0`()`) const` [virtual]`

Print information about the object.

Reimplemented from **sc::MolecularEnergy**.

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

Implements **sc::SCF**.

### void sc::HSOSSCF::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::HSOSSCF::scf\_energy ()` [protected]`, ` [virtual]`

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

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

Implements **sc::Wavefunction**.

### void sc::HSOSSCF::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.
