Psi4
Public Member Functions | Private Member Functions | Private Attributes | List of all members
psi::detci::CIWavefunction Class Reference

#include <ciwave.h>

Inheritance diagram for psi::detci::CIWavefunction:
psi::Wavefunction

Public Member Functions

 CIWavefunction (std::shared_ptr< Wavefunction > reference_wavefunction)
 
 CIWavefunction (std::shared_ptr< Wavefunction > reference_wavefunction, Options &options)
 
virtual ~CIWavefunction ()
 
double compute_energy ()
 Compute energy. Subclasses override this function to compute its energy. More...
 
size_t ndet ()
 Simple accessors. More...
 
SharedMatrix get_orbitals (const std::string &orbital_name)
 
void set_orbitals (const std::string &orbital_name, SharedMatrix orbitals)
 
Dimension get_dimension (const std::string &orbital_name)
 
void transform_ci_integrals (void)
 
void transform_mcscf_integrals (bool approx_only)
 
void rotate_mcscf_integrals (SharedMatrix K, SharedVector onel_out, SharedVector twoel_out)
 
void pitzer_to_ci_order_onel (SharedMatrix src, SharedVector dest)
 
void pitzer_to_ci_order_twoel (SharedMatrix src, SharedVector dest)
 
SharedMatrix get_opdm (int Iroot=-1, int Jroot=-1, const std::string &spin="SUM", bool full_space=false)
 
std::vector< SharedMatrixopdm (SharedCIVector Ivec, SharedCIVector Jvec, int Iroot, int Jroot)
 
SharedMatrix get_tpdm (const std::string &spin="SUM", bool symmetrize=true)
 
std::vector< SharedMatrixtpdm (SharedCIVector Ivec, SharedCIVector Jvec, int Iroot, int Jroot)
 
SharedCIVector new_civector (int maxnvect, int filenum, bool use_disk=true, bool buf_init=true)
 
SharedCIVector D_vector ()
 
SharedCIVector Hd_vector (int hd_type=-1)
 
void sigma (SharedCIVector C, SharedCIVector S, int cvec, int svec)
 
void sigma (SharedCIVector C, SharedCIVector S, int cvec, int svec, SharedVector oei, SharedVector tei)
 
void print_vector (SharedCIVector vec, int root)
 
void compute_state_transfer (SharedCIVector ref, int ref_vec, SharedMatrix prop, SharedCIVector ret)
 
void compute_cc ()
 
int diag_h (double econv=-1.0, double rconv=-1.0)
 
void compute_mpn ()
 
void form_opdm ()
 
void form_tpdm ()
 
void ci_nat_orbs ()
 
void semicanonical_orbs ()
 
void cleanup_ci ()
 
void cleanup_dpd ()
 
void set_ci_guess (std::string guess)
 
std::shared_ptr< SOMCSCFmcscf_object ()
 
SharedMatrix hamiltonian (size_t hsize=0)
 Functions below this line should be used for debug use only. More...
 
- Public Member Functions inherited from psi::Wavefunction
 Wavefunction (std::shared_ptr< Molecule > molecule, std::shared_ptr< BasisSet > basis, Options &options)
 Constructor for an entirely new wavefunction with an existing basis. More...
 
 Wavefunction (std::shared_ptr< Molecule > molecule, std::shared_ptr< BasisSet > basis)
 Constructor for an entirely new wavefunction with an existing basis and global options. More...
 
 Wavefunction (Options &options)
 Blank constructor for derived classes. More...
 
void shallow_copy (SharedWavefunction other)
 
void shallow_copy (const Wavefunction *other)
 
void deep_copy (SharedWavefunction other)
 
void deep_copy (const Wavefunction *other)
 
virtual ~Wavefunction ()
 
virtual SharedMatrix compute_gradient ()
 Compute gradient. Subclasses override this function to compute the gradient. More...
 
virtual SharedMatrix compute_hessian ()
 Compute Hessian. Subclasses override this function to compute the Hessian. More...
 
bool same_a_b_orbs () const
 Is this a restricted wavefunction? More...
 
bool same_a_b_dens () const
 
Dimension map_irreps (const Dimension &dimpi)
 
std::shared_ptr< Moleculemolecule () const
 Returns the molecule object that pertains to this wavefunction. More...
 
std::shared_ptr< PSIOpsio () const
 
Optionsoptions () const
 
std::shared_ptr< IntegralFactoryintegral () const
 An integral factory with basisset() on each center. More...
 
std::shared_ptr< BasisSetbasisset () const
 Returns the basis set object that pertains to this wavefunction. More...
 
std::shared_ptr< SOBasisSetsobasisset () const
 Returns the SO basis set object that pertains to this wavefunction. More...
 
std::shared_ptr< BasisSetget_basisset (std::string label)
 Getters and setters for other basis sets. More...
 
void set_basisset (std::string label, std::shared_ptr< BasisSet > basis)
 
bool basisset_exists (std::string label)
 
std::shared_ptr< MatrixFactorymatrix_factory () const
 Returns the MatrixFactory object that pertains to this wavefunction. More...
 
std::shared_ptr< Wavefunctionreference_wavefunction () const
 Returns the reference wavefunction. More...
 
void set_reference_wavefunction (const std::shared_ptr< Wavefunction > wfn)
 Sets the reference wavefunction. More...
 
bool density_fitted () const
 Returns whether this wavefunction was obtained using density fitting or not. More...
 
int get_print () const
 Returns the print level. More...
 
const Dimensiondoccpi () const
 Returns the DOCC per irrep array. More...
 
const Dimensionsoccpi () const
 Returns the SOCC per irrep array. More...
 
const Dimensionnsopi () const
 Returns the number of SOs per irrep array. More...
 
const Dimensionnmopi () const
 Returns the number of MOs per irrep array. More...
 
const Dimensionnalphapi () const
 Returns the number of alpha electrons per irrep array. More...
 
const Dimensionnbetapi () const
 Returns the number of beta electrons per irrep array. More...
 
const Dimensionfrzcpi () const
 Returns the frozen core orbitals per irrep array. More...
 
const Dimensionfrzvpi () const
 Returns the frozen virtual orbitals per irrep array. More...
 
void set_doccpi (const Dimension &doccpi)
 
