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

#include <hf.h>

Inheritance diagram for psi::scf::HF:
psi::Wavefunction psi::scf::CUHF psi::scf::RHF psi::scf::ROHF psi::scf::UHF

Public Member Functions

 HF (SharedWavefunction ref_wfn, std::shared_ptr< SuperFunctional > funct, Options &options, std::shared_ptr< PSIO > psio)
 
virtual ~HF ()
 
int iteration () const
 Get and set current iteration. More...
 
void set_iteration (int iter)
 
bool diis_enabled () const
 Are we even using DIIS? More...
 
void set_diis_enabled (bool tf)
 
int diis_start () const
 When do we start collecting vectors for DIIS. More...
 
void set_diis_start (int iter)
 
bool frac_performed () const
 Frac performed current iteration? More...
 
void set_frac_performed (bool tf)
 
bool MOM_excited () const
 Are we to do excited-state MOM? More...
 
void set_MOM_excited (bool tf)
 
bool MOM_performed () const
 MOM performed? More...
 
void set_MOM_performed (bool tf)
 
int attempt_number () const
 
void set_attempt_number (int an)
 
virtual bool stability_analysis ()
 Check the stability of the wavefunction, and correct (if requested) More...
 
virtual double compute_initial_E ()
 
void check_phases ()
 Check MO phases. More...
 
void print_orbitals ()
 Prints the orbitals in arbitrary order (works with MOM) More...
 
void print_header ()
 Prints some opening information. More...
 
void print_preiterations ()
 Prints some details about nsopi/nmopi, and initial occupations. More...
 
virtual void compute_spin_contamination ()
 
std::shared_ptr< DIISManagerdiis_manager () const
 The DIIS object. More...
 
void set_initialized_diis_manager (bool tf)
 
bool initialized_diis_manager () const
 
std::shared_ptr< JKjk () const
 The JK object (or null if it has been deleted) More...
 
void set_jk (std::shared_ptr< JK > jk)
 Sets the internal JK object (expert) More...
 
std::shared_ptr< SuperFunctionalfunctional () const
 The DFT Functional object (or null if it has been deleted) More...
 
std::shared_ptr< VBaseV_potential () const
 The DFT Potential object (or null if it has been deleted) More...
 
std::shared_ptr< Vectoroccupation_a () const
 Returns the occupation vectors. More...
 
std::shared_ptr< Vectoroccupation_b () const
 
virtual void save_density_and_energy ()
 Save the current density and energy. More...
 
void reset_occupation ()
 Reset to regular occupation from the fractional occupation. More...
 
virtual double compute_E ()
 Compute energy for the iteration. More...
 
virtual int soscf_update (double soscf_conv, int soscf_min_iter, int soscf_max_iter, int soscf_print)
 
void find_occupation ()
 Figure out how to occupy the orbitals in the absence of DOCC and SOCC. More...
 
virtual bool diis ()
 
virtual double compute_orbital_gradient (bool save_diis, int max_diis_vectors)
 
virtual void damping_update (double)
 
virtual void finalize ()
 
virtual void semicanonicalize ()
 
void frac_renormalize ()
 Renormalize orbitals to 1.0 before saving. More...
 
virtual void form_H ()
 Formation of H is the same regardless of RHF, ROHF, UHF. More...
 
virtual void initialize_jk (size_t effective_memory_doubles)
 Do any needed integral JK setup. More...
 
void form_Shalf ()
 Formation of S^+1/2 and S^-1/2 are the same. More...
 
virtual void guess ()
 Form the guess (guarantees C, D, and E) More...
 
virtual void form_C ()
 Compute the MO coefficients (C_) More...
 
virtual void form_D ()
 Computes the density matrix (D_) More...
 
virtual void form_V ()
 Computes the density matrix (V_) More...
 
virtual void form_F ()
 
virtual void form_G ()
 
void rotate_orbitals (SharedMatrix C, const SharedMatrix x)
 
virtual std::vector< SharedMatrixonel_Hx (std::vector< SharedMatrix > x)
 Hessian-vector computers and solvers. More...
 
virtual std::vector< SharedMatrixtwoel_Hx (std::vector< SharedMatrix > x, bool combine=true, std::string return_basis="MO")
 
