GQCP
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
GQCP::Simple2DM< _Scalar, _DerivedDM > Class Template Reference

#include <Simple2DM.hpp>

Inheritance diagram for GQCP::Simple2DM< _Scalar, _DerivedDM >:
Inheritance graph
Collaboration diagram for GQCP::Simple2DM< _Scalar, _DerivedDM >:
Collaboration graph

Public Types

using Scalar = _Scalar
 
using DerivedDM = _DerivedDM
 
using Self = Simple2DM< Scalar, DerivedDM >
 
using OneDM = typename DensityMatrixTraits< DerivedDM >::OneDM
 
using Transformation = typename DensityMatrixTraits< DerivedDM >::Transformation
 
- Public Types inherited from GQCP::BasisTransformable< _DerivedDM >
using Transformation = typename BasisTransformableTraits< _DerivedDM >::Transformation
 
- Public Types inherited from GQCP::JacobiRotatable< _DerivedDM >
using JacobiRotationType = typename JacobiRotatableTraits< _DerivedDM >::JacobiRotationType
 
- Public Types inherited from GQCP::CRTP< _Derived >
using Derived = _Derived
 

Public Member Functions

 Simple2DM (const SquareRankFourTensor< Scalar > &d)
 
 Simple2DM ()
 
const SquareRankFourTensor< Scalar > & tensor () const
 
SquareRankFourTensor< Scalar > & tensor ()
 
size_t numberOfOrbitals () const
 
OneDM reduce () const
 
Scalar trace () const
 
DerivedDMoperator+= (const DerivedDM &rhs) override
 
DerivedDMoperator*= (const Scalar &a) override
 
DerivedDM transformed (const Transformation &T) const override
 
DerivedDM rotated (const JacobiRotation &jacobi_rotation) const override
 
- Public Member Functions inherited from GQCP::BasisTransformable< _DerivedDM >
virtual _DerivedDM transformed (const Transformation &T) const=0
 
virtual void transform (const Transformation &T)
 
virtual _DerivedDM rotated (const Transformation &U) const
 
void rotate (const Transformation &U)
 
- Public Member Functions inherited from GQCP::JacobiRotatable< _DerivedDM >
virtual _DerivedDM rotated (const JacobiRotationType &jacobi_rotation) const=0
 
void rotate (const JacobiRotationType &jacobi_rotation)
 
- Public Member Functions inherited from GQCP::VectorSpaceArithmetic< _DerivedDM, _Scalar >
virtual _DerivedDM & operator+= (const _DerivedDM &rhs)=0
 
virtual _DerivedDM & operator*= (const _Scalar &a)=0
 
_DerivedDM & operator-= (const _DerivedDM &rhs)
 
_DerivedDM operator- () const
 
- Public Member Functions inherited from GQCP::CRTP< _Derived >
Derivedderived ()
 
const Derivedderived () const
 

Detailed Description

template<typename _Scalar, typename _DerivedDM>
class GQCP::Simple2DM< _Scalar, _DerivedDM >

A two-electron density matrix that is described by a single tensor.

This class is used as a base class for Orbital2DM and G2DM, since they are both expressed using a single tensor, as opposed to SpinResolved2DM, which uses separate alpha- and beta- tensor. The word 'simple' is used here as an antonym for 'compound'.

Template Parameters
_ScalarThe scalar type used for a density matrix element: real or complex.
_DerivedDMThe type of the density matrix that derives from this class, enabling CRTP and compile-time polymorphism.

Member Typedef Documentation

◆ DerivedDM

template<typename _Scalar , typename _DerivedDM >
using GQCP::Simple2DM< _Scalar, _DerivedDM >::DerivedDM = _DerivedDM

◆ OneDM

template<typename _Scalar , typename _DerivedDM >
using GQCP::Simple2DM< _Scalar, _DerivedDM >::OneDM = typename DensityMatrixTraits<DerivedDM>::OneDM

◆ Scalar

template<typename _Scalar , typename _DerivedDM >
using GQCP::Simple2DM< _Scalar, _DerivedDM >::Scalar = _Scalar

