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();
122 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; }
198 void print(std::ostream& os)
const;
213 #if 0 // these should be implemented in PsiCC classes
219 unsigned int nfzc()
const;
222 unsigned int nfzv()
const;
229 const std::vector<unsigned int>&
frozen_docc()
const;
231 const std::vector<unsigned int>&
frozen_uocc()
const;
233 const std::vector<unsigned int>
docc_act();
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};
325 virtual PsiSCF::RefType
reftype()
const =0;
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);
void write_basic_input(int conv)
Writes out Psi input file entries specific to this PsiWavefunction.
unsigned int multiplicity() const
spin multiplicity
Definition: psiwfn.h:364
void print(std::ostream &os=ExEnv::out0()) const
Print information about the object.
unsigned int nfzc() const
total # of frozen doubly-occupied orbitals
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.
const std::vector< unsigned int > & uoccpi(SpinCase1 S)
Number of unoccupied orbitals of spin S per irrep.
PsiWavefunction(const Ref< KeyVal > &)
The KeyVal constructor.
const RefSCMatrix & coefs_semicanonical(SpinCase1 s)
returns the semicanonical MO coefficients in AO 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 ...
const RefDiagSCMatrix & evals_semicanonical(SpinCase1 s)
returns the eigenvalues of semicanonical MOs in AO basis
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:265
void obsolete()
Marks all results as being out of date.
void set_desired_value_accuracy(double acc)
sets the desired value accuracy
Ref< OneBodyWavefunction > guess_wfn_
guess wave function is only used to get the occupations
Definition: psiwfn.h:296
The RefSCMatrix class is a smart pointer to an SCMatrix specialization.
Definition: matrix.h:135
A template class that maintains references counts.
Definition: ref.h:361
void write_input(int conv)
Prepares a complete Psi input file. The input file is assumed to have been opened.
const std::vector< unsigned int > docc_act()
double beta_occupation(int mo)
Returns the occupation for beta orbitals.
const std::vector< unsigned int > & frozen_docc() const
PsiSCF::RefType reftype() const
Returns the PsiSCF::RefType of this particular Psi SCF wave function.
Definition: psiwfn.h:442
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-...
bool analytic_gradient_implemented() const
must overload this in a derived class if analytic gradient can be computed
Definition: psiwfn.h:404
PsiCorrWavefunction(const Ref< KeyVal > &)
A KeyVal constructor is used to generate a PsiCorrWavefunction object from the input.
PsiWavefunction is an abstract base for all Psi wave functions.
Definition: psiwfn.h:46
RefSymmSCMatrix density()
Returns the SO density.
double magnetic_moment() const
Computes the S (or J) magnetic moment of the target state(s), in units of .
void symmetry_changed()
Call this if you have changed the molecular symmetry of the molecule contained by this MolecularEnerg...
const std::vector< unsigned int > & occpi(SpinCase1 S)
Number of occupied orbitals of spin S per irrep.
CartesianOrdering
Describes the ordering of the cartesian functions in a shell.
Definition: integral.h:175
virtual const Ref< OrbitalSpace > & orbs_sb(SpinCase1 spin)
symmetry-blocked space of MO's from Psi3 the default implementation returns the orbitals from referen...
A Wavefunction is a MolecularEnergy that utilizies a GaussianBasisSet.
Definition: wfn.h:52
RefSymmSCMatrix beta_density()
Return beta electron densities in the SO basis.
The RefDiagSCMatrix class is a smart pointer to an DiagSCMatrix specialization.
Definition: matrix.h:389
PsiHSOSHF is a concrete implementation of Psi ROHF wave function.
Definition: psiwfn.h:394
virtual double reference_energy()
reference energy
const std::vector< unsigned int > & mopi()
Number of orbitals per irrep.
void compute()
Recompute at least the results that have compute true and are not already computed.
static Integral::CartesianOrdering cartesian_ordering()
returns the Psi3 convention for the ordering of the cartesian functions
int nelectron()
Number of electrons.
int nelectron()
Number of electrons.
RefSymmSCMatrix mo_density(SpinCase1 spin=AnySpinCase1)
MO-basis density.
static double guess_acc_ratio()
how much lower is the desired accuracy of the guess?
Definition: psiwfn.h:293
void obsolete()
Marks all results as being out of date.
PsiUHF is a concrete implementation of Psi UHF wave function.
Definition: psiwfn.h:429
virtual RefSymmSCMatrix mo_density(SpinCase1 spin=AnySpinCase1)=0
Returns the MO basis density (blocked by symmetry)
virtual const RefSCMatrix & coefs(SpinCase1 spin=AnySpinCase1)
Returns the coefficient matrix in AO basis.
PsiSCF is an abstract base for all Psi SCF wave functions.
Definition: psiwfn.h:269
void print(std::ostream &os=ExEnv::out0()) const
Print information about the object.
const std::vector< unsigned int > & frozen_uocc() const
void symmetry_changed()
Call this if you have changed the molecular symmetry of the molecule contained by this MolecularEnerg...
void print(std::ostream &o=ExEnv::out0()) const
Print information about the object.
RefSymmSCMatrix twopdm_dirac()
produces spin-free 2-RDM
PsiSCF::RefType reftype() const
Returns the PsiSCF::RefType of this particular Psi SCF wave function.
Definition: psiwfn.h:407
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 symmetry_changed()
Call this if you have changed the molecular symmetry of the molecule contained by this MolecularEnerg...
The RefSCVector class is a smart pointer to an SCVector specialization.
Definition: matrix.h:55
RefSymmSCMatrix mo_density(SpinCase1 spin)
return one-particel density matrix in symmetry-blocked orbitals
Definition: stateout.h:71
double nuclear_repulsion_energy()
return Psi3 nuclear repulsion energy
PsiSCF::RefType reftype() const
Returns the PsiSCF::RefType of this particular Psi SCF wave function.
Definition: psiwfn.h:386
virtual void write_basic_input(int conv)
Writes out Psi input file entries specific to this PsiWavefunction.
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 &os) const
Print information about the object.
unsigned int nfzv() const
total # of frozen unoccupied orbitals
unsigned int nmo()
number of MOs
static std::ostream & out0()
Return an ostream that writes from node 0.
void obsolete()
Marks all results as being out of date.
PsiCLHF is a concrete implementation of Psi RHF wave function.
Definition: psiwfn.h:373
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
virtual const RefDiagSCMatrix & evals(SpinCase1 spin=AnySpinCase1)
Returns the eigenvalues matrix.
void compute()
Recompute at least the results that have compute true and are not already computed.
const Ref< OrbitalSpace > & orbs_sb(SpinCase1 spin)
symmetry-blocked space
RefSymmSCMatrix ao_density()
Returns the AO density.
unsigned int nocc(SpinCase1 spin)
number of occupied MOs of spin
double occupation(int mo)
Returns the total occupation for orbital mo.
int debug() const
return the debug level
Ref< PsiInput > get_psi_input() const
Return an associated PsiInput object.
Definition: psiwfn.h:117
Ref< PsiExEnv > exenv() const
Return an associated PsiExEnv object.
Definition: psiwfn.h:112
PsiCorrWavefunction is a Psi correlated wave function.
Definition: psiwfn.h:140
virtual RefSymmSCMatrix density()
Returns the SO density.
RefSymmSCMatrix alpha_density()
Return alpha electron densities in the SO basis.
RefSymmSCMatrix density()
reimplementation of PsiWavefunction::density()
void import_occupations(const Ref< OneBodyWavefunction > &obwfn)
imports occupations from obwfn.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
void write_input(int conv)
Prepares a complete Psi input file. The input file is assumed to have been opened.
double magnetic_moment() const
Computes the S (or J) magnetic moment of the target state(s), in units of .
virtual PsiSCF::RefType reftype() const =0
Returns the PsiSCF::RefType of this particular Psi SCF wave function.
PsiSCF(const Ref< KeyVal > &)
The KeyVal constructor uses all keywords of PsiWavefunction class and the following additional keywor...
void write_input(int conv)
Prepares a complete Psi input file. The input file is assumed to have been opened.
double alpha_occupation(int mo)
Returns the occupation for alpha orbitals.
virtual void write_input(int conv)=0
Prepares a complete Psi input file. The input file is assumed to have been opened.
Generated at Sun Jan 26 2020 23:23:59 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.