virtual std::vector< SharedMatrixcphf_Hx (std::vector< SharedMatrix > x)
 
virtual std::vector< SharedMatrixcphf_solve (std::vector< SharedMatrix > x_vec, double conv_tol=1.e-4, int max_iter=10, int print_lvl=1)
 
bool cphf_converged ()
 
int cphf_nfock_builds ()
 
SharedMatrix Va ()
 
SharedMatrix Vb ()
 
void guess_Ca (SharedMatrix Ca)
 
void guess_Cb (SharedMatrix Cb)
 
bool reset_occ () const
 
void set_reset_occ (bool reset)
 
void set_sad_basissets (std::vector< std::shared_ptr< BasisSet >> basis_vec)
 
void set_sad_fitting_basissets (std::vector< std::shared_ptr< BasisSet >> basis_vec)
 
void set_energies (std::string key, double value)
 
double get_energies (std::string key)
 
void clear_external_potentials ()
 
void push_back_external_potential (const SharedMatrix &V)
 
- 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 (SharedWavefunction reference_wavefunction, Options &options)
 Blank constructor for derived classes. 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)
 
std::shared_ptr< Wavefunctionc1_deep_copy (std::shared_ptr< BasisSet > basis)
 
virtual ~Wavefunction ()
 
virtual double compute_energy ()
 Compute energy. Subclasses override this function to compute its energy. More...
 
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...
 
std::array< double, 3 > get_dipole_field_strength () const
 
FieldType get_dipole_perturbation_type () const
 
void force_doccpi (const Dimension &doccpi)
 Expert specialized use only. Sets the number of doubly occupied orbitals per irrep. Results in an inconsistent Wavefunction object for SCF purposes, so caution is advised. More...
 
void force_soccpi (const Dimension &soccpi)
 Expert specialized use only. Sets the number of singly occupied orbitals per irrep. Results in an inconsistent Wavefunction object for SCF purposes, so caution is advised. More...
 
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...
 
SharedVector epsilon_a () const
 Returns the alpha orbital energies. More...
 
SharedVector epsilon_b () const
 Returns the beta orbital energies. More...
 
SharedMatrix Lagrangian () const
 Returns the SO basis Lagrangian. 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") const
 
SharedMatrix Cb_subset (const std::string &basis="SO", const std::string &subset="ALL") const
 
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") const
 
SharedMatrix Db_subset (const std::string &basis="SO") const
 
SharedMatrix D_subset_helper (SharedMatrix D, SharedMatrix C, const std::string &basis) const
 
SharedMatrix Fa_subset (const std::string &basis="SO") const
 
SharedMatrix Fb_subset (const std::string &basis="SO") const
 
SharedMatrix F_subset_helper (SharedMatrix F, SharedMatrix C, const std::string &basis) const
 
SharedMatrix matrix_subset_helper (SharedMatrix M, SharedMatrix C, const std::string &basis, const std::string matrix_basename) const
 
SharedVector epsilon_a_subset (const std::string &basis="SO", const std::string &subset="ALL") const
 
SharedVector epsilon_b_subset (const std::string &basis="SO", const std::string &subset="ALL") const
 
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 > > 
esp_at_nuclei () const
 Returns electrostatic potentials at nuclei. More...
 
std::shared_ptr< Vectorget_esp_at_nuclei () const
 Returns electrostatic potentials at nuclei in Vector form for python output. More...
 
void set_esp_at_nuclei (const std::shared_ptr< std::vector< double >> &nesps)
 Sets the electrostatic potentials at nuclei. More...
 
std::vector< SharedVectormo_extents () const
 Returns Molecular orbital extents. More...
 
std::vector< SharedVectorget_mo_extents () const
 Returns Molecular orbital extents in Vector form for python output. More...
 
void set_mo_extents (const std::vector< SharedVector > mo_es)
 Sets molecular orbital extents. More...
 
std::shared_ptr< std::vector
< double > > 
atomic_point_charges () const
 Returns the atomic point charges. More...
 
SharedVector get_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::vector< std::vector
< std::tuple< double, int, int > > > 
no_occupations () const
 Returns NO occupations. More...
 
std::vector< std::vector
< std::tuple< double, int, int > > > 
get_no_occupations () const
 Returns the NO occupations in vector form for python output. More...
 
void set_no_occupations (const std::vector< std::vector< std::tuple< double, int, int >>> no_ocs)
 Sets the NO occupations. More...
 
SharedVector frequencies () const
 Returns the frequencies. More...
 
void set_frequencies (std::shared_ptr< Vector > &freqs)
 Set the frequencies 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 (size_t print)
 
void set_debug (size_t debug)
 
virtual void save () const
 Save the wavefunction to checkpoint. More...
 
void set_external_potential (std::shared_ptr< ExternalPotential > external)
 
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 ()
 
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 set_PCM (const std::shared_ptr< PCM > &pcm)
 Set PCM object. More...
 
std::shared_ptr< PCM > get_PCM () const
 Get PCM object. More...
 
bool PCM_enabled () const
 

Protected Member Functions

virtual void prepare_canonical_orthogonalization ()
 Edit matrices if we are doing canonical orthogonalization. More...
 
void print_occupation ()
 Prints the orbital occupation. More...
 
void common_init ()
 Common initializer. More...
 
void MOM ()
 Maximum overlap method for prevention of oscillation/excited state SCF. More...
 
void MOM_start ()
 Start the MOM algorithm (requires one iteration worth of setup) More...
 
void frac ()
 Fractional occupation UHF/UKS. More...
 
void print_stability_analysis (std::vector< std::pair< double, int >> &vec)
 
void compute_fcpi ()
 Determine how many core and virtual orbitals to freeze. More...
 
void compute_fvpi ()
 
void print_orbital_pairs (const char *header, std::vector< std::pair< double, std::pair< std::string, int >>> orbs)
 Prints the orbitals energies and symmetries (helper method) More...
 
void compute_SAD_guess ()
 SAD Guess and propagation. More...
 
virtual void diagonalize_F (const SharedMatrix &F, SharedMatrix &C, std::shared_ptr< Vector > &eps)
 
virtual void form_initial_C ()
 
virtual SharedMatrix form_Fia (SharedMatrix Fso, SharedMatrix Cso, int *noccpi)
 
virtual SharedMatrix form_FDSmSDF (SharedMatrix Fso, SharedMatrix Dso)
 
virtual void format_guess ()
 
- 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) const
 Helpers for C/D/epsilon transformers. More...
 
SharedVector epsilon_subset_helper (SharedVector epsilon, const Dimension &noccpi, const std::string &basis, const std::string &subset) const
 
std::vector< std::vector< int > > subset_occupation (const Dimension &noccpi, const std::string &subset) const
 

Protected Attributes

double Drms_
 
SharedMatrix T_
 The kinetic energy matrix. More...
 
SharedMatrix V_
 The 1e potential energy matrix. More...
 
SharedMatrix Horig_
 A temporary spot for the H matrix. More...
 
SharedMatrix Va_
 The DFT potential matrices (nice naming scheme) More...
 
SharedMatrix Vb_
 
SharedMatrix X_
 The orthogonalization matrix (symmetric or canonical) More...
 
SharedMatrix diag_temp_
 Temporary matrix for diagonalize_F. More...
 
SharedMatrix diag_F_temp_
 Temporary matrix for diagonalize_F. More...
 
SharedMatrix diag_C_temp_
 Temporary matrix for diagonalize_F. More...
 
std::vector< SharedMatrixexternal_potentials_
 
SharedMatrix Ca_old_
 Old C Alpha matrix (if needed for MOM) More...
 
SharedMatrix Cb_old_
 Old C Beta matrix (if needed for MOM) More...
 
SharedMatrix guess_Ca_
 User defined orbitals. More...
 
SharedMatrix guess_Cb_
 
std::map< std::string, double > energies_
 Table of energy components. More...
 
std::vector< std::shared_ptr
< BasisSet > > 
sad_basissets_
 Basis list for SAD. More...
 
std::vector< std::shared_ptr
< BasisSet > > 
sad_fitting_basissets_
 
bool ref_C_
 
int iteration_
 Current Iteration. More...
 
bool converged_
 Did the SCF converge? More...
 
double nuclearrep_
 Nuclear repulsion energy. More...
 
bool input_docc_
 DOCC vector from input (if found) More...
 
bool input_socc_
 SOCC vector from input (if found) More...
 
bool broken_symmetry_
 Whether its broken symmetry solution or not. More...
 
Dimension original_doccpi_
 
Dimension original_soccpi_
 
int original_nalpha_
 
int original_nbeta_
 
bool reset_occ_
 
int * so2symblk_
 Mapping arrays. More...
 
int * so2index_
 
std::string scf_type_
 SCF algorithm type. More...
 
double integral_threshold_
 The value below which integrals are neglected. More...
 
std::shared_ptr< JKjk_
 The soon to be ubiquitous JK object. More...
 
bool MOM_enabled_
 Are we to do MOM? More...
 
bool MOM_excited_
 Are we to do excited-state MOM? More...
 
bool MOM_performed_
 MOM performed? More...
 
bool frac_performed_
 Frac started? (Same thing as frac_performed_) More...
 
bool initialized_diis_manager_
 DIIS manager intiialized? More...
 
std::shared_ptr< DIISManagerdiis_manager_
 DIIS manager for all SCF wavefunctions. More...
 
int diis_start_
 When do we start collecting vectors for DIIS. More...
 
int diis_enabled_
 Are we even using DIIS? More...
 
double radius_
 
double thickness_
 
int r_points_
 
int theta_points_
 
int phi_points_
 
std::shared_ptr< SuperFunctionalfunctional_
 DFT variables. More...
 
std::shared_ptr< VBasepotential_
 
int cphf_nfock_builds_
 
bool cphf_converged_
 
int attempt_number_
 
int nelectron_
 The number of electrons. More...
 
int charge_
 The charge of the system. More...
 
int multiplicity_
 The multiplicity of the system (specified as 2 Ms + 1) More...
 
- 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...
 
int perturb_h_
 Perturb the Hamiltonian? More...
 
FieldType dipole_field_type_
 
std::array< double, 3 > dipole_field_strength_
 How big of a field perturbation to apply. More...
 
size_t debug_
 Debug flag. More...
 
size_t 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 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...
 
SharedVector epsilon_a_
 Alpha orbital eneriges. More...
 
SharedVector epsilon_b_
 Beta orbital energies. More...
 
SharedMatrix gradient_
 gradient, if available, as natom_ x 3 SharedMatrix More...
 
SharedMatrix hessian_
 Hessian, if available, as natom_*3 x natom_*3 SharedMatrix (NOT mass-weighted!) More...
 
std::shared_ptr< std::vector
< double > > 
esp_at_nuclei_
 Should nuclear electrostatic potentials be available, they will be here. More...
 
std::vector< SharedVectormo_extents_
 Should molecular orbital extents be available, they will be here. More...
 
std::shared_ptr< std::vector
< double > > 
atomic_point_charges_
 If atomic point charges are available they will be here. More...
 
std::vector< std::vector
< std::tuple< double, int, int > > > 
no_occupations_
 Should natural orbital occupations be available, they will be here. More...
 
SharedVector frequencies_
 If frequencies are available, they will be here: More...
 
bool same_a_b_dens_
 Same orbs or dens. More...
 
bool same_a_b_orbs_
 
std::shared_ptr
< ExternalPotential
external_pot_
 
std::map< std::string, double > variables_
 
std::map< std::string,
SharedMatrix
arrays_
 
bool PCM_enabled_
 
std::shared_ptr< PCM > PCM_
 

Additional Inherited Members

- Static Public Member Functions inherited from psi::Wavefunction
static void initialize_singletons ()
 
- Protected Types inherited from psi::Wavefunction
enum  FieldType {
  nothing, dipole_x, dipole_y, dipole_z,
  dipole, embpot, dx, sphere
}
 With what... More...
 

Constructor & Destructor Documentation

psi::scf::HF::HF ( SharedWavefunction  ref_wfn,
std::shared_ptr< SuperFunctional funct,
Options options,
std::shared_ptr< PSIO psio 
)
psi::scf::HF::~HF ( )
virtual

Member Function Documentation

int psi::scf::HF::attempt_number ( ) const
inline

Which set of iterations we're on in this computation, e.g., for stability analysis, where we want to retry SCF without going through all of the setup

void psi::scf::HF::check_phases ( )

Check MO phases.

void psi::scf::HF::clear_external_potentials ( )
inline
void psi::scf::HF::common_init ( )
protected

Common initializer.

double psi::scf::HF::compute_E ( )
virtual

Compute energy for the iteration.

Reimplemented in psi::scf::CUHF, psi::scf::ROHF, psi::scf::UHF, and psi::scf::RHF.

void psi::scf::HF::compute_fcpi ( )
protected

Determine how many core and virtual orbitals to freeze.

void psi::scf::HF::compute_fvpi ( )
protected
virtual double psi::scf::HF::compute_initial_E ( )
inlinevirtual

Computes the initial energy.

Reimplemented in psi::scf::CUHF, psi::scf::ROHF, psi::scf::RHF, and psi::scf::UHF.

virtual double psi::scf::HF::compute_orbital_gradient ( bool  save_diis,
int  max_diis_vectors 
)
inlinevirtual

Compute the orbital gradient

Reimplemented in psi::scf::CUHF, psi::scf::ROHF, psi::scf::UHF, and psi::scf::RHF.

void psi::scf::HF::compute_SAD_guess ( )
protected

SAD Guess and propagation.

void psi::scf::HF::compute_spin_contamination ( )
virtual

Compute/print spin contamination information (if unrestricted)

Reimplemented in psi::scf::CUHF.

bool psi::scf::HF::cphf_converged ( )
inline
std::vector< SharedMatrix > psi::scf::HF::cphf_Hx ( std::vector< SharedMatrix x)
virtual

Reimplemented in psi::scf::UHF, and psi::scf::RHF.

int psi::scf::HF::cphf_nfock_builds ( )
inline
std::vector< SharedMatrix > psi::scf::HF::cphf_solve ( std::vector< SharedMatrix x_vec,
double  conv_tol = 1.e-4,
int  max_iter = 10,
int  print_lvl = 1 
)
virtual

Reimplemented in psi::scf::UHF, and psi::scf::RHF.

void psi::scf::HF::damping_update ( double  damping_percentage)
virtual

Applies damping to the density update

Reimplemented in psi::scf::CUHF, psi::scf::ROHF, psi::scf::UHF, and psi::scf::RHF.

void psi::scf::HF::diagonalize_F ( const SharedMatrix F,
SharedMatrix C,
std::shared_ptr< Vector > &  eps 
)
protectedvirtual

Transformation, diagonalization, and backtransform of Fock matrix

virtual bool psi::scf::HF::diis ( )
inlinevirtual

Performs DIIS extrapolation

Reimplemented in psi::scf::CUHF, psi::scf::ROHF, psi::scf::UHF, and psi::scf::RHF.

bool psi::scf::HF::diis_enabled ( ) const
inline

Are we even using DIIS?

std::shared_ptr<DIISManager> psi::scf::HF::diis_manager ( ) const
inline

The DIIS object.

int psi::scf::HF::diis_start ( ) const
inline

When do we start collecting vectors for DIIS.

void psi::scf::HF::finalize ( )
virtual

Clears memory and closes files (Should they be open) prior to correlated code execution Derived classes override it for additional operations and then call HF::finalize()

Reimplemented in psi::scf::CUHF, psi::scf::ROHF, psi::scf::UHF, and psi::scf::RHF.

void psi::scf::HF::find_occupation ( )

Figure out how to occupy the orbitals in the absence of DOCC and SOCC.

void psi::scf::HF::form_C ( )
virtual

Compute the MO coefficients (C_)

Reimplemented in psi::scf::CUHF, psi::scf::ROHF, psi::scf::UHF, and psi::scf::RHF.

void psi::scf::HF::form_D ( )
virtual

Computes the density matrix (D_)

Reimplemented in psi::scf::CUHF, psi::scf::ROHF, psi::scf::UHF, and psi::scf::RHF.

void psi::scf::HF::form_F ( )
virtual