void set_soccpi (const Dimension &soccpi)
 
void set_frzvpi (const Dimension &frzvpi)
 Sets the frozen virtual orbitals per irrep array. More...
 
int nfrzc () const
 Return the number of frozen core orbitals. More...
 
int nalpha () const
 Return the number of alpha electrons. More...
 
int nbeta () const
 Return the number of beta electrons. More...
 
int nso () const
 Returns the number of SOs. More...
 
int nmo () const
 Returns the number of MOs. More...
 
int nirrep () const
 Returns the number of irreps. More...
 
double reference_energy () const
 Returns the reference energy. More...
 
double efzc () const
 Returns the frozen-core energy. More...
 
void set_efzc (double efzc)
 Sets the frozen-core energy. More...
 
SharedMatrix S () const
 Returns the overlap matrix. More...
 
SharedMatrix H () const
 Returns the core Hamiltonian matrix. More...
 
SharedMatrix Ca () const
 Returns the alpha electrons MO coefficients. More...
 
SharedMatrix Cb () const
 Returns the beta electrons MO coefficients. More...
 
SharedMatrix Fa () const
 Returns the (SO basis) alpha Fock matrix. More...
 
SharedMatrix Fb () const
 Returns the (SO basis) beta Fock matrix. More...
 
std::shared_ptr< Vectorepsilon_a () const
 Returns the alpha orbital energies. More...
 
std::shared_ptr< Vectorepsilon_b () const
 Returns the beta orbital energies. More...
 
std::shared_ptr< MatrixLagrangian () const
 Returns the SO basis Lagrangian. More...
 
virtual std::shared_ptr< Matrixtpdm_gradient_contribution () const
 The two particle density matrix contribution to the gradient. More...
 
SharedMatrix aotoso () const
 
const SharedMatrix Da () const
 Returns the alpha OPDM for the wavefunction. More...
 
SharedMatrix Db () const
 Returns the beta OPDM for the wavefunction. More...
 
SharedMatrix Ca_subset (const std::string &basis="SO", const std::string &subset="ALL")
 
SharedMatrix Cb_subset (const std::string &basis="SO", const std::string &subset="ALL")
 
OrbitalSpace alpha_orbital_space (const std::string &id, const std::string &basis="SO", const std::string &subset="ALL")
 Creates an OrbitalSpace object containing information about the request alpha orbital space. More...
 
OrbitalSpace beta_orbital_space (const std::string &id, const std::string &basis="SO", const std::string &subset="ALL")
 Creates an OrbitalSpace object containing information about the request beta orbital space. More...
 
SharedMatrix Da_subset (const std::string &basis="SO")
 
SharedMatrix Db_subset (const std::string &basis="SO")
 
SharedMatrix D_subset_helper (SharedMatrix D, SharedMatrix C, const std::string &basis)
 
SharedVector epsilon_a_subset (const std::string &basis="SO", const std::string &subset="ALL")
 
SharedVector epsilon_b_subset (const std::string &basis="SO", const std::string &subset="ALL")
 
SharedMatrix basis_projection (SharedMatrix Cold, Dimension noccpi, std::shared_ptr< BasisSet > old_basis, std::shared_ptr< BasisSet > new_basis)
 
SharedMatrix X () const
 Returns the Lagrangian in SO basis for the wavefunction. More...
 
SharedMatrix gradient () const
 Returns the gradient. More...
 
void set_gradient (SharedMatrix &grad)
 Set the gradient for the wavefunction. More...
 
SharedMatrix hessian () const
 Returns the Hessian. More...
 
void set_hessian (SharedMatrix &hess)
 Set the Hessian for the wavefunction. More...
 
std::shared_ptr< std::vector
< double > > 
atomic_point_charges () const
 Returns the atomic point charges. More...
 
std::shared_ptr< Vectorget_atomic_point_charges () const
 Returns the atomic point charges in Vector form for python output. More...
 
void set_atomic_point_charges (const std::shared_ptr< std::vector< double >> &apcs)
 Sets the atomic point charges. More...
 
std::shared_ptr< Vectorfrequencies () const
 Returns the frequencies. More...
 
void set_frequencies (std::shared_ptr< Vector > &freqs)
 Set the frequencies for the wavefunction. More...
 
std::shared_ptr< Vectornormalmodes () const
 Returns the normalmodes. More...
 
void set_normalmodes (std::shared_ptr< Vector > &norms)
 Set the normalmodes for the wavefunction. More...
 
void set_name (const std::string &name)
 Set the wavefunction name (e.g. "RHF", "ROHF", "UHF", "CCEnergyWavefunction") More...
 
const std::string & name () const
 Returns the wavefunction name. More...
 
void set_print (unsigned int print)
 
void set_debug (unsigned int debug)
 
virtual void save () const
 Save the wavefunction to checkpoint. More...
 
double get_variable (const std::string key)
 Get and set variables dictionary. More...
 
void set_variable (const std::string key, double value)
 
std::map< std::string, double > variables (void)
 
SharedMatrix get_array (const std::string key)
 Get and set arrays dictionary. More...
 
void set_array (const std::string key, SharedMatrix value)
 
std::map< std::string,
SharedMatrix
arrays (void)
 

Private Member Functions

void get_mo_info ()
 => General Helper Functions <= /// More...
 
void get_parameters (Options &options)
 
void print_parameters ()
 
void set_ras_parameters ()
 
void print_ras_parameters ()
 
void title (bool is_mcscf)
 
void form_strings ()
 
void set_ciblks ()
 
void convergence_death ()
 
void common_init ()
 Sets the ciwavefunction object. More...
 
void orbital_locations (const std::string &orbital_name, int *start, int *end)
 Find out which orbitals belong hwere. More...
 
SharedMatrix symm_block (SharedMatrix x, Dimension dim1, Dimension dim2)
 Symmetry block a matrix. More...
 
void init_mcscf_object ()
 General transforms. More...
 
void tf_onel_ints (SharedVector onel, SharedVector twoel, SharedVector output)
 
void form_gmat (SharedVector onel, SharedVector twoel, SharedVector output)
 
void onel_ints_from_jk ()
 
double get_twoel (int i, int j, int k, int l)
 
double get_onel (int i, int j)
 
