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

#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

int iterations_needed ()
 The number of iterations needed to reach convergence. More...
 
std::shared_ptr< JKjk () const
 The JK object (or null if it has been deleted) 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...
 
double rms_density_error ()
 The RMS error in the density. More...
 
std::shared_ptr< Vectoroccupation_a () const
 Returns the occupation vectors. More...
 
std::shared_ptr< Vectoroccupation_b () const
 
 HF (SharedWavefunction ref_wfn, std::shared_ptr< SuperFunctional > funct, Options &options, std::shared_ptr< PSIO > psio)
 
virtual ~HF ()
 
virtual void initialize ()
 Specialized initialization, compute integrals and does everything to prepare for iterations. More...
 
virtual void iterations ()
 Performs the actual SCF iterations. More...
 
virtual double finalize_E ()
 
virtual double compute_energy ()
 
virtual void finalize ()
 
virtual void semicanonicalize ()
 
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...
 
void rotate_orbitals (SharedMatrix C, const SharedMatrix x)
 
virtual void form_F ()=0
 
virtual void form_G ()=0
 
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)
 
void 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)
 
- 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...
 
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")
 
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...
 
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...
 
SharedVector frequencies () const
 Returns the frequencies. More...
 
void set_frequencies (SharedVector &freqs)
 Set the frequencies for the wavefunction. More...
 
SharedVector normalmodes () const
 Returns the normalmodes. More...
 
void set_normalmodes (SharedVector &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 (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 (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)
 

Public Attributes

bool pcm_enabled_
 
std::shared_ptr< PCM > hf_pcm_
 

Protected Types

enum  perturb {
  nothing, dipole_x, dipole_y, dipole_z,
  dipole, embpot, dx, sphere
}
 With what... More...
 

Protected Member Functions

virtual void form_H ()
 Formation of H is the same regardless of RHF, ROHF, UHF. More...
 
void form_Shalf ()
 Formation of S^+1/2 and S^-1/2 are the same. More...
 
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 find_occupation ()
 Figure out how to occupy the orbitals in the absence of DOCC and SOCC. 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 frac_renormalize ()
 Renormalize orbitals to 1.0 before saving. More...
 
virtual bool stability_analysis ()
 Check the stability of the wavefunction, and correct (if requested) 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_orbitals (const char *header, std::vector< std::pair< double, std::pair< std::string, int > > > orbs)
 Prints the orbitals energies and symmetries (helper method) More...
 
void print_orbitals ()
 Prints the orbitals in arbitrary order (works with MOM) More...
 
void print_energies ()
 Prints the energy breakdown from this SCF. More...
 
void print_header ()
 Prints some opening information. More...
 
void print_preiterations ()
 Prints some details about nsopi/nmopi, and initial occupations. More...
 
virtual void integrals ()
 Do any needed integral setup. More...
 
virtual double compute_E ()=0
 Compute energy for the iteration. More...
 
virtual void save_density_and_energy ()=0
 Save the current density and energy. More...
 
void check_phases ()
 Check MO phases. More...
 
void compute_SAD_guess ()
 SAD Guess and propagation. More...
 
void reset_occupation ()
 Reset to regular occupation from the fractional occupation. More...
 
virtual void guess ()
 Form the guess (gaurantees C, D, and E) More...
 
virtual void damp_update ()
 
virtual int soscf_update ()
 
virtual void diagonalize_F (const SharedMatrix &F, SharedMatrix &C, std::shared_ptr< Vector > &eps)
 
virtual void form_initial_C ()
 
virtual double compute_initial_E ()
 
virtual bool test_convergency ()
 
virtual void compute_spin_contamination ()
 
virtual void save_information ()
 
virtual void compute_orbital_gradient (bool)
 
virtual bool diis ()
 
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)
 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

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...
 
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_
 
double energy_threshold_
 Energy convergence threshold. More...
 
double density_threshold_
 Density convergence threshold. More...
 
double Eold_
 Previous iteration's energy and current energy. More...
 
double E_
 
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_
 
double Drms_
 The RMS error in the density. More...
 
int maxiter_
 Max number of iterations for HF. More...
 
bool ref_C_
 Fail if we don't converge by maxiter? More...
 
bool fail_on_maxiter_
 Fail if we don't converge by maxiter? More...
 
int iteration_
 Current Iteration. More...
 
bool converged_
 Did the SCF converge? More...
 
double nuclearrep_
 Nuclear repulsion energy. More...
 
bool diis_performed_
 Whether DIIS was performed this iteration, or not. 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...
 
std::string old_scf_type_
 
int perturb_h_
 Perturb the Hamiltonian? More...
 
Vector3 perturb_dipoles_
 How big of a perturbation. More...
 
perturb perturb_
 
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_started_
 MOM started? More...
 
bool MOM_performed_
 MOM performed? More...
 
bool frac_enabled_
 Are we to fractionally occupy? 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 min_diis_vectors_
 How many min vectors for DIIS. More...
 
int max_diis_vectors_
 How many max vectors for DIIS. More...
 
int diis_start_
 When do we start collecting vectors for DIIS. More...
 
int diis_enabled_
 Are we even using DIIS? More...
 
bool soscf_enabled_
 Are we doing second-order convergence acceleration? More...
 
double soscf_r_start_
 What is the gradient threshold that we should start? More...
 
int soscf_min_iter_
 Maximum number of iterations. More...
 
int soscf_max_iter_
 Minimum number of iterations. More...
 
double soscf_conv_
 Break if the residual RMS is less than this. More...
 
double soscf_print_
 Do we print the microiterations? More...
 
double damping_percentage_
 The amount (%) of the previous orbitals to mix in during SCF damping. More...
 
double damping_convergence_
 The energy convergence at which SCF damping is disabled. More...
 
bool damping_enabled_
 Whether to use SCF damping. More...
 
bool damping_performed_
 Whether damping was actually performed this iteration. 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 max_attempts_
 Maximum number of macroiterations to take in e.g. a stability analysis. More...
 
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...
 
int iterations_needed_
 The number of iterations need to reach convergence. 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...
 
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_
 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< std::vector
< double > > 
atomic_point_charges_
 If atomic point charges are available they will be here. More...
 
SharedVector frequencies_
 If frequencies are available, they will be here: More...
 
SharedVector normalmodes_
 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::shared_ptr
< ExternalPotential
external_pot_
 
std::map< std::string, double > variables_
 
std::map< std::string,
SharedMatrix
arrays_
 

Additional Inherited Members

- Static Public Member Functions inherited from psi::Wavefunction
static void initialize_singletons ()
 

Member Enumeration Documentation

enum psi::scf::HF::perturb
protected

With what...

Enumerator
nothing 
dipole_x 
dipole_y 
dipole_z 
dipole 
embpot 
dx 
sphere 

Constructor & Destructor Documentation

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

Save orbitals to use later as a guess Tells whether or not to read Fock matrix as a guess Load fock matrix from previous computation to form guess MO coefficients Load orbitals from previous computation, projecting if needed

psi::scf::HF::~HF ( )
virtual

Member Function Documentation

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

Check MO phases.

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

Common initializer.

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

Compute energy for the iteration.

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

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

Base class Wavefunction requires this function. Here it is simply a wrapper around initialize(), iterations(), finalize_E(). It returns the SCF energy computed by finalize_E()

Reimplemented from psi::Wavefunction.

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 ( )
inlineprotectedvirtual

Computes the initial energy.

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

virtual void psi::scf::HF::compute_orbital_gradient ( bool  )
inlineprotectedvirtual

Compute the orbital gradient

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

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

SAD Guess and propagation.

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

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::damp_update ( )
protectedvirtual

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 ( )
inlineprotectedvirtual

Performs DIIS extrapolation

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

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::RHF, and psi::scf::UHF.

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

Performs stability analysis and calls back SCF with new guess if needed, Returns the SCF energy This function should be called once orbitals are ready for energy/property computations, usually after iterations() is called.

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

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::RHF, and psi::scf::UHF.

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

Computes the density matrix (D_)

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

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

Computes the Fock matrix

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

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)

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