Computes the Fock matrix

Reimplemented in psi::scf::CUHF, psi::scf::ROHF, psi::scf::UHF, and psi::scf::RHF.

SharedMatrix psi::scf::HF::form_FDSmSDF ( SharedMatrix  Fso,
SharedMatrix  Dso 
)
protectedvirtual

Form X'(FDS - SDF)X (for DIIS)

SharedMatrix psi::scf::HF::form_Fia ( SharedMatrix  Fso,
SharedMatrix  Cso,
int *  noccpi 
)
protectedvirtual

Form Fia (for DIIS)

void psi::scf::HF::form_G ( )
virtual

Forms the G matrix

Reimplemented in psi::scf::CUHF, psi::scf::ROHF, psi::scf::UHF, and psi::scf::RHF.

void psi::scf::HF::form_H ( )
virtual

Formation of H is the same regardless of RHF, ROHF, UHF.

virtual void psi::scf::HF::form_initial_C ( )
inlineprotectedvirtual

Computes the initial MO coefficients (default is to call form_C)

Reimplemented in psi::scf::ROHF.

void psi::scf::HF::form_Shalf ( )

Formation of S^+1/2 and S^-1/2 are the same.

void psi::scf::HF::form_V ( )
virtual

Computes the density matrix (V_)

Reimplemented in psi::scf::UHF, and psi::scf::RHF.

void psi::scf::HF::format_guess ( )
protectedvirtual

Performs any operations required for a incoming guess

Reimplemented in psi::scf::ROHF.

void psi::scf::HF::frac ( )
protected

Fractional occupation UHF/UKS.

bool psi::scf::HF::frac_performed ( ) const
inline

Frac performed current iteration?

void psi::scf::HF::frac_renormalize ( )

Renormalize orbitals to 1.0 before saving.

std::shared_ptr<SuperFunctional> psi::scf::HF::functional ( ) const
inline

The DFT Functional object (or null if it has been deleted)

double psi::scf::HF::get_energies ( std::string  key)
inline
void psi::scf::HF::guess ( )
virtual

Form the guess (guarantees C, D, and E)

void psi::scf::HF::guess_Ca ( SharedMatrix  Ca)
inline
void psi::scf::HF::guess_Cb ( SharedMatrix  Cb)
inline
void psi::scf::HF::initialize_jk ( size_t  effective_memory_doubles)
virtual

Do any needed integral JK setup.

bool psi::scf::HF::initialized_diis_manager ( ) const
inline
int psi::scf::HF::iteration ( ) const
inline

Get and set current iteration.

std::shared_ptr<JK> psi::scf::HF::jk ( ) const
inline

The JK object (or null if it has been deleted)

void psi::scf::HF::MOM ( )
protected

Maximum overlap method for prevention of oscillation/excited state SCF.

bool psi::scf::HF::MOM_excited ( ) const
inline

Are we to do excited-state MOM?

bool psi::scf::HF::MOM_performed ( ) const
inline

MOM performed?

void psi::scf::HF::MOM_start ( )
protected

Start the MOM algorithm (requires one iteration worth of setup)

std::shared_ptr< Vector > psi::scf::HF::occupation_a ( ) const

Returns the occupation vectors.

std::shared_ptr< Vector > psi::scf::HF::occupation_b ( ) const
std::vector< SharedMatrix > psi::scf::HF::onel_Hx ( std::vector< SharedMatrix x)
virtual

Hessian-vector computers and solvers.

Reimplemented in psi::scf::UHF, and psi::scf::RHF.

virtual void psi::scf::HF::prepare_canonical_orthogonalization ( )
inlineprotectedvirtual

Edit matrices if we are doing canonical orthogonalization.

Reimplemented in psi::scf::ROHF.

void psi::scf::HF::print_header ( )

Prints some opening information.

void psi::scf::HF::print_occupation ( )
protected

Prints the orbital occupation.

void psi::scf::HF::print_orbital_pairs ( const char *  header,
std::vector< std::pair< double, std::pair< std::string, int >>>  orbs 
)
protected

Prints the orbitals energies and symmetries (helper method)

void psi::scf::HF::print_orbitals ( )

Prints the orbitals in arbitrary order (works with MOM)

void psi::scf::HF::print_preiterations ( )

Prints some details about nsopi/nmopi, and initial occupations.

void psi::scf::HF::print_stability_analysis ( std::vector< std::pair< double, int >> &  vec)
protected
void psi::scf::HF::push_back_external_potential ( const SharedMatrix V)
inline
bool psi::scf::HF::reset_occ ( ) const
inline
void psi::scf::HF::reset_occupation ( )

Reset to regular occupation from the fractional occupation.

void psi::scf::HF::rotate_orbitals ( SharedMatrix  C,
const SharedMatrix  x 
)

Rotates orbitals inplace C' = exp(U) C, U = antisymmetric matrix from x

void psi::scf::HF::save_density_and_energy ( )
virtual

Save the current density and energy.

Reimplemented in psi::scf::CUHF, psi::scf::ROHF, psi::scf::UHF, and psi::scf::RHF.

void psi::scf::HF::semicanonicalize ( )
virtual

Semicanonicalizes ROHF/CUHF orbitals, breaking the alpha-beta degeneracy On entrance, there's only one set of orbitals and orbital energies. On exit, the alpha and beta Fock matrices correspond to those in the semicanonical basis, and there are distinct alpha and beta C and epsilons, also in the semicanonical basis.

Reimplemented in psi::scf::ROHF.

void psi::scf::HF::set_attempt_number ( int  an)
inline
void psi::scf::HF::set_diis_enabled ( bool  tf)
inline
void psi::scf::HF::set_diis_start ( int  iter)
inline
void psi::scf::HF::set_energies ( std::string  key,
double  value 
)
inline
void psi::scf::HF::set_frac_performed ( bool  tf)
inline
void psi::scf::HF::set_initialized_diis_manager ( bool  tf)
inline
void psi::scf::HF::set_iteration ( int  iter)
inline
void psi::scf::HF::set_jk ( std::shared_ptr< JK jk)

Sets the internal JK object (expert)

void psi::scf::HF::set_MOM_excited ( bool  tf)
inline
void psi::scf::HF::set_MOM_performed ( bool  tf)
inline
void psi::scf::HF::set_reset_occ ( bool  reset)
inline
void psi::scf::HF::set_sad_basissets ( std::vector< std::shared_ptr< BasisSet >>  basis_vec)
inline
void psi::scf::HF::set_sad_fitting_basissets ( std::vector< std::shared_ptr< BasisSet >>  basis_vec)
inline
int psi::scf::HF::soscf_update ( double  soscf_conv,
int  soscf_min_iter,
int  soscf_max_iter,
int  soscf_print 
)
virtual

Applies second-order convergence acceleration

Reimplemented in psi::scf::ROHF, psi::scf::UHF, and psi::scf::RHF.

bool psi::scf::HF::stability_analysis ( )
virtual

Check the stability of the wavefunction, and correct (if requested)

Reimplemented in psi::scf::CUHF, psi::scf::ROHF, psi::scf::UHF, and psi::scf::RHF.

std::vector< SharedMatrix > psi::scf::HF::twoel_Hx ( std::vector< SharedMatrix x,
bool  combine = true,
std::string  return_basis = "MO" 
)
virtual

Reimplemented in psi::scf::UHF, and psi::scf::RHF.

std::shared_ptr<VBase> psi::scf::HF::V_potential ( ) const
inline

The DFT Potential object (or null if it has been deleted)

SharedMatrix psi::scf::HF::Va ( )
inline
SharedMatrix psi::scf::HF::Vb ( )
inline

Member Data Documentation

int psi::scf::HF::attempt_number_
protected

Which set of iterations we're on in this computation, e.g., for stability analysis, where we want to retry SCF without going through all of the setup

bool psi::scf::HF::broken_symmetry_
protected

Whether its broken symmetry solution or not.

SharedMatrix psi::scf::HF::Ca_old_
protected

Old C Alpha matrix (if needed for MOM)

SharedMatrix psi::scf::HF::Cb_old_
protected

Old C Beta matrix (if needed for MOM)

int psi::scf::HF::charge_
protected

The charge of the system.

bool psi::scf::HF::converged_
protected

Did the SCF converge?

bool psi::scf::HF::cphf_converged_
protected
int psi::scf::HF::cphf_nfock_builds_
protected
SharedMatrix psi::scf::HF::diag_C_temp_
protected

Temporary matrix for diagonalize_F.

SharedMatrix psi::scf::HF::diag_F_temp_
protected

Temporary matrix for diagonalize_F.

SharedMatrix psi::scf::HF::diag_temp_
protected

Temporary matrix for diagonalize_F.

int psi::scf::HF::diis_enabled_
protected

Are we even using DIIS?

std::shared_ptr<DIISManager> psi::scf::HF::diis_manager_
protected

DIIS manager for all SCF wavefunctions.

int psi::scf::HF::diis_start_
protected

When do we start collecting vectors for DIIS.

double psi::scf::HF::Drms_
protected
std::map<std::string, double> psi::scf::HF::energies_
protected

Table of energy components.

std::vector<SharedMatrix> psi::scf::HF::external_potentials_
protected

List of external potentials to add to Fock matrix and updated at every iteration e.g. PCM potential

bool psi::scf::HF::frac_performed_
protected

Frac started? (Same thing as frac_performed_)

std::shared_ptr<SuperFunctional> psi::scf::HF::functional_
protected

DFT variables.

SharedMatrix psi::scf::HF::guess_Ca_
protected

User defined orbitals.

SharedMatrix psi::scf::HF::guess_Cb_
protected
SharedMatrix psi::scf::HF::Horig_
protected

A temporary spot for the H matrix.

bool psi::scf::HF::initialized_diis_manager_
protected

DIIS manager intiialized?

bool psi::scf::HF::input_docc_
protected

DOCC vector from input (if found)

bool psi::scf::HF::input_socc_
protected

SOCC vector from input (if found)

double psi::scf::HF::integral_threshold_
protected

The value below which integrals are neglected.

int psi::scf::HF::iteration_
protected

Current Iteration.

std::shared_ptr<JK> psi::scf::HF::jk_
protected

The soon to be ubiquitous JK object.

bool psi::scf::HF::MOM_enabled_
protected

Are we to do MOM?

bool psi::scf::HF::MOM_excited_
protected

Are we to do excited-state MOM?

bool psi::scf::HF::MOM_performed_
protected

MOM performed?

int psi::scf::HF::multiplicity_
protected

The multiplicity of the system (specified as 2 Ms + 1)

int psi::scf::HF::nelectron_
protected

The number of electrons.

double psi::scf::HF::nuclearrep_
protected

Nuclear repulsion energy.

Dimension psi::scf::HF::original_doccpi_
protected
int psi::scf::HF::original_nalpha_
protected
int psi::scf::HF::original_nbeta_
protected
Dimension psi::scf::HF::original_soccpi_
protected
int psi::scf::HF::phi_points_
protected
std::shared_ptr<VBase> psi::scf::HF::potential_
protected
int psi::scf::HF::r_points_
protected
double psi::scf::HF::radius_
protected
bool psi::scf::HF::ref_C_
protected
bool psi::scf::HF::reset_occ_
protected
std::vector<std::shared_ptr<BasisSet> > psi::scf::HF::sad_basissets_
protected

Basis list for SAD.

std::vector<std::shared_ptr<BasisSet> > psi::scf::HF::sad_fitting_basissets_
protected
std::string psi::scf::HF::scf_type_
protected

SCF algorithm type.

int* psi::scf::HF::so2index_
protected
int* psi::scf::HF::so2symblk_
protected

Mapping arrays.

SharedMatrix psi::scf::HF::T_
protected

The kinetic energy matrix.

int psi::scf::HF::theta_points_
protected
double psi::scf::HF::thickness_
protected
SharedMatrix psi::scf::HF::V_
protected

The 1e potential energy matrix.

SharedMatrix psi::scf::HF::Va_
protected

The DFT potential matrices (nice naming scheme)

SharedMatrix psi::scf::HF::Vb_
protected
SharedMatrix psi::scf::HF::X_
protected

The orthogonalization matrix (symmetric or canonical)


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