28#ifndef _chemistry_qc_wfn_wfn_h
29#define _chemistry_qc_wfn_wfn_h
37#include <util/misc/compute.h>
38#include <math/scmat/matrix.h>
39#include <math/scmat/vector3.h>
40#include <chemistry/molecule/energy.h>
41#include <chemistry/qc/basis/basis.h>
42#include <chemistry/qc/basis/integral.h>
43#include <chemistry/qc/basis/orthog.h>
48class Wavefunction:
public MolecularEnergy {
54 ResultRefSymmSCMatrix overlap_;
55 ResultRefSymmSCMatrix hcore_;
56 ResultRefSCMatrix natural_orbitals_;
57 ResultRefDiagSCMatrix natural_density_;
66 double * atom_basis_coef_;
77 void set_up_charge_types(std::vector<int> &q_pc,
78 std::vector<int> &q_cd,
79 std::vector<int> &n_pc,
80 std::vector<int> &n_cd);
82 double nuc_rep_pc_pc(
const std::vector<int>&,
const std::vector<int>&,
bool);
83 double nuc_rep_pc_cd(
const std::vector<int>&,
const std::vector<int>&);
84 double nuc_rep_cd_cd(
const std::vector<int>&,
const std::vector<int>&,
bool);
85 void scale_atom_basis_coef();
87 void nuc_rep_grad_pc_pc(
double **grad,
88 const std::vector<int>&c1,
89 const std::vector<int>&c2,
91 void nuc_rep_grad_pc_cd(
double **grad,
92 const std::vector<int>&c1,
93 const std::vector<int>&c2);
94 void nuc_rep_grad_cd_cd(
double **grad,
95 const std::vector<int>&c1,
96 const std::vector<int>&c2,
103 double min_orthog_res();
104 double max_orthog_res();
143 virtual ~Wavefunction();
148 double density_gradient(
const SCVector3&,
double*);
149 double natural_orbital(
const SCVector3& r,
int iorb);
150 double natural_orbital_density(
const SCVector3& r,
151 int orb,
double* orbval = 0);
154 double orbital_density(
const SCVector3& r,
static std::ostream & out0()
Return an ostream that writes from node 0.
OrthogMethod
An enum for the types of orthogonalization.
Definition orthog.h:42
The RefDiagSCMatrix class is a smart pointer to an DiagSCMatrix specialization.
Definition matrix.h:380
The RefSCDimension class is a smart pointer to an SCDimension specialization.
Definition dim.h:156
The RefSCMatrix class is a smart pointer to an SCMatrix specialization.
Definition matrix.h:135
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition matrix.h:261
A template class that maintains references counts.
Definition ref.h:332
Restores objects that derive from SavableState.
Definition statein.h:70
Serializes objects that derive from SavableState.
Definition stateout.h:61
virtual void nuclear_repulsion_energy_gradient(double **g)
Computes the nuclear repulsion gradient.
virtual RefSymmSCMatrix ao_density()
Returns the AO density.
virtual RefDiagSCMatrix natural_density()
Returns the natural density (a diagonal matrix).
RefSCDimension ao_dimension()
Atomic orbital dimension.
virtual RefSymmSCMatrix beta_density()
Return beta electron densities in the SO basis.
virtual RefSymmSCMatrix beta_ao_density()
Return beta electron densities in the AO basis.
void symmetry_changed()
Call this if you have changed the molecular symmetry of the molecule contained by this MolecularEnerg...
Ref< Integral > integral()
Returns the integral evaluator.
RefSCMatrix so_to_orthog_so()
Returns a matrix which does the default transform from SO's to orthogonal SO's.
virtual int spin_polarized()=0
Return 1 if the alpha density is not equal to the beta density.
Wavefunction(const Ref< KeyVal > &)
The KeyVal constructor.
void obsolete()
Marks all results as being out of date.
Ref< SCMatrixKit > basis_matrixkit()
Matrix kit for AO, SO, orthogonalized SO, and MO dimensioned matrices.
virtual RefSymmSCMatrix density()=0
Returns the SO density.
void nuclear_repulsion_energy_gradient(double *g)
Computes the nuclear repulsion gradient.
virtual RefSymmSCMatrix alpha_density()
Return alpha electron densities in the SO basis.
virtual RefSymmSCMatrix overlap()
Returns the SO overlap matrix.
Ref< Molecule > molecule() const
Returns the Molecule.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
Ref< GaussianBasisSet > atom_basis() const
Returns the basis set describing the nuclear charge distributions.
virtual RefSymmSCMatrix core_hamiltonian()
Returns the SO core Hamiltonian.
double charge()
Returns the charge.
virtual double nuclear_repulsion_energy()
Returns the nuclear repulsion energy.
virtual RefSCMatrix nao(double *atom_charges=0)
returns the ao to nao transformation matrix
virtual int nelectron()=0
Returns the number of electrons.
void set_orthog_method(const OverlapOrthog::OrthogMethod &)
(Re)Sets the orthogonalization method and makes this obsolete
double lindep_tol() const
Returns the tolerance for linear dependencies.
virtual RefSymmSCMatrix alpha_ao_density()
Return alpha electron densities in the AO basis.
RefSCDimension so_dimension()
Symmetry adapted orbital dimension.
OverlapOrthog::OrthogMethod orthog_method() const
Returns the orthogonalization method.
virtual RefSCMatrix natural_orbitals()
Returns the natural orbitals.
Ref< GaussianBasisSet > basis() const
Returns the basis set.
RefSCDimension oso_dimension()
Orthogonalized symmetry adapted orbital dimension.
void set_lindep_tol(double)
Re(Sets) the tolerance for linear dependencies.
const double * atom_basis_coef() const
Returns the coefficients of the nuclear charge distribution basis functions.
RefSCMatrix so_to_orthog_so_inverse()
Returns the inverse of the transformation returned by so_to_orthog_so.
void print(std::ostream &=ExEnv::out0()) const
Print information about the object.