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

# sc\_UnrestrictedSCF(3)

A base class for unrestricted self-consistent-field methods.

## NAME

sc::UnrestrictedSCF - A base class for unrestricted self-consistent-field methods.

## SYNOPSIS

`#include <uscf.h>`

Inherits **sc::SCF**.

Inherited by **sc::UHF**, and **sc::UKS**.

### Public Member Functions

**UnrestrictedSCF** (**StateIn** &)\
 **UnrestrictedSCF** (const **Ref**\< **KeyVal** \> &)\
 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.  **RefSCMatrix** **eigenvectors** ()\
 **RefDiagSCMatrix** **eigenvalues** ()\
 Returns the MO basis eigenvalues.  **RefSCMatrix** **oso\_alpha\_eigenvectors** ()\
 **RefSCMatrix** **alpha\_eigenvectors** ()\
 **RefDiagSCMatrix** **alpha\_eigenvalues** ()\
 **RefSCMatrix** **oso\_beta\_eigenvectors** ()\
 **RefSCMatrix** **beta\_eigenvectors** ()\
 **RefDiagSCMatrix** **beta\_eigenvalues** ()\
 **RefSymmSCMatrix** **alpha\_density** ()\
 Return alpha electron densities in the **SO** basis.  **RefSymmSCMatrix** **beta\_density** ()\
 Return beta electron densities in the **SO** basis.  **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**.  double **occupation** (int, int)\
 Returns the occupation.  double **alpha\_occupation** (int, int)\
 Returns the alpha occupation.  double **beta\_occupation** (int, int)\
 Returns the beta occupation.  int **spin\_polarized** ()\
 Return 1 if the alpha density is not equal to the beta density.  int **spin\_unrestricted** ()\
 Return 1 if the alpha orbitals are not equal to the beta orbitals.  void **print** (std::ostream &o=**ExEnv::out0**()) const\
 Print information about the object.  int **n\_fock\_matrices** () const\
 **RefSymmSCMatrix** **fock** (int i)\
 Returns alpha (i==0) or beta (i==1) Fock matrix in AO basis (including XC contribution in KS DFT -- compare this to **CLSCF** and HSOSSCF!).  **RefSymmSCMatrix** **effective\_fock** ()\
 Spin-unrestricted **SCF** methods do not define effective Fock matrix, thus this function should never be called.  void **set\_desired\_value\_accuracy** (double eps)\
 Overload of **Function::set\_desired\_value\_accuracy()**.

### Protected Member Functions

**Ref**\< **SCExtrapError** \> **extrap\_error** ()\
 double **compute\_vector** (double &, double enuclear)\
 void **initial\_vector** (int needv=1)\
 void **set\_occupations** (const **RefDiagSCMatrix** &)\
 void **set\_occupations** (const **RefDiagSCMatrix** &, const **RefDiagSCMatrix** &)\
 void **init\_vector** ()\
 void **done\_vector** ()\
 double **new\_density** ()\
 void **reset\_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 **tnalpha\_**\
 int **tnbeta\_**\
 int **nirrep\_**\
 int \* **nalpha\_**\
 int \* **nbeta\_**\
 int \* **initial\_nalpha\_**\
 int \* **initial\_nbeta\_**\
 **AccResultRefSCMatrix** **oso\_eigenvectors\_beta\_**\
 **AccResultRefDiagSCMatrix** **eigenvalues\_beta\_**\
 **ResultRefSymmSCMatrix** **focka\_**\
 **ResultRefSymmSCMatrix** **fockb\_**\
 **Ref**\< **TwoBodyInt** \> **tbi\_**\
 **RefSymmSCMatrix** **densa\_**\
 **RefSymmSCMatrix** **densb\_**\
 **RefSymmSCMatrix** **gmata\_**\
 **RefSymmSCMatrix** **gmatb\_**\
 **RefSymmSCMatrix** **diff\_densa\_**\
 **RefSymmSCMatrix** **diff\_densb\_**\

### Additional Inherited Members

## Detailed Description

A base class for unrestricted self-consistent-field methods.

## Member Function Documentation

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

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

Reimplemented from **sc::Wavefunction**.

### RefDiagSCMatrix sc::UnrestrictedSCF::alpha\_eigenvalues ()` [virtual]`

Reimplemented from **sc::OneBodyWavefunction**.

### RefSCMatrix sc::UnrestrictedSCF::alpha\_eigenvectors ()` [virtual]`

Reimplemented from **sc::OneBodyWavefunction**.

### double sc::UnrestrictedSCF::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::UnrestrictedSCF::beta\_density ()` [virtual]`

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

Reimplemented from **sc::Wavefunction**.

### RefDiagSCMatrix sc::UnrestrictedSCF::beta\_eigenvalues ()` [virtual]`

Reimplemented from **sc::OneBodyWavefunction**.

### RefSCMatrix sc::UnrestrictedSCF::beta\_eigenvectors ()` [virtual]`

Reimplemented from **sc::OneBodyWavefunction**.

### double sc::UnrestrictedSCF::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**.

### double sc::UnrestrictedSCF::compute\_vector (double &, double enuclear)` [protected]`, ` [virtual]`

Reimplemented from **sc::SCF**.

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

Returns the **SO** density.

Implements **sc::Wavefunction**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Spin-unrestricted **SCF** methods do not define effective Fock matrix, thus this function should never be called.

Implements **sc::SCF**.

### RefDiagSCMatrix sc::UnrestrictedSCF::eigenvalues ()` [virtual]`

Returns the MO basis eigenvalues.

Reimplemented from **sc::SCF**.

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

Implements **sc::SCF**.

### Ref\< SCExtrapError \> sc::UnrestrictedSCF::extrap\_error ()` [protected]`, ` [virtual]`

Reimplemented from **sc::SCF**.

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

Returns alpha (i==0) or beta (i==1) Fock matrix in AO basis (including XC contribution in KS DFT -- compare this to **CLSCF** and HSOSSCF!). Argument i must be 0.

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

### void sc::UnrestrictedSCF::initial\_vector (int needv = `1`)` [protected]`, ` [virtual]`

Reimplemented from **sc::SCF**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

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

Implements **sc::SCF**.

### double sc::UnrestrictedSCF::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**.

### RefSCMatrix sc::UnrestrictedSCF::oso\_alpha\_eigenvectors ()` [virtual]`

Reimplemented from **sc::OneBodyWavefunction**.

### RefSCMatrix sc::UnrestrictedSCF::oso\_beta\_eigenvectors ()` [virtual]`

Reimplemented from **sc::OneBodyWavefunction**.

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

Print information about the object.

Reimplemented from **sc::SCF**.

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

Implements **sc::SCF**.

### void sc::UnrestrictedSCF::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::SCF**.

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

Implements **sc::SCF**.

### void sc::UnrestrictedSCF::set\_desired\_value\_accuracy (double eps)` [virtual]`

Overload of **Function::set\_desired\_value\_accuracy()**. Must update accuracy of the eigenvalues and eigenvectors.

Reimplemented from **sc::Function**.

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

Implements **sc::SCF**.

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

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

Implements **sc::Wavefunction**.

### int sc::UnrestrictedSCF::spin\_unrestricted ()` [virtual]`

Return 1 if the alpha orbitals are not equal to the beta orbitals.

Reimplemented from **sc::SCF**.

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

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

Reimplemented from **sc::SCF**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
