28#ifndef _chemistry_qc_scf_scf_h
29#define _chemistry_qc_scf_scf_h
31#include <util/group/thread.h>
32#ifdef MPQC_NEW_THREADS
33# include <util/misc/xml.h>
36#include <math/optimize/scextrap.h>
38#include <chemistry/qc/basis/tbint.h>
39#include <chemistry/qc/wfn/accum.h>
40#include <chemistry/qc/wfn/obwfn.h>
44 class SCFIterationLogger;
45 class DensityFittingInfo;
60 int always_use_guess_wfn_;
77 bool fake_scf_convergence_after_fock_build_;
79 int fake_scf_convergence_after_n_iter_;
93 virtual void init_threads();
94 virtual void done_threads();
100 virtual double compute_vector(
double&,
double enuclear);
113 virtual void savestate_iter(
int);
116 virtual void savestate_to_file(
const std::string &filename);
117 std::string previous_savestate_file_;
120 signed char * init_pmax(
double *);
125 enum Access { Read, Write, Accum };
130 virtual void initial_vector();
144 int *read_occ(
const Ref<KeyVal> &,
const char *name,
int nirrep);
149#ifdef MPQC_NEW_FEATURES
244#ifdef MPQC_NEW_FEATURES
245 boost::property_tree::ptree& write_xml(boost::property_tree::ptree& parent,
const XMLWriter& writer);
254 virtual int n_fock_matrices()
const =0;
266 virtual double one_body_energy();
267 virtual void two_body_energy(
double &ec,
double &ex);
290 virtual void init_vector() =0;
291 virtual void done_vector() =0;
294 virtual double new_density() =0;
297 virtual void reset_density() =0;
300 virtual double scf_energy() =0;
310 virtual void ao_fock(
double accuracy) =0;
314 virtual void init_gradient() =0;
315 virtual void done_gradient() =0;
319 virtual void two_body_deriv(
double*) =0;
323 virtual void init_hessian() =0;
324 virtual void done_hessian() =0;
329 void svd_product_basis();
static std::ostream & out0()
Return an ostream that writes from node 0.
virtual double energy()
A wrapper around value();.
A OneBodyWavefunction is a MolecularEnergy that solves an effective one-body problem.
Definition obwfn.h:44
The RefDiagSCMatrix class is a smart pointer to an DiagSCMatrix specialization.
Definition matrix.h:389
The RefSCMatrix class is a smart pointer to an SCMatrix specialization.
Definition matrix.h:135
The RefSCVector class is a smart pointer to an SCVector specialization.
Definition matrix.h:55
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition matrix.h:265
A template class that maintains references counts.
Definition ref.h:361
The SCF class is the base for all classes that use a self-consistent field procedure to solve an effe...
Definition scf.h:51
static void iter_print(int iter, double energy, double delta, double walltime, std::ostream &os=ExEnv::out0())
prints iteration log
void obsolete()
Marks all results as being out of date.
void purge()
This function purges any caches of data in MolecularEnergy.
RefDiagSCMatrix eigenvalues()
Returns the MO basis eigenvalues.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void symmetry_changed()
Call this if you have changed the molecular symmetry of the molecule contained by this MolecularEnerg...
static double guess_acc_ratio()
how much lower is the desired accuracy of the guess?
Definition scf.h:147
SCF(const Ref< KeyVal > &)
The KeyVal constructor.
void print(std::ostream &o=ExEnv::out0()) const
Print information about the object.
int spin_unrestricted()
Return 1 if the alpha orbitals are not equal to the beta orbitals.
virtual Ref< DensityFittingInfo > dfinfo() const
return the DensityFittingInfo object used to implement compute() this is important to be able to reco...
RefSCMatrix oso_eigenvectors()
Returns the orthogonal MO (columns) to orthogonal-SO (rows) transformation matrix.
virtual void compute()
Recompute at least the results that have compute true and are not already computed.
virtual void obsolete_vector()
Obsolete scf vector so that next call to initial_vector() will cause recomputation.
Restores fundamental and user-defined types from images created with StateOut.
Definition statein.h:79
Serializes fundamental and user-defined types.
Definition stateout.h:71
Definition xmlwriter.h:223
Contains all MPQC code up to version 3.
Definition mpqcin.h:14