Psi4
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
psi::SOMCSCF Class Reference

#include <soscf.h>

Inheritance diagram for psi::SOMCSCF:
psi::DFSOMCSCF psi::DiskSOMCSCF psi::IncoreSOMCSCF

Public Member Functions

 SOMCSCF (std::shared_ptr< JK > jk, SharedMatrix AOTOSO, SharedMatrix H)
 SOMCSCF class. More...
 
virtual ~SOMCSCF (void)
 
void set_ras (std::vector< Dimension > ras_spaces)
 
void set_frozen_orbitals (SharedMatrix Cfzc)
 
void set_AO_IFock (SharedMatrix IFock)
 
SharedMatrix form_rotation_matrix (SharedMatrix x, size_t order=2)
 
SharedMatrix Ck (SharedMatrix C, SharedMatrix x)
 
double rhf_energy (SharedMatrix C)
 
void update (SharedMatrix Cocc, SharedMatrix Cact, SharedMatrix Cvir, SharedMatrix OPDM, SharedMatrix TPDM)
 
void set_occ_fock (SharedMatrix occ_Fock)
 
SharedMatrix H_approx_diag ()
 
SharedMatrix Hk (SharedMatrix x)
 
SharedMatrix approx_solve ()
 
SharedMatrix solve (int max_iter=5, double conv=1.e-10, bool print=true)
 
SharedMatrix gradient ()
 
virtual SharedMatrix compute_Q (SharedMatrix TPDM)
 
virtual SharedMatrix compute_Qk (SharedMatrix TPDM, SharedMatrix U, SharedMatrix Uact)
 
SharedMatrix compute_AFock (SharedMatrix OPDM)
 
double gradient_rms ()
 
void zero_redundant (SharedMatrix vector)
 
double current_total_energy ()
 
double current_docc_energy ()
 
double current_ci_energy ()
 
SharedMatrix current_AFock ()
 
SharedMatrix current_IFock ()
 
virtual void set_eri_tensors (SharedMatrix, SharedMatrix)
 

Protected Member Functions

void check_ras ()
 
void zero_act (SharedMatrix vector)
 Zero's out redundant rotations, will chose act or ras. More...
 
void zero_ras (SharedMatrix vector)
 
virtual void transform (bool approx_only)
 
virtual void set_act_MO ()
 

Protected Attributes

bool casscf_
 Parameters. More...
 
bool has_fzc_
 
bool compute_IFock_
 
double energy_drc_
 Doubles. More...
 
double energy_ci_
 
size_t nocc_
 Orbital info. More...
 
size_t nact_
 
size_t nvir_
 
Dimension noccpi_
 
Dimension nactpi_
 
Dimension nvirpi_
 
size_t nirrep_
 
size_t nmo_
 
size_t nso_
 
size_t nao_
 
Dimension nmopi_
 
Dimension nsopi_
 
Dimension noapi_
 
Dimension navpi_
 
std::shared_ptr< JKjk_
 Integral objects. More...
 
std::map< std::string,
SharedMatrix
matrices_
 Map of matrices. More...
 
std::vector< Dimensionras_spaces_
 RAS arrays. More...
 

Constructor & Destructor Documentation

psi::SOMCSCF::SOMCSCF ( std::shared_ptr< JK jk,
SharedMatrix  AOTOSO,
SharedMatrix  H 
)

SOMCSCF class.

Initialize the SOMCSCF object

Parameters
jkJK object to use.
AOTOSOAOTOSO object
HCore hamiltonian in the SO basis.
psi::SOMCSCF::~SOMCSCF ( void  )
virtual

Member Function Documentation

SharedMatrix psi::SOMCSCF::approx_solve ( )

Uses the approximate H diagonal hessian for an update.

Returns
x The [oa, av] matrix of non-redundant orbital rotation parameters.
void psi::SOMCSCF::check_ras ( void  )
protected
SharedMatrix psi::SOMCSCF::Ck ( SharedMatrix  C,
SharedMatrix  x 
)

Rotate the current orbitals for a given rotation matrix.

Parameters
CThe orbital matrix to rotate.
xThe [oa, av] non-redundant orbital rotation parameters.
Returns
The rotated orbitals.
SharedMatrix psi::SOMCSCF::compute_AFock ( SharedMatrix  OPDM)

Computes the Q matrix AFock_pq = (pq|uv) - 0.5 (pu|qv) {uv}

Parameters
OPDMDense nact*nact by nact*nact symmetrized OPDM
Returns
The symmetry AFock matrix
SharedMatrix psi::SOMCSCF::compute_Q ( SharedMatrix  TPDM)
virtual

Computes the Q matrix Q_pw = (pt|uv) {tuvw}

Parameters
TPDMDense nact*nact by nact*nact symmetrized TPDM
Returns
The symmetry blocked Q matrix

Reimplemented in psi::IncoreSOMCSCF, psi::DiskSOMCSCF, and psi::DFSOMCSCF.

SharedMatrix psi::SOMCSCF::compute_Qk ( SharedMatrix  TPDM,
SharedMatrix  U,
SharedMatrix  Uact 
)
virtual

Computes the Qk matrix Q_pw = (pt|uv)^k {tuvw} with rotated integrals

Parameters
TPDMDense nact*nact by nact*nact symmetrized TPDM
UThe full rotation matrix U
UactThe active portion of the matrix U
Returns
The symmetry blocked Q matrix

Reimplemented in psi::IncoreSOMCSCF, psi::DiskSOMCSCF, and psi::DFSOMCSCF.