◆ Self

template<typename _Scalar , typename _DerivedDM >
using GQCP::Simple2DM< _Scalar, _DerivedDM >::Self = Simple2DM<Scalar, DerivedDM>

◆ Transformation

template<typename _Scalar , typename _DerivedDM >
using GQCP::Simple2DM< _Scalar, _DerivedDM >::Transformation = typename DensityMatrixTraits<DerivedDM>::Transformation

Constructor & Destructor Documentation

◆ Simple2DM() [1/2]

template<typename _Scalar , typename _DerivedDM >
GQCP::Simple2DM< _Scalar, _DerivedDM >::Simple2DM ( const SquareRankFourTensor< Scalar > &  d)
inline

Create a Simple2DM from its matrix representation.

Parameters
DThe matrix representation of the two-electron density matrix.

◆ Simple2DM() [2/2]

template<typename _Scalar , typename _DerivedDM >
GQCP::Simple2DM< _Scalar, _DerivedDM >::Simple2DM ( )
inline

The default constructor.

Member Function Documentation

◆ numberOfOrbitals()

template<typename _Scalar , typename _DerivedDM >
size_t GQCP::Simple2DM< _Scalar, _DerivedDM >::numberOfOrbitals ( ) const
inline
Returns
The number of orbitals that are related to this 2-DM.

◆ operator*=()

template<typename _Scalar , typename _DerivedDM >
DerivedDM & GQCP::Simple2DM< _Scalar, _DerivedDM >::operator*= ( const Scalar a)
inlineoverridevirtual

Scalar multiplication-assignment.

Implements GQCP::VectorSpaceArithmetic< _DerivedDM, _Scalar >.

◆ operator+=()

template<typename _Scalar , typename _DerivedDM >
DerivedDM & GQCP::Simple2DM< _Scalar, _DerivedDM >::operator+= ( const DerivedDM rhs)
inlineoverridevirtual

Addition-assignment.

Implements GQCP::VectorSpaceArithmetic< _DerivedDM, _Scalar >.

◆ reduce()

template<typename _Scalar , typename _DerivedDM >
OneDM GQCP::Simple2DM< _Scalar, _DerivedDM >::reduce ( ) const
inline
Returns
A partial contraction D(p,q) of the 2-DM, where D(p,q) = d(p,q,r,r).

◆ rotated()

template<typename _Scalar , typename _DerivedDM >
DerivedDM GQCP::Simple2DM< _Scalar, _DerivedDM >::rotated ( const JacobiRotation jacobi_rotation) const
inlineoverride

Apply the Jacobi rotation and return the result.

Parameters
jacobi_rotationThe Jacobi rotation.
Returns
The Jacobi-transformed object.

◆ tensor() [1/2]

template<typename _Scalar , typename _DerivedDM >
SquareRankFourTensor< Scalar > & GQCP::Simple2DM< _Scalar, _DerivedDM >::tensor ( )
inline
Returns
A writable reference to the matrix representation of this two-electron density matrix.

◆ tensor() [2/2]

template<typename _Scalar , typename _DerivedDM >
const SquareRankFourTensor< Scalar > & GQCP::Simple2DM< _Scalar, _DerivedDM >::tensor ( ) const
inline
Returns
A read-only reference to the matrix representation of this two-electron density matrix.

◆ trace()

template<typename _Scalar , typename _DerivedDM >
Scalar GQCP::Simple2DM< _Scalar, _DerivedDM >::trace ( ) const
inline
Returns
The trace of the 2-DM, i.e. d(p,p,q,q).

◆ transformed()

template<typename _Scalar , typename _DerivedDM >
DerivedDM GQCP::Simple2DM< _Scalar, _DerivedDM >::transformed ( const Transformation T) const
inlineoverride

Apply the basis transformation and return the resulting two-electron integrals.

Parameters
TThe basis transformation
Returns
The basis-transformed one-electron integrals.

The documentation for this class was generated from the following file: