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

#include <Simple1DM.hpp>

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

Public Types

using Scalar = _Scalar
 
using DerivedDM = _DerivedDM
 
using Self = Simple1DM< Scalar, DerivedDM >
 
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

 Simple1DM (const SquareMatrix< Scalar > &D)
 
 Simple1DM ()
 
const SquareMatrix< Scalar > & matrix () const
 
SquareMatrix< Scalar > & matrix ()
 
size_t numberOfOrbitals () const
 
double norm () 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::Simple1DM< _Scalar, _DerivedDM >

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

This class is used as a base class for Orbital1DM and G1DM, since they are both expressed using a single matrix, as opposed to SpinResolved1DM, which uses separate alpha- and beta- matrices. 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::Simple1DM< _Scalar, _DerivedDM >::DerivedDM = _DerivedDM

◆ Scalar

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

◆ Self

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

◆ Transformation

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

Constructor & Destructor Documentation

◆ Simple1DM() [1/2]

template<typename _Scalar , typename _DerivedDM >
GQCP::Simple1DM< _Scalar, _DerivedDM >::Simple1DM ( const SquareMatrix< Scalar > &  D)
inline

Create a Simple1DM from its matrix representation.

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

◆ Simple1DM() [2/2]

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

The default constructor.

Member Function Documentation

◆ matrix() [1/2]

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

◆ matrix() [2/2]

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

◆ norm()

template<typename _Scalar , typename _DerivedDM >
double GQCP::Simple1DM< _Scalar, _DerivedDM >::norm ( ) const
inline
Returns
The norm of this 1-DM.
Note
This linear algebraic API is required for conformance in ConsecutiveIteratesNormConvergence.

◆ numberOfOrbitals()

template<typename _Scalar , typename _DerivedDM >
size_t GQCP::Simple1DM< _Scalar, _DerivedDM >::numberOfOrbitals ( ) const
inline
Returns
The number of orbitals that this one-electron density matrix is related to.

◆ operator*=()

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

Scalar multiplication-assignment.

Implements GQCP::VectorSpaceArithmetic< _DerivedDM, _Scalar >.

◆ operator+=()

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

Addition-assignment.

Implements GQCP::VectorSpaceArithmetic< _DerivedDM, _Scalar >.

◆ rotated()

template<typename _Scalar , typename _DerivedDM >
DerivedDM GQCP::Simple1DM< _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.

◆ transformed()

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

Apply the basis transformation and return the resulting 1-DM.

Parameters
TThe basis transformation.
Returns
The basis-transformed 1-DM.

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