void setup_mcscf_ints ()
 Non-DF integral functions. More...
 
void transform_mcscf_ints (bool approx_only=false)
 
void read_dpd_ci_ints ()
 
void rotate_mcscf_twoel_ints (SharedMatrix K, SharedVector twoel_out)
 
void setup_dfmcscf_ints ()
 DF integral functions. More...
 
void transform_dfmcscf_ints (bool approx_only=false)
 
void rotate_dfmcscf_twoel_ints (SharedMatrix K, SharedVector twoel_out)
 
void transform_mcscf_ints_ao (bool approx_only=false)
 
void setup_mcscf_ints_ao ()
 
void H0block_init (unsigned int size)
 => H0block functions <= // More...
 
void H0block_free (void)
 
void H0block_print (void)
 
int H0block_calc (double E)
 
void H0block_gather (double **mat, int al, int bl, int cscode, int mscode, int phase)
 
void H0block_xy (double *x, double *y, double E)
 
void H0block_setup (int num_blocks, int *Ia_code, int *Ib_code)
 
void H0block_pairup (int guess)
 
void H0block_spin_cpl_chk (void)
 
void H0block_filter_setup (void)
 
void H0block_fill (void)
 
void H0block_coupling_calc (double E)
 
std::string print_config (int nbf, int num_alp_el, int num_bet_el, struct stringwr *stralp, struct stringwr *strbet, int num_drc_orbs)
 
double matrix_element (SlaterDeterminant *I, SlaterDeterminant *J)
 => Slater Matrix Elements <= // More...
 
void mitrush_iter (CIvect &Hd, struct stringwr **alplist, struct stringwr **betlist, int nroots, double *evals, double conv_rms, double conv_e, double enuc, double edrc, int maxiter, int maxnvect)
 => CI Iterators <= // More...
 
void olsen_update (CIvect &C, CIvect &S, CIvect &Hd, double E, double E_est, double *norm, double *c1norm, double *ovrlap, double *buffer1, double *buffer2, int curr, int next, std::string out, int iter, struct stringwr **alplist, struct stringwr **betlist)
 
void olsen_iter_xy (CIvect &C, CIvect &S, CIvect &Hd, double *x, double *y, double *buffer1, double *buffer2, double E, int curvect, int L, double **alpha, struct stringwr **alplist, struct stringwr **betlist)
 
void mitrush_update (CIvect &C, CIvect &S, double norm, double acur, double alast, double *buffer1, double *buffer2, int curr, int next)
 
void sem_iter (CIvect &Hd, struct stringwr **alplist, struct stringwr **betlist, double *evals, double conv_e, double conv_rms, double enuc, double edrc, int nroots, int maxiter, int maxnvect)
 
void parse_import_vector (SlaterDetSet *sdset, int *ialplist, int *ialpidx, int *ibetlist, int *ibetidx, int *blknums)
 
void sem_test (double **A, int N, int M, int L, double **evecs, double *evals, double **b, double conv_e, double conv_rms, int maxiter, double offst, int *vu, int maxnvect)
 
void sigma_init (CIvect &C, CIvect &S)
 
void sigma_free (void)
 
void sigma (CIvect &C, CIvect &S, double *oei, double *tei, int ivec)
 
void sigma_a (struct stringwr **alplist, struct stringwr **betlist, CIvect &C, CIvect &S, double *oei, double *tei, int fci, int ivec)
 
void sigma_b (struct stringwr **alplist, struct stringwr **betlist, CIvect &C, CIvect &S, double *oei, double *tei, int fci, int ivec)
 
void sigma_c (struct stringwr **alplist, struct stringwr **betlist, CIvect &C, CIvect &S, double *oei, double *tei, int fci, int ivec)
 
void sigma_block (struct stringwr **alplist, struct stringwr **betlist, double **cmat, double **smat, double *oei, double *tei, int fci, int cblock, int sblock, int nas, int nbs, int sac, int sbc, int cac, int cbc, int cnas, int cnbs, int cnac, int cnbc, int sbirr, int cbirr, int Ms0)
 
void sigma_get_contrib (struct stringwr **alplist, struct stringwr **betlist, CIvect &C, CIvect &S, int **s1_contrib, int **s2_contrib, int **s3_contrib)
 
void form_ov ()
 
void sigma_get_contrib_rotf (CIvect &C, CIvect &S, int **s1_contrib, int **s2_contrib, int **s3_contrib, int *Cnt[2], int **Ij[2], int **Oij[2], int **Ridx[2], signed char **Sgn[2], unsigned char **Toccs)
 
void print_vec (unsigned int nprint, int *Ialist, int *Iblist, int *Iaidx, int *Ibidx, double *coeff)
 
void mpn_generator (CIvect &Hd)
 => MCSCF helpers <= // More...
 
std::vector< std::vector
< SharedMatrix > > 
opdm (SharedCIVector Ivec, SharedCIVector Jvec, std::vector< std::tuple< int, int > > states_vec)
 => Density Matrix helpers <= // More...
 
SharedMatrix opdm_add_inactive (SharedMatrix opdm, double value, bool virt=false)
 
void opdm_block (struct stringwr **alplist, struct stringwr **betlist, double **onepdm_a, double **onepdm_b, double **CJ, double **CI, int Ja_list, int Jb_list, int Jnas, int Jnbs, int Ia_list, int Ib_list, int Inas, int Inbs)
 
std::vector< SharedMatrixtpdm (SharedCIVector Ivec, SharedCIVector Jvec, std::vector< std::tuple< int, int, double > > states_vec)
 
void tpdm_block (struct stringwr **alplist, struct stringwr **betlist, int nbf, int nalplists, int nbetlists, double *twopdm_aa, double *twopdm_bb, double *twopdm_ab, double **CJ, double **CI, int Ja_list, int Jb_list, int Jnas, int Jnbs, int Ia_list, int Ib_list, int Inas, int Inbs, double weight)
 

Private Attributes

bool cleaned_up_ci_
 
bool ints_init_
 => Integrals <= /// More...
 
bool df_ints_init_
 
bool mcscf_object_init_
 
bool fzc_fock_computed_
 
std::shared_ptr
< IntegralTransform
ints_
 
std::shared_ptr< MOSpacerot_space_
 
std::shared_ptr< MOSpaceact_space_
 
std::shared_ptr< DFERIdferi_
 
std::shared_ptr< JKjk_
 
std::shared_ptr< SOMCSCFsomcscf_
 
SharedMatrix tei_raaa_
 
SharedMatrix tei_aaaa_
 
struct stringwr ** alplist_
 => Globals <= // More...
 
struct stringwr ** betlist_
 
struct calcinfoCalcInfo_
 
struct paramsParameters_
 
struct ci_blksCIblks_
 
struct olsen_graphAlphaG_
 
struct olsen_graphBetaG_
 
struct H_zero_blockH0block_
 
int ** s1_contrib_
 
int ** s2_contrib_
 
int ** s3_contrib_
 
int *** OV_
 
unsigned char *** Occs_
 
int sme_first_call_
 
int * same_alpha_
 
int * same_beta_
 
int * common_docc_
 
int * common_alp_socc_
 
int * common_bet_socc_
 
int init_nalp_
 
int init_nbet_
 
int ** I_diff_
 
int ** J_diff_
 
struct sigma_dataSigmaData_
 => Sigma Calculations <= // More...
 
bool opdm_called_
 
std::map< std::string,
SharedMatrix
opdm_map_
 
SharedMatrix opdm_
 
SharedMatrix opdm_a_
 
SharedMatrix opdm_b_
 
bool tpdm_called_
 
SharedMatrix tpdm_
 
SharedMatrix tpdm_aa_
 
SharedMatrix tpdm_ab_
 
SharedMatrix tpdm_bb_
 

Additional Inherited Members

- Static Public Member Functions inherited from psi::Wavefunction
static void initialize_singletons ()
 
- Protected Member Functions inherited from psi::Wavefunction
SharedMatrix C_subset_helper (SharedMatrix C, const Dimension &noccpi, SharedVector epsilon, const std::string &basis, const std::string &subset)
 Helpers for C/D/epsilon transformers. More...
 
SharedMatrix F_subset_helper (SharedMatrix F, SharedMatrix C, const std::string &basis)
 
SharedVector epsilon_subset_helper (SharedVector epsilon, const Dimension &noccpi, const std::string &basis, const std::string &subset)
 
std::vector< std::vector< int > > subset_occupation (const Dimension &noccpi, const std::string &subset)
 
- Protected Attributes inherited from psi::Wavefunction
std::string name_
 Name of the wavefunction. More...
 
std::map< std::string,
std::shared_ptr< BasisSet > > 
basissets_
 DF/RI/F12/etc basis sets. More...
 
std::shared_ptr< BasisSetbasisset_
 The ORBITAL basis. More...
 
std::shared_ptr< SOBasisSetsobasisset_
 Primary basis set for SO integrals. More...
 
SharedMatrix AO2SO_
 AO2SO conversion matrix (AO in rows, SO in cols) More...
 
std::shared_ptr< Moleculemolecule_
 Molecule that this wavefunction is run on. More...
 
Optionsoptions_
 Options object. More...
 
std::shared_ptr< PSIOpsio_
 
std::shared_ptr< IntegralFactoryintegral_
 Integral factory. More...
 
std::shared_ptr< MatrixFactoryfactory_
 Matrix factory for creating standard sized matrices. More...
 
std::shared_ptr< Wavefunctionreference_wavefunction_
 
long int memory_
 How much memory you have access to. More...
 
unsigned int debug_
 Debug flag. More...
 
unsigned int print_
 Print flag. More...
 
int nalpha_
 Total alpha and beta electrons. More...
 
int nbeta_
 
int nfrzc_
 Total frozen core orbitals. More...
 
Dimension doccpi_
 Number of doubly occupied per irrep. More...
 
Dimension soccpi_
 Number of singly occupied per irrep. More...
 
Dimension frzcpi_
 Number of frozen core per irrep. More...
 
Dimension frzvpi_
 Number of frozen virtuals per irrep. More...
 
Dimension nalphapi_
 Number of alpha electrons per irrep. More...
 
Dimension nbetapi_
 Number of beta electrons per irrep. More...
 
Dimension nsopi_
 Number of so per irrep. More...
 
Dimension nmopi_
 Number of mo per irrep. More...
 
bool density_fitted_
 Whether this wavefunction was obtained using density fitting. More...
 
double energy_
 The energy associated with this wavefunction. More...
 
double efzc_
 Frozen-core energy associated with this wavefunction. More...
 
int nso_
 Total number of SOs. More...
 
int nmo_
 Total number of MOs. More...
 
int nirrep_
 Number of irreps. More...
 
SharedMatrix S_
 Overlap matrix. More...
 
SharedMatrix H_
 Core Hamiltonian matrix. More...
 
SharedMatrix Horig_
 
SharedMatrix Ca_
 Alpha MO coefficients. More...
 
SharedMatrix Cb_
 Beta MO coefficients. More...
 
SharedMatrix Da_
 Alpha density matrix. More...
 
SharedMatrix Db_
 Beta density matrix. More...
 
SharedMatrix Lagrangian_
 Lagrangian matrix. More...
 
SharedMatrix Fa_
 Alpha Fock matrix. More...
 
SharedMatrix Fb_
 Beta Fock matrix. More...
 
std::shared_ptr< Vectorepsilon_a_
 Alpha orbital eneriges. More...
 
std::shared_ptr< Vectorepsilon_b_
 Beta orbital energies. More...
 
std::vector< void * > precallbacks_
 
std::vector< void * > postcallbacks_
 
SharedMatrix gradient_
 If a gradient is available it will be here: More...
 
SharedMatrix hessian_
 If a Hessian is available it will be here: More...
 
std::shared_ptr< Matrixtpdm_gradient_contribution_
 The TPDM contribution to the gradient. More...
 
std::shared_ptr< std::vector
< double > > 
atomic_point_charges_
 If atomic point charges are available they will be here. More...
 
std::shared_ptr< Vectorfrequencies_
 If frequencies are available, they will be here: More...
 
std::shared_ptr< Vectornormalmodes_
 If normal modes are available, they will be here: More...
 
bool same_a_b_dens_
 Same orbs or dens. More...
 
bool same_a_b_orbs_
 
std::map< std::string, double > variables_
 
