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

# sc\_TwoBodyMOIntsTransform(3)

TwoBodyMOIntsTransform computes two-body integrals in MO basis using parallel integrals-direct AO-\>MO transformation.

## NAME

sc::TwoBodyMOIntsTransform - **TwoBodyMOIntsTransform** computes two-body integrals in MO basis using parallel integrals-direct AO-\>MO transformation.

## SYNOPSIS

`#include <transform_tbint.h>`

Inherits **sc::SavableState**.

Inherited by **sc::TwoBodyMOIntsTransform\_ijxy**, **sc::TwoBodyMOIntsTransform\_ikjy**, and **sc::TwoBodyMOIntsTransform\_ixjy**.

### Classes

struct **MOSpaces**\
 Predefined enumerated type for the MO spaces.

### Public Member Functions

**TwoBodyMOIntsTransform** (**StateIn** &)\
 **TwoBodyMOIntsTransform** (const std::string &**name**, const **Ref**\< **MOIntsTransformFactory** \> &factory, const **Ref**\< **MOIndexSpace** \> &**space1**, const **Ref**\< **MOIndexSpace** \> &**space2**, const **Ref**\< **MOIndexSpace** \> &**space3**, const **Ref**\< **MOIndexSpace** \> &**space4**)\
 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.  std::string **name** () const\
 Returns the name of the transform.  virtual std::string **type** () const =0\
 Returns a short label which uniquely identifies the type of transform.  **Ref**\< **MemoryGrp** \> **mem** () const\
 Returns the **MemoryGrp** object.  **Ref**\< **MessageGrp** \> **msg** () const\
 Returns the **MessageGrp** object.  **Ref**\< **R12IntsAcc** \> **ints\_acc** () const\
 Returns the integrals accumulator object.  **Ref**\< **MOIndexSpace** \> **space1** () const\
 Returns **MOIndexSpace** object 1.  **Ref**\< **MOIndexSpace** \> **space2** () const\
 Returns **MOIndexSpace** object 2.  **Ref**\< **MOIndexSpace** \> **space3** () const\
 Returns **MOIndexSpace** object 3.  **Ref**\< **MOIndexSpace** \> **space4** () const\
 Returns **MOIndexSpace** object 4.  double **print\_percent** () const\
 Returns the update print frequency.  int **batchsize** () const\
 Returns the batchsize for each pass of the transformation.  int **debug** () const\
 Returns the debug level.  bool **dynamic** () const\
 Returns whether to use dynamic load balancing.  int **num\_te\_types** () const\
 Returns the number of types of two body integrals computed.  virtual const size\_t **memgrp\_blksize** () const =0\
 Returns the number of bytes allocated for each ij-block of integrals of one type in **MemoryGrp**.  void **set\_top\_mole** (const **Ref**\< **MolecularEnergy** \> &top\_mole)\
 Specifies the top-level **MolecularEnergy** object to use for checkpointing.  void **set\_num\_te\_types** (const int **num\_te\_types**)\
 Specifies how many integral types computed by **TwoBodyInt** to be transformed Default is 1.  void **set\_memory** (const size\_t memory)\
 void **set\_debug** (int **debug**)\
 void **set\_dynamic** (bool **dynamic**)\
 void **set\_print\_percent** (double **print\_percent**)\
 virtual void **compute** ()=0\
 Computes transformed integrals.  virtual void **check\_int\_symm** (double threshold=**TwoBodyMOIntsTransform::zero\_integral**) const noexcept(false)=0\
 Check symmetry of transformed integrals.  virtual void **obsolete** ()\
 Make the transform obsolete. Next call to **compute()** will recompute.  **DistShellPair::SharedData** \* **shell\_pair\_data** ()\
 Returns a that data that must be shared between all **DistShellPair** objects.

### Protected Member Functions

unsigned int **restart\_orbital** () const\
 returns index in range of space1\_ where to start the transformation  void **init\_vars** ()\
 void **reinit\_acc** ()\
 void **alloc\_mem** (const size\_t localmem)\
 void **dealloc\_mem** ()\
 int **compute\_transform\_batchsize\_** (size\_t mem\_static, int rank\_i)\
 void **memory\_report** (std::ostream &os=**ExEnv::out0**()) const\
 Generates a report on memory for the transform : user-specified limits, projected and actual use.  void **mospace\_report** (std::ostream &os=**ExEnv::out0**()) const\
 Generates a report on MO spaces for the transform.  void **print\_header** (std::ostream &os=**ExEnv::out0**()) const\
 Prints out standard header.  void **print\_footer** (std::ostream &os=**ExEnv::out0**()) const\
 Prints out standard footer.

