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

# sc\_DenIntegrator(3)

An abstract base class for integrating the electron density.

## NAME

sc::DenIntegrator - An abstract base class for integrating the electron density.

## SYNOPSIS

`#include <integrator.h>`

Inherits **sc::SavableState**.

Inherited by **sc::RadialAngularIntegrator**.

### Public Member Functions

**DenIntegrator** ()\
 Construct a new **DenIntegrator**.  **DenIntegrator** (const **Ref**\< **KeyVal** \> &)\
 Construct a new **DenIntegrator** given the **KeyVal** input.  **DenIntegrator** (**StateIn** &)\
 Construct a new **DenIntegrator** given the **StateIn** data.  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.  **Ref**\< **Wavefunction** \> **wavefunction** () const\
 Returns the wavefunction used for the integration.  double **value** () const\
 Returns the result of the integration.  void **set\_accuracy** (double a)\
 Sets the accuracy to use in the integration.  double **get\_accuracy** (void)\
 void **set\_compute\_potential\_integrals** (int)\
 Call with non zero if the potential integrals are to be computed.  const double \* **alpha\_vmat** () const\
 Returns the alpha potential integrals.  const double \* **beta\_vmat** () const\
 Returns the beta potential integrals.  virtual void **init** (const **Ref**\< **Wavefunction** \> &)\
 Called before integrate.  virtual void **done** ()\
 Must be called between calls to init.  virtual void **integrate** (const **Ref**\< **DenFunctional** \> &, const **RefSymmSCMatrix** &densa=0, const **RefSymmSCMatrix** &densb=0, double \*nuclear\_grad=0)=0\
 Performs the integration of the given functional using the given alpha and beta density matrices.

### Protected Member Functions

void **init\_integration** (const **Ref**\< **DenFunctional** \> &func, const **RefSymmSCMatrix** &densa, const **RefSymmSCMatrix** &densb, double \*nuclear\_gradient)\
 void **done\_integration** ()\
 void **init\_object** ()\

### Protected Attributes

**Ref**\< **Wavefunction** \> **wfn\_**\
 **Ref**\< **BatchElectronDensity** \> **den\_**\
 **Ref**\< **ThreadGrp** \> **threadgrp\_**\
 **Ref**\< **MessageGrp** \> **messagegrp\_**\
 double **value\_**\
 double **accuracy\_**\
 double \* **alpha\_vmat\_**\
 double \* **beta\_vmat\_**\
 int **spin\_polarized\_**\
 int **need\_density\_**\
 double **density\_**\
 int **nbasis\_**\
 int **nshell\_**\
 int **n\_integration\_center\_**\
 int **natom\_**\
 int **compute\_potential\_integrals\_**\
 int **linear\_scaling\_**\
 int **use\_dmat\_bound\_**\

### Additional Inherited Members

## Detailed Description

An abstract base class for integrating the electron density.

## Member Function Documentation

### const double \* sc::DenIntegrator::alpha\_vmat () const` [inline]`

Returns the alpha potential integrals. Stored as the lower triangular, row-major format.

### const double \* sc::DenIntegrator::beta\_vmat () const` [inline]`

Returns the beta potential integrals. Stored as the lower triangular, row-major format.

### virtual void sc::DenIntegrator::init (const Ref\< Wavefunction \> &)` [virtual]`

Called before integrate. Does not need to be called again unless the geometry changes or done is called.

### virtual void sc::DenIntegrator::integrate (const Ref\< DenFunctional \> &, const RefSymmSCMatrix & densa = `0`, const RefSymmSCMatrix & densb = `0`, double \* nuclear\_grad = `0`)` [pure virtual]`

Performs the integration of the given functional using the given alpha and beta density matrices. The nuclear derivative contribution is placed in nuclear\_grad, if it is non-null.

Implemented in **sc::RadialAngularIntegrator**.

### void sc::DenIntegrator::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::SavableState**.

Reimplemented in **sc::RadialAngularIntegrator**.

### void sc::DenIntegrator::set\_compute\_potential\_integrals (int)

Call with non zero if the potential integrals are to be computed. They can be returned with the vmat() member.

## Author

Generated automatically by Doxygen for MPQC from the source code.