Forms the G matrix

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

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

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 ( )
protected

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::RHF, and psi::scf::UHF.

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.

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

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)

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

Form the guess (gaurantees 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 ( )
virtual

Specialized initialization, compute integrals and does everything to prepare for iterations.

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

Do any needed integral setup.

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

Performs the actual SCF iterations.

int psi::scf::HF::iterations_needed ( )
inline

The number of iterations needed to reach convergence.

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.

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_energies ( )
protected

Prints the energy breakdown from this SCF.

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

Prints some opening information.

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

Prints the orbital occupation.

void psi::scf::HF::print_orbitals ( 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 ( )
protected

Prints the orbitals in arbitrary order (works with MOM)

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

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::reset_occ ( bool  reset)
inline
void psi::scf::HF::reset_occupation ( )
protected

Reset to regular occupation from the fractional occupation.

double psi::scf::HF::rms_density_error ( )
inline

The RMS error in the density.

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

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

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

Save the current density and energy.

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

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

Saves information to the checkpoint file

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

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_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 ( void  )
protectedvirtual

Applies second-order convergence acceleration

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

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

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

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

virtual bool psi::scf::HF::test_convergency ( )
inlineprotectedvirtual

Test convergence of the wavefunction

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

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
double psi::scf::HF::damping_convergence_
protected

The energy convergence at which SCF damping is disabled.

bool psi::scf::HF::damping_enabled_
protected

Whether to use SCF damping.

double psi::scf::HF::damping_percentage_
protected

The amount (%) of the previous orbitals to mix in during SCF damping.

bool psi::scf::HF::damping_performed_
protected

Whether damping was actually performed this iteration.

double psi::scf::HF::density_threshold_
protected

Density convergence threshold.

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.

bool psi::scf::HF::diis_performed_
protected

Whether DIIS was performed this iteration, or not.

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

When do we start collecting vectors for DIIS.

double psi::scf::HF::Drms_
protected

The RMS error in the density.

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

Table of energy components.

double psi::scf::HF::energy_threshold_
protected

Energy convergence threshold.

double psi::scf::HF::Eold_
protected

Previous iteration's energy and current energy.

bool psi::scf::HF::fail_on_maxiter_
protected

Fail if we don't converge by maxiter?

bool psi::scf::HF::frac_enabled_
protected

Are we to fractionally occupy?

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
std::shared_ptr<PCM> psi::scf::HF::hf_pcm_
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.

int psi::scf::HF::iterations_needed_
protected

The number of iterations need to reach convergence.

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

The soon to be ubiquitous JK object.

int psi::scf::HF::max_attempts_
protected

Maximum number of macroiterations to take in e.g. a stability analysis.

int psi::scf::HF::max_diis_vectors_
protected

How many max vectors for DIIS.

int psi::scf::HF::maxiter_
protected

Max number of iterations for HF.

int psi::scf::HF::min_diis_vectors_
protected

How many min vectors for DIIS.

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?

bool psi::scf::HF::MOM_started_
protected

MOM started?

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.

std::string psi::scf::HF::old_scf_type_
protected

Old SCF type for DF guess trick TODO We should really get rid of that and put it in the driver

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
bool psi::scf::HF::pcm_enabled_
perturb psi::scf::HF::perturb_
protected
Vector3 psi::scf::HF::perturb_dipoles_
protected

How big of a perturbation.

int psi::scf::HF::perturb_h_
protected

Perturb the Hamiltonian?

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

Fail if we don't converge by maxiter?

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.

double psi::scf::HF::soscf_conv_
protected

Break if the residual RMS is less than this.

bool psi::scf::HF::soscf_enabled_
protected

Are we doing second-order convergence acceleration?

int psi::scf::HF::soscf_max_iter_
protected

Minimum number of iterations.

int psi::scf::HF::soscf_min_iter_
protected

Maximum number of iterations.

double psi::scf::HF::soscf_print_
protected

Do we print the microiterations?

double psi::scf::HF::soscf_r_start_
protected

What is the gradient threshold that we should start?

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: