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

# sc\_Integral(3)

The Integral abstract class acts as a factory to provide objects that compute one and two electron integrals.

## NAME

sc::Integral - The **Integral** abstract class acts as a factory to provide objects that compute one and two electron integrals.

## SYNOPSIS

`#include <integral.h>`

Inherits **sc::SavableState**.

Inherited by **sc::IntegralCCA**, **sc::IntegralCints**, and **sc::IntegralV3**.

### Public Member Functions

**Integral** (**StateIn** &)\
 Restore the **Integral** object from the given **StateIn** object.  **Integral** (const **Ref**\< **KeyVal** \> &)\
 Construct the **Integral** object from the given **KeyVal** object.  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.  virtual **Integral** \* **clone** ()=0\
 Clones the given **Integral** factory. The new factory may need to have set\_basis and set\_storage to be called on it.  virtual int **equiv** (const **Ref**\< **Integral** \> &)\
 Returns nonzero if this and the given **Integral** object have the same integral ordering, normalization conventions, etc.  void **set\_storage** (size\_t i)\
 Sets the total amount of storage, in bytes, that is available.  size\_t **storage\_used** ()\
 Returns how much storage has been used.  size\_t **storage\_unused** ()\
 Returns how much storage was not needed.  virtual size\_t **storage\_required\_eri** (const **Ref**\< **GaussianBasisSet** \> &b1, const **Ref**\< **GaussianBasisSet** \> &b2=0, const **Ref**\< **GaussianBasisSet** \> &b3=0, const **Ref**\< **GaussianBasisSet** \> &b4=0)\
 Returns how much storage will be needed to initialize a two-body integrals evaluator for electron repulsion integrals.  virtual size\_t **storage\_required\_grt** (const **Ref**\< **GaussianBasisSet** \> &b1, const **Ref**\< **GaussianBasisSet** \> &b2=0, const **Ref**\< **GaussianBasisSet** \> &b3=0, const **Ref**\< **GaussianBasisSet** \> &b4=0)\
 Returns how much storage will be needed to initialize a two-body integrals evaluator for linear R12 integrals.  virtual size\_t **storage\_required\_eri\_deriv** (const **Ref**\< **GaussianBasisSet** \> &b1, const **Ref**\< **GaussianBasisSet** \> &b2=0, const **Ref**\< **GaussianBasisSet** \> &b3=0, const **Ref**\< **GaussianBasisSet** \> &b4=0)\
 Returns how much storage will be needed to initialize a two-body integrals evaluator for derivative electron repulsion integrals.  void **adjust\_storage** (ptrdiff\_t s)\
 The specific integral classes use this to tell **Integral** how much memory they are using/freeing.  **Ref**\< **PetiteList** \> **petite\_list** ()\
 Return the **PetiteList** object.  **Ref**\< **PetiteList** \> **petite\_list** (const **Ref**\< **GaussianBasisSet** \> &)\
 Return the **PetiteList** object for the given basis set.  **ShellRotation** **shell\_rotation** (int am, **SymmetryOperation** &, int pure=0)\
 Return the **ShellRotation** object for a shell of the given angular momentum.  virtual void **set\_basis** (const **Ref**\< **GaussianBasisSet** \> &b1, const **Ref**\< **GaussianBasisSet** \> &b2=0, const **Ref**\< **GaussianBasisSet** \> &b3=0, const **Ref**\< **GaussianBasisSet** \> &b4=0)\
 Set the basis set for each center.  virtual **CartesianIter** \* **new\_cartesian\_iter** (int)=0\
 Return a **CartesianIter** object.  virtual **RedundantCartesianIter** \* **new\_redundant\_cartesian\_iter** (int)=0\
 Return a **RedundantCartesianIter** object.  virtual **RedundantCartesianSubIter** \* **new\_redundant\_cartesian\_sub\_iter** (int)=0\
 Return a **RedundantCartesianSubIter** object.  virtual **SphericalTransformIter** \* **new\_spherical\_transform\_iter** (int l, int inv=0, int subl=-1)=0\
 Return a **SphericalTransformIter** object.  virtual const **SphericalTransform** \* **spherical\_transform** (int l, int inv=0, int subl=-1)=0\
 Return a **SphericalTransform** object.  virtual **Ref**\< **OneBodyInt** \> **overlap** ()=0\
 Return a **OneBodyInt** that computes the overlap.  virtual **Ref**\< **OneBodyInt** \> **kinetic** ()=0\
 Return a **OneBodyInt** that computes the kinetic energy.  virtual **Ref**\< **OneBodyInt** \> **point\_charge** (const **Ref**\< **PointChargeData** \> &)=0\
 Return a **OneBodyInt** that computes the integrals for interactions with point charges.  virtual **Ref**\< **OneBodyOneCenterInt** \> **point\_charge1** (const **Ref**\< **PointChargeData** \> &)\
 Return a **OneBodyInt** that computes the integrals for interactions with point charges.  virtual **Ref**\< **OneBodyInt** \> **nuclear** ()=0\
 Return a **OneBodyInt** that computes the nuclear repulsion integrals.  virtual **Ref**\< **OneBodyInt** \> **hcore** ()=0\
 Return a **OneBodyInt** that computes the core Hamiltonian integrals.  virtual **Ref**\< **OneBodyInt** \> **efield\_dot\_vector** (const **Ref**\< **EfieldDotVectorData** \> &)=0\
 Return a **OneBodyInt** that computes the electric field integrals dotted with a given vector.  virtual **Ref**\< **OneBodyInt** \> **dipole** (const **Ref**\< **DipoleData** \> &)=0\
 Return a **OneBodyInt** that computes electric dipole moment integrals.  virtual **Ref**\< **OneBodyInt** \> **quadrupole** (const **Ref**\< **DipoleData** \> &)=0\
 Return a **OneBodyInt** that computes electric quadrupole moment integrals.  virtual **Ref**\< **OneBodyDerivInt** \> **overlap\_deriv** ()=0\
 Return a **OneBodyDerivInt** that computes overlap derivatives.  virtual **Ref**\< **OneBodyDerivInt** \> **kinetic\_deriv** ()=0\
 Return a **OneBodyDerivInt** that computes kinetic energy derivatives.  virtual **Ref**\< **OneBodyDerivInt** \> **nuclear\_deriv** ()=0\
 Return a **OneBodyDerivInt** that computes nuclear repulsion derivatives.  virtual **Ref**\< **OneBodyDerivInt** \> **hcore\_deriv** ()=0\
 Return a **OneBodyDerivInt** that computes core Hamiltonian derivatives.  virtual **Ref**\< **TwoBodyThreeCenterInt** \> **electron\_repulsion3** ()\
 Return a **TwoBodyThreeCenterInt** that computes electron repulsion integrals.  virtual **Ref**\< **TwoBodyThreeCenterDerivInt** \> **electron\_repulsion3\_deriv** ()\
 Return a **TwoBodyThreeCenterInt** that computes electron repulsion integrals.  virtual **Ref**\< **TwoBodyTwoCenterInt** \> **electron\_repulsion2** ()\
 Return a **TwoBodyTwoCenterInt** that computes electron repulsion integrals.  virtual **Ref**\< **TwoBodyTwoCenterDerivInt** \> **electron\_repulsion2\_deriv** ()\
 Return a **TwoBodyTwoCenterInt** that computes electron repulsion integrals.  virtual **Ref**\< **TwoBodyInt** \> **electron\_repulsion** ()=0\
 Return a **TwoBodyInt** that computes electron repulsion integrals.  virtual **Ref**\< **TwoBodyDerivInt** \> **electron\_repulsion\_deriv** ()=0\
 Return a **TwoBodyDerivInt** that computes electron repulsion derivatives.  virtual **Ref**\< **TwoBodyInt** \> **grt** ()\
 Return a **TwoBodyInt** that computes two-electron integrals specific to linear R12 methods.  **Ref**\< **MessageGrp** \> **messagegrp** ()\
 Return the **MessageGrp** used by the integrals objects.

### Static Public Member Functions

static **Integral** \* **initial\_integral** (int &argc, char \*\*argv)\
 Create an integral factory.  static void **set\_default\_integral** (const **Ref**\< **Integral** \> &)\
 Specifies a new default **Integral** factory.  static **Integral** \* **get\_default\_integral** ()\
 Returns the default **Integral** factory.

### Protected Member Functions

**Integral** (const **Ref**\< **GaussianBasisSet** \> &b1, const **Ref**\< **GaussianBasisSet** \> &b2, const **Ref**\< **GaussianBasisSet** \> &b3, const **Ref**\< **GaussianBasisSet** \> &b4)\
 Initialize the **Integral** object given a **GaussianBasisSet** for each center.

### Protected Attributes

**Ref**\< **GaussianBasisSet** \> **bs1\_**\
 **Ref**\< **GaussianBasisSet** \> **bs2\_**\
 **Ref**\< **GaussianBasisSet** \> **bs3\_**\
 **Ref**\< **GaussianBasisSet** \> **bs4\_**\
 size\_t **storage\_**\
 size\_t **storage\_used\_**\
 **Ref**\< **MessageGrp** \> **grp\_**\

## Detailed Description

The **Integral** abstract class acts as a factory to provide objects that compute one and two electron integrals.

## Member Function Documentation

### virtual Integral \* sc::Integral::clone ()` [pure virtual]`

Clones the given **Integral** factory. The new factory may need to have set\_basis and set\_storage to be called on it.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual Ref\< OneBodyInt \> sc::Integral::dipole (const Ref\< DipoleData \> &)` [pure virtual]`

Return a **OneBodyInt** that computes electric dipole moment integrals. The canonical order of integrals in a set is x, y, z.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual Ref\< OneBodyInt \> sc::Integral::efield\_dot\_vector (const Ref\< EfieldDotVectorData \> &)` [pure virtual]`

Return a **OneBodyInt** that computes the electric field integrals dotted with a given vector.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual Ref\< TwoBodyInt \> sc::Integral::electron\_repulsion ()` [pure virtual]`

Return a **TwoBodyInt** that computes electron repulsion integrals.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual Ref\< TwoBodyTwoCenterInt \> sc::Integral::electron\_repulsion2 ()` [virtual]`

Return a **TwoBodyTwoCenterInt** that computes electron repulsion integrals. If this is not re-implemented it will throw.

Reimplemented in **sc::IntegralV3**.

### virtual Ref\< TwoBodyTwoCenterDerivInt \> sc::Integral::electron\_repulsion2\_deriv ()` [virtual]`

Return a **TwoBodyTwoCenterInt** that computes electron repulsion integrals. If this is not re-implemented it will throw.

### virtual Ref\< TwoBodyThreeCenterInt \> sc::Integral::electron\_repulsion3 ()` [virtual]`

Return a **TwoBodyThreeCenterInt** that computes electron repulsion integrals. If this is not re-implemented it will throw.

Reimplemented in **sc::IntegralV3**.

### virtual Ref\< TwoBodyThreeCenterDerivInt \> sc::Integral::electron\_repulsion3\_deriv ()` [virtual]`

Return a **TwoBodyThreeCenterInt** that computes electron repulsion integrals. If this is not re-implemented it will throw.

### virtual Ref\< TwoBodyDerivInt \> sc::Integral::electron\_repulsion\_deriv ()` [pure virtual]`

Return a **TwoBodyDerivInt** that computes electron repulsion derivatives.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual int sc::Integral::equiv (const Ref\< Integral \> &)` [virtual]`

Returns nonzero if this and the given **Integral** object have the same integral ordering, normalization conventions, etc. \

### virtual Ref\< TwoBodyInt \> sc::Integral::grt ()` [virtual]`

Return a **TwoBodyInt** that computes two-electron integrals specific to linear R12 methods. According to the convention in the literature, 'g' stands for electron repulsion integral, 'r' for the integral of r12 operator, and 't' for the commutator integrals. Implementation for this kind of **TwoBodyInt** is optional.

Reimplemented in **sc::IntegralCints**.

### virtual Ref\< OneBodyInt \> sc::Integral::hcore ()` [pure virtual]`

Return a **OneBodyInt** that computes the core Hamiltonian integrals.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual Ref\< OneBodyDerivInt \> sc::Integral::hcore\_deriv ()` [pure virtual]`

Return a **OneBodyDerivInt** that computes core Hamiltonian derivatives.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### static Integral \* sc::Integral::initial\_integral (int & argc, char \*\* argv)` [static]`

Create an integral factory. This routine looks for a -integral argument, then the environmental variable INTEGRAL. The argument to -integral should be either string for a **ParsedKeyVal** constructor or a classname. This factory is not guaranteed to have its storage and basis sets set up properly, hence set\_basis and set\_storage need to be called on it.

### virtual Ref\< OneBodyInt \> sc::Integral::kinetic ()` [pure virtual]`

Return a **OneBodyInt** that computes the kinetic energy.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual Ref\< OneBodyDerivInt \> sc::Integral::kinetic\_deriv ()` [pure virtual]`

Return a **OneBodyDerivInt** that computes kinetic energy derivatives.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual CartesianIter \* sc::Integral::new\_cartesian\_iter (int)` [pure virtual]`

Return a **CartesianIter** object. The caller is responsible for freeing the object.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual RedundantCartesianIter \* sc::Integral::new\_redundant\_cartesian\_iter (int)` [pure virtual]`

Return a **RedundantCartesianIter** object. The caller is responsible for freeing the object.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual RedundantCartesianSubIter \* sc::Integral::new\_redundant\_cartesian\_sub\_iter (int)` [pure virtual]`

Return a **RedundantCartesianSubIter** object. The caller is responsible for freeing the object.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual SphericalTransformIter \* sc::Integral::new\_spherical\_transform\_iter (int l, int inv = `0`, int subl = `-1`)` [pure virtual]`

Return a **SphericalTransformIter** object. The caller is responsible for freeing the object.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual Ref\< OneBodyInt \> sc::Integral::nuclear ()` [pure virtual]`

Return a **OneBodyInt** that computes the nuclear repulsion integrals. Charges from the atoms on center one are used. If center two is not identical to center one, then the charges on center two are included as well. \

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual Ref\< OneBodyDerivInt \> sc::Integral::nuclear\_deriv ()` [pure virtual]`

Return a **OneBodyDerivInt** that computes nuclear repulsion derivatives.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual Ref\< OneBodyInt \> sc::Integral::overlap ()` [pure virtual]`

Return a **OneBodyInt** that computes the overlap.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual Ref\< OneBodyDerivInt \> sc::Integral::overlap\_deriv ()` [pure virtual]`

Return a **OneBodyDerivInt** that computes overlap derivatives.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual Ref\< OneBodyInt \> sc::Integral::point\_charge (const Ref\< PointChargeData \> &)` [pure virtual]`

Return a **OneBodyInt** that computes the integrals for interactions with point charges.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual Ref\< OneBodyOneCenterInt \> sc::Integral::point\_charge1 (const Ref\< PointChargeData \> &)` [virtual]`

Return a **OneBodyInt** that computes the integrals for interactions with point charges.

Reimplemented in **sc::IntegralV3**.

### virtual Ref\< OneBodyInt \> sc::Integral::quadrupole (const Ref\< DipoleData \> &)` [pure virtual]`

Return a **OneBodyInt** that computes electric quadrupole moment integrals. The canonical order of integrals in a set is x^2, xy, xz, y^2, yz, z^2.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### void sc::Integral::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::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual void sc::Integral::set\_basis (const Ref\< GaussianBasisSet \> & b1, const Ref\< GaussianBasisSet \> & b2 = `0`, const Ref\< GaussianBasisSet \> & b3 = `0`, const Ref\< GaussianBasisSet \> & b4 = `0`)` [virtual]`

Set the basis set for each center.

Reimplemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### ShellRotation sc::Integral::shell\_rotation (int am, SymmetryOperation &, int pure = `0`)

Return the **ShellRotation** object for a shell of the given angular momentum. Pass nonzero to pure to do solid harmonics.

### virtual const SphericalTransform \* sc::Integral::spherical\_transform (int l, int inv = `0`, int subl = `-1`)` [pure virtual]`

Return a **SphericalTransform** object. The pointer is only valid while this **Integral** object is valid.

Implemented in **sc::IntegralCints**, **sc::IntegralCCA**, and **sc::IntegralV3**.

### virtual size\_t sc::Integral::storage\_required\_eri (const Ref\< GaussianBasisSet \> & b1, const Ref\< GaussianBasisSet \> & b2 = `0`, const Ref\< GaussianBasisSet \> & b3 = `0`, const Ref\< GaussianBasisSet \> & b4 = `0`)` [virtual]`

Returns how much storage will be needed to initialize a two-body integrals evaluator for electron repulsion integrals.

Reimplemented in **sc::IntegralCints**.

### virtual size\_t sc::Integral::storage\_required\_grt (const Ref\< GaussianBasisSet \> & b1, const Ref\< GaussianBasisSet \> & b2 = `0`, const Ref\< GaussianBasisSet \> & b3 = `0`, const Ref\< GaussianBasisSet \> & b4 = `0`)` [virtual]`

Returns how much storage will be needed to initialize a two-body integrals evaluator for linear R12 integrals.

Reimplemented in **sc::IntegralCints**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
