28#ifndef _chemistry_qc_psi_psiwfn_h
29#define _chemistry_qc_psi_psiwfn_h
31#include <chemistry/qc/wfn/wfn.h>
32#include <chemistry/qc/wfn/obwfn.h>
33#include <chemistry/qc/psi/psiexenv.h>
34#include <chemistry/qc/wfn/spin.h>
35#include <chemistry/qc/wfn/orbitalspace.h>
36#include <chemistry/qc/mbptr12/mbptr12.h>
50 int value_implemented()
const {
64 std::vector<unsigned int> read_occ(
const Ref<KeyVal> &keyval,
const char *name,
105 int nirrep()
const {
return nirrep_; }
118 return exenv_->get_psi_input();
123 std::vector< std::pair<unsigned int,unsigned int> > shell_map();
125 std::vector<unsigned int> ao_map();
145 mutable std::vector<unsigned int> frozen_docc_;
146 mutable std::vector<unsigned int> frozen_uocc_;
151 void write_input_frozen2restricted(
int conv,
bool fz2restr);
153 double valacc_to_refacc()
const {
return 100.0; }
215 const Ref<OrbitalSpace>& occ_act_sb(SpinCase1);
234 const std::vector<unsigned int> socc();
235 const std::vector<unsigned int> uocc_act();
236 const std::vector<unsigned int> docc();
237 const std::vector<unsigned int> uocc();
259 void print_onepdm_vec(FILE *output,
const RefSCVector &opdm,
double TOL);
260 void print_onepdm_mat(FILE *output,
const RefSymmSCMatrix &opdm,
double TOL);
261 void print_twopdm_mat(FILE *output,
const RefSymmSCMatrix &tpdm,
double TOL);
262 void print_twopdm_arr(FILE *output,
double *tpdm,
double TOL);
274 std::vector<unsigned int> occpi_[NSpinCases1];
275 std::vector<unsigned int> uoccpi_[NSpinCases1];
276 std::vector<unsigned int> mopi_;
277 std::vector<double> occupation_[NSpinCases1];
278 void compute_occupations(SpinCase1 spin);
283 std::vector<unsigned int> docc_;
284 std::vector<unsigned int> socc_;
291 static const int default_maxiter = 200;
323 enum RefType {rhf, hsoshf, uhf};
331 const std::vector<unsigned int>&
occpi(SpinCase1 S);
333 const std::vector<unsigned int>&
uoccpi(SpinCase1 S);
335 const std::vector<unsigned int>&
mopi();
362 unsigned int nocc(SpinCase1 spin);
421 void semicanonical();
456 RefSymmSCMatrix rdopdm(SpinCase1 spin,
457 const std::vector<unsigned int>& mopi,
458 const std::vector<unsigned int>& dmap,
459 Ref<SCMatrixKit> kit = 0);
464 RefSymmSCMatrix rdtpdm(SpinCase2 pairspin,
465 const std::vector<unsigned int>& dmap,
466 bool spinfree =
false,
467 Ref<SCMatrixKit> kit = 0);
static std::ostream & out0()
Return an ostream that writes from node 0.
CartesianOrdering
Describes the ordering of the cartesian functions in a shell.
Definition integral.h:175
PsiCLHF is a concrete implementation of Psi RHF wave function.
Definition psiwfn.h:373
PsiSCF::RefType reftype() const
Returns the PsiSCF::RefType of this particular Psi SCF wave function.
Definition psiwfn.h:386
bool analytic_gradient_implemented() const
must overload this in a derived class if analytic gradient can be computed
Definition psiwfn.h:383
void write_basic_input(int conv)
Writes out Psi input file entries specific to this PsiWavefunction.
void print(std::ostream &os=ExEnv::out0()) const
Print information about the object.
void write_input(int conv)
Prepares a complete Psi input file. The input file is assumed to have been opened.
PsiCorrWavefunction is a Psi correlated wave function.
Definition psiwfn.h:140
int nelectron()
Number of electrons.
RefSymmSCMatrix twopdm_dirac()
produces spin-free 2-RDM
void set_desired_value_accuracy(double acc)
sets the desired value accuracy
PsiCorrWavefunction(const Ref< KeyVal > &)
A KeyVal constructor is used to generate a PsiCorrWavefunction object from the input.
void write_input(int conv)
Prepares a complete Psi input file. The input file is assumed to have been opened.
RefSymmSCMatrix density()
reimplementation of PsiWavefunction::density()
RefSymmSCMatrix mo_density(SpinCase1 spin)
return one-particel density matrix in symmetry-blocked orbitals
unsigned int nfzv() const
total # of frozen unoccupied orbitals
virtual const Ref< OrbitalSpace > & orbs_sb(SpinCase1 spin)
symmetry-blocked space of MO's from Psi3 the default implementation returns the orbitals from referen...
const std::vector< unsigned int > & frozen_uocc() const
virtual std::vector< unsigned int > map_density_to_sb()
returns the index map that transforms indices in which densities are reported in Psi to the symmetry-...
virtual double reference_energy()
reference energy
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 obsolete()
Marks all results as being out of date.
const std::vector< unsigned int > & frozen_docc() const
void symmetry_changed()
Call this if you have changed the molecular symmetry of the molecule contained by this MolecularEnerg...
void compute()
Recompute at least the results that have compute true and are not already computed.
double magnetic_moment() const
Computes the S (or J) magnetic moment of the target state(s), in units of .
void print(std::ostream &os) const
Print information about the object.
unsigned int nfzc() const
total # of frozen doubly-occupied orbitals
RefSymmSCMatrix twopdm_dirac(const SpinCase2 &pairspin)
produces 2-RDM for spin case pairspin
const std::vector< unsigned int > docc_act()
PsiHSOSHF is a concrete implementation of Psi ROHF wave function.
Definition psiwfn.h:394
const RefDiagSCMatrix & evals_semicanonical(SpinCase1 s)
returns the eigenvalues of semicanonical MOs in AO basis
void write_input(int conv)
Prepares a complete Psi input file. The input file is assumed to have been opened.
bool analytic_gradient_implemented() const
must overload this in a derived class if analytic gradient can be computed
Definition psiwfn.h:404
PsiSCF::RefType reftype() const
Returns the PsiSCF::RefType of this particular Psi SCF wave function.
Definition psiwfn.h:407
void write_basic_input(int conv)
Writes out Psi input file entries specific to this PsiWavefunction.
void print(std::ostream &os=ExEnv::out0()) const
Print information about the object.
const RefSCMatrix & coefs_semicanonical(SpinCase1 s)
returns the semicanonical MO coefficients in AO basis
PsiSCF is an abstract base for all Psi SCF wave functions.
Definition psiwfn.h:269
unsigned int nocc(SpinCase1 spin)
number of occupied MOs of spin
RefSymmSCMatrix density()
Returns the SO density.
static double guess_acc_ratio()
how much lower is the desired accuracy of the guess?
Definition psiwfn.h:293
void import_occupations(const Ref< OneBodyWavefunction > &obwfn)
imports occupations from obwfn.
const Ref< OrbitalSpace > & orbs_sb(SpinCase1 spin)
symmetry-blocked space
const std::vector< unsigned int > & uoccpi(SpinCase1 S)
Number of unoccupied orbitals of spin S per irrep.
double beta_occupation(int mo)
Returns the occupation for beta orbitals.
unsigned int multiplicity() const
spin multiplicity
Definition psiwfn.h:364
const std::vector< unsigned int > & mopi()
Number of orbitals per irrep.
void symmetry_changed()
Call this if you have changed the molecular symmetry of the molecule contained by this MolecularEnerg...
unsigned int nmo()
number of MOs
RefSymmSCMatrix ao_density(SpinCase1)
AO-basis densities.
RefSymmSCMatrix alpha_density()
Return alpha electron densities in the SO basis.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
virtual PsiSCF::RefType reftype() const =0
Returns the PsiSCF::RefType of this particular Psi SCF wave function.
void obsolete()
Marks all results as being out of date.
double alpha_occupation(int mo)
Returns the occupation for alpha orbitals.
RefSymmSCMatrix beta_density()
Return beta electron densities in the SO basis.
virtual const RefSCMatrix & coefs(SpinCase1 spin=AnySpinCase1)
Returns the coefficient matrix in AO basis.
PsiSCF(const Ref< KeyVal > &)
The KeyVal constructor uses all keywords of PsiWavefunction class and the following additional keywor...
Ref< OneBodyWavefunction > guess_wfn_
guess wave function is only used to get the occupations
Definition psiwfn.h:296
virtual const RefDiagSCMatrix & evals(SpinCase1 spin=AnySpinCase1)
Returns the eigenvalues matrix.
double magnetic_moment() const
Computes the S (or J) magnetic moment of the target state(s), in units of .
RefSymmSCMatrix ao_density()
Returns the AO density.
const std::vector< unsigned int > & occpi(SpinCase1 S)
Number of occupied orbitals of spin S per irrep.
int nelectron()
Number of electrons.
double occupation(int mo)
Returns the total occupation for orbital mo.
RefSymmSCMatrix mo_density(SpinCase1 spin=AnySpinCase1)
MO-basis density.
PsiUHF is a concrete implementation of Psi UHF wave function.
Definition psiwfn.h:429
PsiSCF::RefType reftype() const
Returns the PsiSCF::RefType of this particular Psi SCF wave function.
Definition psiwfn.h:442
void write_input(int conv)
Prepares a complete Psi input file. The input file is assumed to have been opened.
void write_basic_input(int conv)
Writes out Psi input file entries specific to this PsiWavefunction.
bool analytic_gradient_implemented() const
must overload this in a derived class if analytic gradient can be computed
Definition psiwfn.h:439
void print(std::ostream &os=ExEnv::out0()) const
Print information about the object.
PsiWavefunction is an abstract base for all Psi wave functions.
Definition psiwfn.h:46
virtual void write_basic_input(int conv)
Writes out Psi input file entries specific to this PsiWavefunction.
double nuclear_repulsion_energy()
return Psi3 nuclear repulsion energy
void symmetry_changed()
Call this if you have changed the molecular symmetry of the molecule contained by this MolecularEnerg...
void compute()
Recompute at least the results that have compute true and are not already computed.
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 print(std::ostream &o=ExEnv::out0()) const
Print information about the object.
PsiWavefunction(const Ref< KeyVal > &)
The KeyVal constructor.
Ref< PsiInput > get_psi_input() const
Return an associated PsiInput object.
Definition psiwfn.h:117
virtual void write_input(int conv)=0
Prepares a complete Psi input file. The input file is assumed to have been opened.
static Integral::CartesianOrdering cartesian_ordering()
returns the Psi3 convention for the ordering of the cartesian functions
void obsolete()
Marks all results as being out of date.
virtual RefSymmSCMatrix mo_density(SpinCase1 spin=AnySpinCase1)=0
Returns the MO basis density (blocked by symmetry)
int debug() const
return the debug level
Ref< PsiExEnv > exenv() const
Return an associated PsiExEnv object.
Definition psiwfn.h:112
virtual RefSymmSCMatrix density()
Returns the SO density.
refcount_t reference()
Increment the reference count and return the new count.
Definition ref.h:271
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
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
A Wavefunction is a MolecularEnergy that utilizies a GaussianBasisSet.
Definition wfn.h:52
Contains all MPQC code up to version 3.
Definition mpqcin.h:14