### Static Protected Member Functions

static int **compute\_nij** (const int rank\_i, const int rank\_j, const int nproc, const int me)\

### Protected Attributes

std::string **name\_**\
 **Ref**\< **MOIntsTransformFactory** \> **factory\_**\
 **Ref**\< **MolecularEnergy** \> **top\_mole\_**\
 **Ref**\< **MessageGrp** \> **msg\_**\
 **Ref**\< **MemoryGrp** \> **mem\_**\
 **Ref**\< **ThreadGrp** \> **thr\_**\
 **Ref**\< **R12IntsAcc** \> **ints\_acc\_**\
 **Ref**\< **MOIndexSpace** \> **space1\_**\
 **Ref**\< **MOIndexSpace** \> **space2\_**\
 **Ref**\< **MOIndexSpace** \> **space3\_**\
 **Ref**\< **MOIndexSpace** \> **space4\_**\
 int **num\_te\_types\_**\
 size\_t **memory\_**\
 bool **dynamic\_**\
 double **print\_percent\_**\
 **DistShellPair::SharedData** **spdata\_**\
 int **debug\_**\
 **MOIntsTransformFactory::StoreMethod** **ints\_method\_**\
 std::string **file\_prefix\_**\
 size\_t **mem\_static\_**\
 int **batchsize\_**\
 int **npass\_**\

### Static Protected Attributes

static constexpr double **zero\_integral** = 1.0e-12\
 By default, integrals smaller than zero\_integral are considered zero.

### Additional Inherited Members

## Detailed Description

**TwoBodyMOIntsTransform** computes two-body integrals in MO basis using parallel integrals-direct AO-\>MO transformation.

## Member Function Documentation

### virtual void sc::TwoBodyMOIntsTransform::check\_int\_symm (double threshold = TwoBodyMOIntsTransform::zero\_integral) const` [pure virtual]`, ` [noexcept]`

Check symmetry of transformed integrals.

Implemented in **sc::TwoBodyMOIntsTransform\_ijxy**, **sc::TwoBodyMOIntsTransform\_ikjy**, and **sc::TwoBodyMOIntsTransform\_ixjy**.

### virtual void sc::TwoBodyMOIntsTransform::compute ()` [pure virtual]`

Computes transformed integrals.

Implemented in **sc::TwoBodyMOIntsTransform\_ijxy**, **sc::TwoBodyMOIntsTransform\_ikjy**, and **sc::TwoBodyMOIntsTransform\_ixjy**.

### virtual const size\_t sc::TwoBodyMOIntsTransform::memgrp\_blksize () const` [pure virtual]`

Returns the number of bytes allocated for each ij-block of integrals of one type in **MemoryGrp**. It's guaranteed to be divisible by sizeof(double).

Implemented in **sc::TwoBodyMOIntsTransform\_ijxy**, **sc::TwoBodyMOIntsTransform\_ikjy**, and **sc::TwoBodyMOIntsTransform\_ixjy**.

### void sc::TwoBodyMOIntsTransform::memory\_report (std::ostream & os = ExEnv::out0`()`) const` [protected]`

Generates a report on memory for the transform : user-specified limits, projected and actual use. Assumes formatting info from **ExEnv::out0()**.

### void sc::TwoBodyMOIntsTransform::mospace\_report (std::ostream & os = ExEnv::out0`()`) const` [protected]`

Generates a report on MO spaces for the transform. Assumes formatting info from **ExEnv::out0()**.

### void sc::TwoBodyMOIntsTransform::print\_footer (std::ostream & os = ExEnv::out0`()`) const` [protected]`

Prints out standard footer. Call at the end of **compute()**.

### void sc::TwoBodyMOIntsTransform::print\_header (std::ostream & os = ExEnv::out0`()`) const` [protected]`

Prints out standard header. Call at the beginning of **compute()**.

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

### virtual std::string sc::TwoBodyMOIntsTransform::type () const` [pure virtual]`

Returns a short label which uniquely identifies the type of transform.

Implemented in **sc::TwoBodyMOIntsTransform\_ijxy**, **sc::TwoBodyMOIntsTransform\_ikjy**, and **sc::TwoBodyMOIntsTransform\_ixjy**.

## Member Data Documentation

### constexpr double sc::TwoBodyMOIntsTransform::zero\_integral = 1.0e-12` [static]`, ` [constexpr]`, ` [protected]`

By default, integrals smaller than zero\_integral are considered zero. This constant is only used in checking integrals, not computing them.

## Author

Generated automatically by Doxygen for MPQC from the source code.