std::map< std::string,
SharedMatrix
arrays_
 

Constructor & Destructor Documentation

psi::detci::CIWavefunction::CIWavefunction ( std::shared_ptr< Wavefunction reference_wavefunction)
psi::detci::CIWavefunction::CIWavefunction ( std::shared_ptr< Wavefunction reference_wavefunction,
Options options 
)
psi::detci::CIWavefunction::~CIWavefunction ( )
virtual

Member Function Documentation

void psi::detci::CIWavefunction::ci_nat_orbs ( )

Form CI Natural Orbitals (Warning! must build the OPDM beforehand)

void psi::detci::CIWavefunction::cleanup_ci ( void  )

Cleans up the strings, H0Block, and CIVectors associated with this Wavefunction.

void psi::detci::CIWavefunction::cleanup_dpd ( void  )

Cleans up the DPD library and associated integrals associated with this Wavefunction.

void psi::detci::CIWavefunction::common_init ( void  )
private

Sets the ciwavefunction object.

void psi::detci::CIWavefunction::compute_cc ( void  )
double psi::detci::CIWavefunction::compute_energy ( )
virtual

Compute energy. Subclasses override this function to compute its energy.

Reimplemented from psi::Wavefunction.

void psi::detci::CIWavefunction::compute_mpn ( )
void psi::detci::CIWavefunction::compute_state_transfer ( SharedCIVector  ref,
int  ref_vec,
SharedMatrix  prop,
SharedCIVector  ret 
)

Compute the state-transfer operator. Currently in construction and not to be used.

void psi::detci::CIWavefunction::convergence_death ( )
private
SharedCIVector psi::detci::CIWavefunction::D_vector ( )

Returns the "D" vector that contains the current reference CI Wavefunction

Returns
The "D" vector
int psi::detci::CIWavefunction::diag_h ( double  econv = -1.0,
double  rconv = -1.0 
)
void psi::detci::CIWavefunction::form_gmat ( SharedVector  onel,
SharedVector  twoel,
SharedVector  output 
)
private
void psi::detci::CIWavefunction::form_opdm ( void  )

Forms the "special" OPDM of the current Dvec.

void psi::detci::CIWavefunction::form_ov ( )
private
void psi::detci::CIWavefunction::form_strings ( void  )
private
void psi::detci::CIWavefunction::form_tpdm ( void  )

Forms the "special" TPDM of the current Dvec.

Dimension psi::detci::CIWavefunction::get_dimension ( const std::string &  orbital_name)

! Gets the dimension of the desired subspace.

Parameters
orbital_nameFZC, DRC, DOCC, ACT, RAS1, RAS2, RAS3, RAS4, POP, VIR, FZV, DRV, or ALL
Returns
dim Dimension object

Figure out orbital positions

void psi::detci::CIWavefunction::get_mo_info ( )
private

=> General Helper Functions <= ///

Paramater and CalcInfo setters

double psi::detci::CIWavefunction::get_onel ( int  i,
int  j 
)
private
SharedMatrix psi::detci::CIWavefunction::get_opdm ( int  Iroot = -1,
int  Jroot = -1,
const std::string &  spin = "SUM",
bool  full_space = false 
)

! Obtains the OPDM <Iroot| Epq |Jroot> from the ciwave object. If Jroot is negative then Iroot == Jroot, if both roots are -1 then the "special" CI OPDM is returned.

Parameters
IrootLeft root
JrootRight root
spinSelects which spin to return: A, B, or SUM
full_spaceIf false return only the active OPDM else return full OPDM
Returns
OPDM or TDM shared matrix
SharedMatrix psi::detci::CIWavefunction::get_orbitals ( const std::string &  orbital_name)

! Similar to wavefunction.Ca_subset(); however, this version knows about all of the CI subspaces in the SO basis. We stick to the MCSCF definitions for now.

Parameters
orbital_namefzc, drc, docc, act, ras1, ras2, ras3, ras4, pop, vir, fzv, drv, or all
Returns
C Returns the appropriate orbitals in the SO basis.

Figure out orbital positions

Fill desired orbitals

Cleanup

void psi::detci::CIWavefunction::get_parameters ( Options options)
private
SharedMatrix psi::detci::CIWavefunction::get_tpdm ( const std::string &  spin = "SUM",
bool  symmetrize = true 
)

! Obtains the "special" TPDM, other TPDM roots are not held here. The AA (BB) order: {pqrs} & = 0 | a_{p }^ a_{r }^{} a_{s } a_{q } | 0 The AB order: {pqrs} & = 0 | a_{p }^ a_{r }^{} a_{s } a_{q } | 0

Parameters
spinSelects which spin to return AA, AB, BB, or SUM
symmetrizeSymmetrize the TPDM, only works for SUM currently
Returns
The request 4D active TPDM
double psi::detci::CIWavefunction::get_twoel ( int  i,
int  j,
int  k,
int  l 
)
private
int psi::detci::CIWavefunction::H0block_calc ( double  E)
private
void psi::detci::CIWavefunction::H0block_coupling_calc ( double  E)
private
void psi::detci::CIWavefunction::H0block_fill ( void  )
private
void psi::detci::CIWavefunction::H0block_filter_setup ( void  )
private
void psi::detci::CIWavefunction::H0block_free ( void  )
private
void psi::detci::CIWavefunction::H0block_gather ( double **  mat,
int  al,
int  bl,
int  cscode,
int  mscode,
int  phase 
)
private
void psi::detci::CIWavefunction::H0block_init ( unsigned int  size)
private

=> H0block functions <= //

void psi::detci::CIWavefunction::H0block_pairup ( int  guess)
private
void psi::detci::CIWavefunction::H0block_print ( void  )
private
void psi::detci::CIWavefunction::H0block_setup ( int  num_blocks,
int *  Ia_code,
int *  Ib_code 
)
private
void psi::detci::CIWavefunction::H0block_spin_cpl_chk ( void  )
private
void psi::detci::CIWavefunction::H0block_xy ( double *  x,
double *  y,
double  E 
)
private
SharedMatrix psi::detci::CIWavefunction::hamiltonian ( size_t  hsize = 0)

Functions below this line should be used for debug use only.

Builds the full CI hamiltonian for debugging purposes. Currently limits itself to a matrix of 40% of Psi4's memory in size.

Parameters
hsizeCompute the first hsize elements of the CI Hamiltonian
Returns
The requested CI Hamiltonian.
SharedCIVector psi::detci::CIWavefunction::Hd_vector ( int  hd_type = -1)

Builds a CIVector that is the diagonal of the Hamiltonian

Parameters
hd_typeThe type of diagonal to be taken, if -1 defaults to current parameters 0 = HD_EXACT 1 = HD_KAVE 2 = ORB_ENER 3 = EVANGELISTI 4 = LEININGER 5 = Z_HD_KAVE
Returns
The Hamiltonian diagonal
void psi::detci::CIWavefunction::init_mcscf_object ( )
private

General transforms.

double psi::detci::CIWavefunction::matrix_element ( SlaterDeterminant I,
SlaterDeterminant J 
)
private

=> Slater Matrix Elements <= //

std::shared_ptr< SOMCSCF > psi::detci::CIWavefunction::mcscf_object ( )
void psi::detci::CIWavefunction::mitrush_iter ( CIvect Hd,
struct stringwr **  alplist,
struct stringwr **  betlist,
int  nroots,
double *  evals,
double  conv_rms,
double  conv_e,
double  enuc,
double  edrc,
int  maxiter,
int  maxnvect 
)
private

=> CI Iterators <= //

void psi::detci::CIWavefunction::mitrush_update ( CIvect C,
CIvect S,
double  norm,
double  acur,
double  alast,
double *  buffer1,
double *  buffer2,
int  curr,
int  next 
)
private
void psi::detci::CIWavefunction::mpn_generator ( CIvect Hd)
private

=> MCSCF helpers <= //

=> MPn helpers <= //

size_t psi::detci::CIWavefunction::ndet ( )

Simple accessors.

SharedCIVector psi::detci::CIWavefunction::new_civector ( int  maxnvect,
int  filenum,
bool  use_disk = true,
bool  buf_init = true 
)

! Builds and returns a new CIvect object.

Parameters
maxnvectMaximum number of vectors in the CIvector
filenumFile number to use for the on-disk data
use_diskIf false CIvect disables read/write
buf_initIf true initializes the buffers internally
Returns
SharedCIVector object
void psi::detci::CIWavefunction::olsen_iter_xy ( CIvect C,
CIvect S,
CIvect Hd,
double *  x,
double *  y,
double *  buffer1,
double *  buffer2,
double  E,
int  curvect,
int  L,
double **  alpha,
struct stringwr **  alplist,
struct stringwr **  betlist 
)
private
void psi::detci::CIWavefunction::olsen_update ( CIvect C,
CIvect S,
CIvect Hd,
double  E,
double  E_est,
double *  norm,
double *  c1norm,
double *  ovrlap,
double *  buffer1,
double *  buffer2,
int  curr,
int  next,
std::string  out,
int  iter,
struct stringwr **  alplist,
struct stringwr **  betlist 
)
private
void psi::detci::CIWavefunction::onel_ints_from_jk ( )
private
std::vector< SharedMatrix > psi::detci::CIWavefunction::opdm ( SharedCIVector  Ivec,
SharedCIVector  Jvec,
int  Iroot,
int  Jroot 
)

! Compute the one-particle density matrix between two CIVectors

Parameters
IvecThe SharedCIVector for I
JvecThe SharedCIVector for J
JrootJroot to use
IrootIroot to use
Returns
AA, BB, and summed OPDM's
std::vector< std::vector< SharedMatrix > > psi::detci::CIWavefunction::opdm ( SharedCIVector  Ivec,
SharedCIVector  Jvec,
std::vector< std::tuple< int, int > >  states_vec 
)
private

=> Density Matrix helpers <= //

SharedMatrix psi::detci::CIWavefunction::opdm_add_inactive ( SharedMatrix  opdm,
double  value,
bool  virt = false 
)
private
void psi::detci::CIWavefunction::opdm_block ( struct stringwr **  alplist,
struct stringwr **  betlist,
double **  onepdm_a,
double **  onepdm_b,
double **  CJ,
double **  CI,
int  Ja_list,
int  Jb_list,
int  Jnas,
int  Jnbs,
int  Ia_list,
int  Ib_list,
int  Inas,
int  Inbs 
)
private
void psi::detci::CIWavefunction::orbital_locations ( const std::string &  orbital_name,
int *  start,
int *  end 
)
private

Find out which orbitals belong hwere.

void psi::detci::CIWavefunction::parse_import_vector ( SlaterDetSet sdset,
int *  ialplist,
int *  ialpidx,
int *  ibetlist,
int *  ibetidx,
int *  blknums 
)
private
void psi::detci::CIWavefunction::pitzer_to_ci_order_onel ( SharedMatrix  src,
SharedVector  dest 
)

Takes a pitzer order act x act Matrix and converts it into a ci-ordered vector that CI sigma vectors use.

Parameters
srcSource Matrix - can have irreps
destDestination Vector - should be of size, ncitri = (nact * (nact + 1)) / 2
void psi::detci::CIWavefunction::pitzer_to_ci_order_twoel ( SharedMatrix  src,
SharedVector  dest 
)

Takes a pitzer order act^2 x act^2 Matrix and converts it into a ci-ordered vector that CI sigma vectors use.

Parameters
srcSource Matrix - Cannot have irreps
destDestination Vector - should be of size, (ncitri * (nctri + 1)) / 2
std::string psi::detci::CIWavefunction::print_config ( int  nbf,
int  num_alp_el,
int  num_bet_el,
struct stringwr stralp,
struct stringwr strbet,
int  num_drc_orbs 
)
private
void psi::detci::CIWavefunction::print_parameters ( void  )
private
void psi::detci::CIWavefunction::print_ras_parameters ( void  )
private
void psi::detci::CIWavefunction::print_vec ( unsigned int  nprint,
int *  Ialist,
int *  Iblist,
int *  Iaidx,
int *  Ibidx,
double *  coeff 
)
private
void psi::detci::CIWavefunction::print_vector ( SharedCIVector  vec,
int  root 
)

Prints the large values in a CIVector

Parameters
vecCIVector to print
rootWhich root?
void psi::detci::CIWavefunction::read_dpd_ci_ints ( )
private
void psi::detci::CIWavefunction::rotate_dfmcscf_twoel_ints ( SharedMatrix  K,
SharedVector  twoel_out 
)
private
void psi::detci::CIWavefunction::rotate_mcscf_integrals ( SharedMatrix  K,
SharedVector  onel_out,
SharedVector  twoel_out 
)

Rotates the integrals for MCSCF computations, places the integrals in CI order.

Parameters
KRotation matrix (active x N)
onel_outone-electron output vector
twoel_outtwo-electron output vector
void psi::detci::CIWavefunction::rotate_mcscf_twoel_ints ( SharedMatrix  K,
SharedVector  twoel_out 
)
private
void psi::detci::CIWavefunction::sem_iter ( CIvect Hd,
struct stringwr **  alplist,
struct stringwr **  betlist,
double *  evals,
double  conv_e,
double  conv_rms,
double  enuc,
double  edrc,
int  nroots,
int  maxiter,
int  maxnvect 
)
private
void psi::detci::CIWavefunction::sem_test ( double **  A,
int  N,
int  M,
int  L,
double **  evecs,
double *  evals,
double **  b,
double  conv_e,
double  conv_rms,
int  maxiter,
double  offst,
int *  vu,
int  maxnvect 
)
private
void psi::detci::CIWavefunction::semicanonical_orbs ( )

Form CI Semicanonical Orbitals

void psi::detci::CIWavefunction::set_ci_guess ( std::string  guess)

Sets the diag_h guess option. !Expert option.

Parameters
guessCI Guess: (UNIT, H0_BLOCK, or DFLIE)
void psi::detci::CIWavefunction::set_ciblks ( )
private
void psi::detci::CIWavefunction::set_orbitals ( const std::string &  orbital_name,
SharedMatrix  orbitals 
)

! Similar to wavefunction.Ca_subset(); however, this version knows about all of the CI subspaces in the SO basis. We stick to the MCSCF definitions for now.

Parameters
orbital_nameFZC, DRC, DOCC, ACT, RAS1, RAS2, RAS3, RAS4, POP, VIR, FZV, DRV, or ALL
orbitalsSharedMatrix to set

Figure out orbital positions

Fill desired orbitals

Cleanup

void psi::detci::CIWavefunction::set_ras_parameters ( void  )
private
void psi::detci::CIWavefunction::setup_dfmcscf_ints ( )
private

DF integral functions.

Build JK object

Build DF object

void psi::detci::CIWavefunction::setup_mcscf_ints ( )
private

Non-DF integral functions.

void psi::detci::CIWavefunction::setup_mcscf_ints_ao ( )
private
void psi::detci::CIWavefunction::sigma ( SharedCIVector  C,
SharedCIVector  S,
int  cvec,
int  svec 
)

Compute a sigma vector

Parameters
CInput vector
SOutput vector
cvecWhich vector number to use for the C vec
svecWhich vector number to use for the S vec
void psi::detci::CIWavefunction::sigma ( SharedCIVector  C,
SharedCIVector  S,
int  cvec,
int  svec,
SharedVector  oei,
SharedVector  tei 
)

Compute a sigma vector

Parameters
CInput vector
SOutput vector
cvecWhich vector number to use for the C vec
svecWhich vector number to use for the S vec
oeiOne-electron integrals to use
teiTwo-electron integrals to use
void psi::detci::CIWavefunction::sigma ( CIvect C,
CIvect S,
double *  oei,
double *  tei,
int  ivec 
)
private
void psi::detci::CIWavefunction::sigma_a ( struct stringwr **  alplist,
struct stringwr **  betlist,
CIvect C,
CIvect S,
double *  oei,
double *  tei,
int  fci,
int  ivec 
)
private
void psi::detci::CIWavefunction::sigma_b ( struct stringwr **  alplist,
struct stringwr **  betlist,
CIvect C,
CIvect S,
double *  oei,
double *  tei,
int  fci,
int  ivec 
)
private
void psi::detci::CIWavefunction::sigma_block ( struct stringwr **  alplist,
struct stringwr **  betlist,
double **  cmat,
double **  smat,
double *  oei,
double *  tei,
int  fci,
int  cblock,
int  sblock,
int  nas,
int  nbs,
int  sac,
int  sbc,
int  cac,
int  cbc,
int  cnas,
int  cnbs,
int  cnac,
int  cnbc,
int  sbirr,
int  cbirr,
int  Ms0 
)
private
void psi::detci::CIWavefunction::sigma_c ( struct stringwr **  alplist,
struct stringwr **  betlist,
CIvect C,
CIvect S,
double *  oei,
double *  tei,
int  fci,
int  ivec 
)
private
void psi::detci::CIWavefunction::sigma_free ( void  )
private
void psi::detci::CIWavefunction::sigma_get_contrib ( struct stringwr **  alplist,
struct stringwr **  betlist,
CIvect C,
CIvect S,
int **  s1_contrib,
int **  s2_contrib,
int **  s3_contrib 
)
private
void psi::detci::CIWavefunction::sigma_get_contrib_rotf ( CIvect C,
CIvect S,
int **  s1_contrib,
int **  s2_contrib,
int **  s3_contrib,
int *  Cnt[2],
int **  Ij[2],
int **  Oij[2],
int **  Ridx[2],
signed char **  Sgn[2],
unsigned char **  Toccs 
)
private
void psi::detci::CIWavefunction::sigma_init ( CIvect C,
CIvect S 
)
private
SharedMatrix psi::detci::CIWavefunction::symm_block ( SharedMatrix  x,
Dimension  dim1,
Dimension  dim2 
)
private

Symmetry block a matrix.

void psi::detci::CIWavefunction::tf_onel_ints ( SharedVector  onel,
SharedVector  twoel,
SharedVector  output 
)
private
void psi::detci::CIWavefunction::title ( bool  is_mcscf)
private
std::vector< SharedMatrix > psi::detci::CIWavefunction::tpdm ( SharedCIVector  Ivec,
SharedCIVector  Jvec,
int  Iroot,
int  Jroot 
)

! Compute the two-particle density matrix between two CIVectors