SharedMatrix psi::SOMCSCF::current_AFock ( )
inline
double psi::SOMCSCF::current_ci_energy ( )
inline
double psi::SOMCSCF::current_docc_energy ( )
inline
SharedMatrix psi::SOMCSCF::current_IFock ( )
inline
double psi::SOMCSCF::current_total_energy ( )
inline
SharedMatrix psi::SOMCSCF::form_rotation_matrix ( SharedMatrix  x,
size_t  order = 2 
)

Forms the rotation matrix exp(U).

Parameters
xThe [oa, av] non-redundant orbital rotation parameters.
Returns
The rotation matrix.
SharedMatrix psi::SOMCSCF::gradient ( )
Returns
gradient Returns the MO gradient.
double psi::SOMCSCF::gradient_rms ( )
Returns
gradient_rms Returns the RMS of the gradient.
SharedMatrix psi::SOMCSCF::H_approx_diag ( )

Returns the approximate diagonal hessian.

Returns
Hdiag The [oa, av] block of the diagonal hessian.
SharedMatrix psi::SOMCSCF::Hk ( SharedMatrix  x)

Returns the hessian times a trial vector or, in effect, the rotated inactive Fock matrix.

Parameters
xThe [oa, av] matrix of non-redundant orbital rotations.
Returns
Hx The [oa, av] block of the rotated Fock matrix.

Build Qk

double psi::SOMCSCF::rhf_energy ( SharedMatrix  C)

Computes the RHF energy for a given C matrix

Parameters
CThe desired orbitals
Returns
The RHF energy
void psi::SOMCSCF::set_act_MO ( void  )
protectedvirtual
void psi::SOMCSCF::set_AO_IFock ( SharedMatrix  IFock)

Sets the AO based IFock matrix. It should be noted that SOMCSCF will never compute the IFock matrix again, therefore this should be updated on every update() call. Frozen core orbitals should be included

Parameters
IFockThe AO based IFock matrix
virtual void psi::SOMCSCF::set_eri_tensors ( SharedMatrix  ,
SharedMatrix   
)
inlinevirtual

Reimplemented in psi::IncoreSOMCSCF.

void psi::SOMCSCF::set_frozen_orbitals ( SharedMatrix  Cfzc)

Sets the frozen core orbitals, these orbitals do not rotate.

Parameters
CfzcThe frozen core orbitals
void psi::SOMCSCF::set_occ_fock ( SharedMatrix  occ_Fock)

Sets the occupied Fock Matrix

Parameters
occ_FockThe current doubly occupied Fock matrix
void psi::SOMCSCF::set_ras ( std::vector< Dimension ras_spaces)

Sets the ras spaces, rotations will not happen inside of a space

Parameters
ras_spacesStandard vector of arbitrary length with Dimension objects
SharedMatrix psi::SOMCSCF::solve ( int  max_iter = 5,
double  conv = 1.e-10,
bool  print = true 
)

Solves the set of linear equations Hx = gradient using CG.

Returns
x The [oa, av] matrix of non-redundant orbital rotation parameters.
void psi::SOMCSCF::transform ( bool  approx_only)
protectedvirtual

Reimplemented in psi::DiskSOMCSCF, and psi::DFSOMCSCF.

void psi::SOMCSCF::update ( SharedMatrix  Cocc,
SharedMatrix  Cact,
SharedMatrix  Cvir,
SharedMatrix  OPDM,
SharedMatrix  TPDM 
)

Updates all internal variables to the new reference frame and builds non-rotated intermediates.

Parameters
CoccCurrent doubly occupied orbitals
CactCurrent active orbitals
CvirCurrent virtual orbitals
OPDMCurrent active one-particle density matrix
TPDMCurrent active two-particle density matrix (symmetrized, dense)
void psi::SOMCSCF::zero_act ( SharedMatrix  vector)
protected

Zero's out redundant rotations, will chose act or ras.

void psi::SOMCSCF::zero_ras ( SharedMatrix  vector)
protected
void psi::SOMCSCF::zero_redundant ( SharedMatrix  vector)

Zeros out the redundant rotations

Parameters
vectorZero redundant rotations

Member Data Documentation

bool psi::SOMCSCF::casscf_
protected

Parameters.

bool psi::SOMCSCF::compute_IFock_
protected
double psi::SOMCSCF::energy_ci_
protected
double psi::SOMCSCF::energy_drc_
protected

Doubles.

bool psi::SOMCSCF::has_fzc_
protected
std::shared_ptr<JK> psi::SOMCSCF::jk_
protected

Integral objects.

std::map<std::string, SharedMatrix > psi::SOMCSCF::matrices_
protected

Map of matrices.

size_t psi::SOMCSCF::nact_
protected
Dimension psi::SOMCSCF::nactpi_
protected
size_t psi::SOMCSCF::nao_
protected
Dimension psi::SOMCSCF::navpi_
protected
size_t psi::SOMCSCF::nirrep_
protected
size_t psi::SOMCSCF::nmo_
protected
Dimension psi::SOMCSCF::nmopi_
protected
Dimension psi::SOMCSCF::noapi_
protected
size_t psi::SOMCSCF::nocc_
protected

Orbital info.

Dimension psi::SOMCSCF::noccpi_
protected
size_t psi::SOMCSCF::nso_
protected
Dimension psi::SOMCSCF::nsopi_
protected
size_t psi::SOMCSCF::nvir_
protected
Dimension psi::SOMCSCF::nvirpi_
protected
std::vector<Dimension> psi::SOMCSCF::ras_spaces_
protected

RAS arrays.


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