MPQC 2.3.1
psiwfn.h
1
2#ifdef __GNUC__
3#pragma interface
4#endif
5
6#ifndef _chemistry_qc_psi_psiwfn_h
7#define _chemistry_qc_psi_psiwfn_h
8
9#include <chemistry/qc/wfn/wfn.h>
10#include <chemistry/qc/psi/psiexenv.h>
11
12namespace sc {
13
15
19
20class PsiWavefunction: public Wavefunction {
21
22 Ref<PsiExEnv> exenv_;
23
24 int* read_occ(const Ref<KeyVal> &keyval, const char *name, int nirrep);
25
26 protected:
27 int nirrep_;
28 int *docc_;
29 int *socc_;
30 int *frozen_docc_;
31 int *frozen_uocc_;
32 int multp_;
33 int charge_;
34 char *memory_;
36 virtual void write_input(int conv) =0;
37
38 public:
56
58
61 virtual void write_basic_input(int conv);
62 void compute();
63 void print(std::ostream&o=ExEnv::out0()) const;
65 int nelectron();
66
68 Ref<PsiExEnv> get_psi_exenv() const { return exenv_; };
70 Ref<PsiInput> get_psi_input() const { return exenv_->get_psi_input(); };
71};
72
75
76class PsiSCF: public PsiWavefunction {
77 public:
78 PsiSCF(const Ref<KeyVal>&);
79 PsiSCF(StateIn&);
80 ~PsiSCF();
82
83 enum RefType {rhf, hsoshf, uhf};
85 virtual PsiSCF::RefType reftype() const =0;
86};
87
90
91class PsiCLHF: public PsiSCF {
92 protected:
93 void write_input(int conv);
94 public:
95 PsiCLHF(const Ref<KeyVal>&);
96 PsiCLHF(StateIn&);
97 ~PsiCLHF();
98
99 void write_basic_input(int conv);
100 int spin_polarized() { return 0;};
101 int gradient_implemented() const { return 1;};
102 PsiSCF::RefType reftype() const { return rhf;};
103};
104
107
108class PsiHSOSHF: public PsiSCF {
109 protected:
110 void write_input(int conv);
111 public:
112 PsiHSOSHF(const Ref<KeyVal>&);
113 PsiHSOSHF(StateIn&);
114 ~PsiHSOSHF();
115
116 void write_basic_input(int conv);
117 int spin_polarized() { return 0;};
118 int gradient_implemented() const { return 1;};
119 PsiSCF::RefType reftype() const { return hsoshf;};
120};
121
124
125class PsiUHF: public PsiSCF {
126 protected:
127 void write_input(int conv);
128 public:
129 PsiUHF(const Ref<KeyVal>&);
130 PsiUHF(StateIn&);
131 ~PsiUHF();
132
133 void write_basic_input(int conv);
134 int spin_polarized() { return 1;};
135 int gradient_implemented() const { return 1;};
136 PsiSCF::RefType reftype() const { return uhf;};
137};
138
141
142class PsiCCSD: public PsiWavefunction {
143 Ref<PsiSCF> reference_;
144 protected:
145 void write_input(int conv);
146 public:
147 PsiCCSD(const Ref<KeyVal>&);
148 PsiCCSD(StateIn&);
149 ~PsiCCSD();
151 int spin_polarized() { return reference_->spin_polarized();};
152 int gradient_implemented() const;
153};
154
157
158class PsiCCSD_T: public PsiWavefunction {
159 Ref<PsiSCF> reference_;
160 protected:
161 void write_input(int conv);
162 public:
163 PsiCCSD_T(const Ref<KeyVal>&);
164 PsiCCSD_T(StateIn&);
165 ~PsiCCSD_T();
166
168 int spin_polarized() { return reference_->spin_polarized();};
169 int gradient_implemented() const;
170};
171
172}
173
174#endif
static std::ostream & out0()
Return an ostream that writes from node 0.
void write_input(int conv)
Prepares a complete Psi input file. The input file is assumed to have been opened.
int spin_polarized()
Return 1 if the alpha density is not equal to the beta density.
Definition psiwfn.h:168
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 write_input(int conv)
Prepares a complete Psi input file. The input file is assumed to have been opened.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
int spin_polarized()
Return 1 if the alpha density is not equal to the beta density.
Definition psiwfn.h:151
int spin_polarized()
Return 1 if the alpha density is not equal to the beta density.
Definition psiwfn.h:100
PsiSCF::RefType reftype() const
Returns the PsiSCF::RefType of this particular Psi SCF wave function.
Definition psiwfn.h:102
void write_basic_input(int conv)
Writes out Psi input file entries specific to this PsiWavefunction.
void write_input(int conv)
Prepares a complete Psi input file. The input file is assumed to have been opened.
void write_input(int conv)
Prepares a complete Psi input file. The input file is assumed to have been opened.
PsiSCF::RefType reftype() const
Returns the PsiSCF::RefType of this particular Psi SCF wave function.
Definition psiwfn.h:119
void write_basic_input(int conv)
Writes out Psi input file entries specific to this PsiWavefunction.
int spin_polarized()
Return 1 if the alpha density is not equal to the beta density.
Definition psiwfn.h:117
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.
PsiSCF::RefType reftype() const
Returns the PsiSCF::RefType of this particular Psi SCF wave function.
Definition psiwfn.h:136
void write_input(int conv)
Prepares a complete Psi input file. The input file is assumed to have been opened.
int spin_polarized()
Return 1 if the alpha density is not equal to the beta density.
Definition psiwfn.h:134
void write_basic_input(int conv)
Writes out Psi input file entries specific to this PsiWavefunction.
virtual void write_basic_input(int conv)
Writes out Psi input file entries specific to this PsiWavefunction.
RefSymmSCMatrix density()
Returns the SO density.
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 ...
int nelectron()
Returns the number of electrons.
void print(std::ostream &o=ExEnv::out0()) const
Print information about the object.
Ref< PsiExEnv > get_psi_exenv() const
Return an associated PsiExEnv object.
Definition psiwfn.h:68
PsiWavefunction(const Ref< KeyVal > &)
The KeyVal constructor.
Ref< PsiInput > get_psi_input() const
Return an associated PsiInput object.
Definition psiwfn.h:70
virtual void write_input(int conv)=0
Prepares a complete Psi input file. The input file is assumed to have been opened.
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

Generated at Fri Jan 31 2025 00:00:00 for MPQC 2.3.1 using the documentation package Doxygen 1.14.0.