Parameters
IvecThe SharedCIVector for I
JvecThe SharedCIVector for J
JrootJroot to use
IrootIroot to use
Returns
AA, AB, BB, and summed TPDM's
std::vector< SharedMatrix > psi::detci::CIWavefunction::tpdm ( SharedCIVector  Ivec,
SharedCIVector  Jvec,
std::vector< std::tuple< int, int, double > >  states_vec 
)
private
void psi::detci::CIWavefunction::tpdm_block ( struct stringwr **  alplist,
struct stringwr **  betlist,
int  nbf,
int  nalplists,
int  nbetlists,
double *  twopdm_aa,
double *  twopdm_bb,
double *  twopdm_ab,
double **  CJ,
double **  CI,
int  Ja_list,
int  Jb_list,
int  Jnas,
int  Jnbs,
int  Ia_list,
int  Ib_list,
int  Inas,
int  Inbs,
double  weight 
)
private
void psi::detci::CIWavefunction::transform_ci_integrals ( void  )

! Transform the one and two electron integrals for a CI computation.

void psi::detci::CIWavefunction::transform_dfmcscf_ints ( bool  approx_only = false)
private
void psi::detci::CIWavefunction::transform_mcscf_integrals ( bool  approx_only)

! Transform the one and two electron integrals for a MCSCF computation.

void psi::detci::CIWavefunction::transform_mcscf_ints ( bool  approx_only = false)
private
void psi::detci::CIWavefunction::transform_mcscf_ints_ao ( bool  approx_only = false)
private

MO transformation through TeraCHEM-like Added in by Kevin Patrick Hannon

Perform a integral transformation using jk object KPH got this idea from Hohenstein's AO-CASSCF paper. The goal is to use direct scf algorithm for computing the transformed integrals This takes advantage of sparsity and allows for larger scale casscf calculations.

J(D)_{mu nu} = (mu nu | rho sigma ) D_{rho sigma} Step 1: Form a density for every active orbital ie for every u and v form a density using C_DGER D_{mu nu}^{uv} = C_{mu u}C_{nu}^{v} Step 2: Fill the JK object with these densities Step 3: Build the J matrix Step 4: (p u | x y) = C_{mu p}^{T} J(D_{mu nu}^{xy}A)_{mu nu} C_{nu u} Step 5: Transfer these integrals to CI and SOMCSCF for CASSCF optimization

If C1, do not do. C_{mu_ao i} = C_{mu_so i} if C1

Step 1: D_{mu nu} ^{tu} = C_{mu t} C_{nu u} forall t, u in active

Step 2: Compute the Coulomb build using these density

Step 3: Fill the integrals for SOSCF in_core TODO: Figure out WTF is going on with ordering. For LARGE (>40) active spaces, it is possible that N*A^3 might become too big

Member Data Documentation

std::shared_ptr<MOSpace> psi::detci::CIWavefunction::act_space_
private
struct olsen_graph* psi::detci::CIWavefunction::AlphaG_
private
struct stringwr** psi::detci::CIWavefunction::alplist_
private

=> Globals <= //

struct olsen_graph* psi::detci::CIWavefunction::BetaG_
private
struct stringwr** psi::detci::CIWavefunction::betlist_
private
struct calcinfo* psi::detci::CIWavefunction::CalcInfo_
private
struct ci_blks* psi::detci::CIWavefunction::CIblks_
private
bool psi::detci::CIWavefunction::cleaned_up_ci_
private
int * psi::detci::CIWavefunction::common_alp_socc_
private
int * psi::detci::CIWavefunction::common_bet_socc_
private
int* psi::detci::CIWavefunction::common_docc_
private
bool psi::detci::CIWavefunction::df_ints_init_
private
std::shared_ptr<DFERI> psi::detci::CIWavefunction::dferi_
private
bool psi::detci::CIWavefunction::fzc_fock_computed_
private
struct H_zero_block* psi::detci::CIWavefunction::H0block_
private
int** psi::detci::CIWavefunction::I_diff_
private
int psi::detci::CIWavefunction::init_nalp_
private
int psi::detci::CIWavefunction::init_nbet_
private
std::shared_ptr<IntegralTransform> psi::detci::CIWavefunction::ints_
private
bool psi::detci::CIWavefunction::ints_init_
private

=> Integrals <= ///

int ** psi::detci::CIWavefunction::J_diff_
private
std::shared_ptr<JK> psi::detci::CIWavefunction::jk_
private
bool psi::detci::CIWavefunction::mcscf_object_init_
private
unsigned char*** psi::detci::CIWavefunction::Occs_
private
SharedMatrix psi::detci::CIWavefunction::opdm_
private
SharedMatrix psi::detci::CIWavefunction::opdm_a_
private
SharedMatrix psi::detci::CIWavefunction::opdm_b_
private
bool psi::detci::CIWavefunction::opdm_called_
private
std::map<std::string, SharedMatrix> psi::detci::CIWavefunction::opdm_map_
private
int*** psi::detci::CIWavefunction::OV_
private
struct params* psi::detci::CIWavefunction::Parameters_
private
std::shared_ptr<MOSpace> psi::detci::CIWavefunction::rot_space_
private
int** psi::detci::CIWavefunction::s1_contrib_
private
int ** psi::detci::CIWavefunction::s2_contrib_
private
int ** psi::detci::CIWavefunction::s3_contrib_
private
int* psi::detci::CIWavefunction::same_alpha_
private
int * psi::detci::CIWavefunction::same_beta_
private
struct sigma_data* psi::detci::CIWavefunction::SigmaData_
private

=> Sigma Calculations <= //

int psi::detci::CIWavefunction::sme_first_call_
private
std::shared_ptr<SOMCSCF> psi::detci::CIWavefunction::somcscf_
private
SharedMatrix psi::detci::CIWavefunction::tei_aaaa_
private
SharedMatrix psi::detci::CIWavefunction::tei_raaa_
private
SharedMatrix psi::detci::CIWavefunction::tpdm_
private
SharedMatrix psi::detci::CIWavefunction::tpdm_aa_
private
SharedMatrix psi::detci::CIWavefunction::tpdm_ab_
private
SharedMatrix psi::detci::CIWavefunction::tpdm_bb_
private
bool psi::detci::CIWavefunction::tpdm_called_
private

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