MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
psici.h
1//
2// psici.h
3//
4// Copyright (C) 2008 Martin Torheyden
5//
6// Author: Martin Torheyden <mtorhey@vt.edu>
7//
8// This file is part of the SC Toolkit.
9//
10// The SC Toolkit is free software; you can redistribute it and/or modify
11// it under the terms of the GNU Library General Public License as published by
12// the Free Software Foundation; either version 2, or (at your option)
13// any later version.
14//
15// The SC Toolkit is distributed in the hope that it will be useful,
16// but WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU Library General Public License for more details.
19//
20// You should have received a copy of the GNU Library General Public License
21// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
22// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23//
24// The U.S. Government is granted a limited license as per AL 91-7.
25//
26
27#ifndef _chemistry_qc_psi_psici_h
28#define _chemistry_qc_psi_psici_h
29
30#include <chemistry/qc/psi/psiwfn.h>
31#include <chemistry/qc/wfn/spin.h>
32
33namespace sc {
34
38 public:
73 PsiRASCI(const Ref<KeyVal> &keyval);
74 PsiRASCI(StateIn &s);
75 ~PsiRASCI();
77 void compute();
78 void print(std::ostream&) const;
79
80 double magnetic_moment() const;
81
83 const std::vector<unsigned int>& ras1() const { return ras1_; }
85 const std::vector<unsigned int>& ras2() const { return ras2_; }
87 const std::vector<unsigned int>& ras3() const { return ras3_; }
89 unsigned int ras3_max() const { return ras3_max_; }
90
92 RefSymmSCMatrix mo_density(SpinCase1 spin); // mo_density is overloaded because detci
93 // reports density in active orbitals only; it reports ORDM in OBS (!)
95 const Ref<OrbitalSpace>& orbs_sb(SpinCase1 spin);
98 const Ref<OrbitalSpace>& occ(SpinCase1 spin);
105
106 protected:
107
108 bool opdm_print_;
110 int root_;
116
117 // this data may need to be modified by RASSCF
119 int convergence_;
120 int maxiter_;
121
123 Ref<OrbitalSpace> occ_[NSpinCases1];
124
125 RefSymmSCMatrix onepdm_occ_[NSpinCases1];
126 RefSymmSCMatrix twopdm_occ_[NSpinCases2];
127 RefSymmSCMatrix twopdm_sf_occ_;
128
129 // optional RAS info
130 // it is initialized automatically
131 std::vector<unsigned int> ras1_;
132 std::vector<unsigned int> ras2_;
133 std::vector<unsigned int> ras3_;
134 int ras1_max_; //< max number of holes in RAS1; in PsiRASCI, defaults to 2; in PsiRASSCF, defaults to 0. It appears that this keyword is created pratically as
135 // an 'alias' to ex_lvl in Psi3, but ras1_max_ is a better name than ex_lvl
136 int ras3_max_; //< max number of electrons in RAS3; in PsiRASCI, defaults to 2; in PsiRASSCF, defaults to 0
137
138 double scf_levelshift_;
140
159
161 std::vector<unsigned int> moorder_;
162
163 void write_input(int convergence);
164 void write_rasci_input(int convergence, bool rasscf);
165
166 std::vector<unsigned int> map_density_to_sb();
167 };
168
170 class PsiRASSCF : public PsiRASCI {
171 public:
195 ~PsiRASSCF();
197 void compute();
198 void print(std::ostream&) const;
199
200 private:
201 static ClassDesc class_desc_;
202
203 int rasscf_energy_convergence_;
204 int rasscf_convergence_;
205 int rasscf_maxiter_; //< max number of iterations in rasscf
206 int rasscf_target_sym_; //< target symmetry
207 int diis_start_;
208 double max_step_;
209
210
211 bool state_average_; //< state average?
212 bool relax_core_;
213
214 bool run_detci_only_; // hack to allow running state-averaged RASSCF
215
216 void write_input(int convergence);
217
218 };
219
220
221}
222
223#endif /*_chemistry_qc_psi_psici_h*/
This class is used to contain information about classes.
Definition class.h:147
PsiCorrWavefunction is a Psi correlated wave function.
Definition psiwfn.h:140
PsiRASCI is a general (RAS) CI PsiWavefunction.
Definition psici.h:37
void print(std::ostream &) const
Print information about the object.
const Ref< OrbitalSpace > & orbs_sb(SpinCase1 spin)
if this is PsiRASSCF this will return RASSCF orbitals
int target_sym_
number of roots for detci calculations
Definition psici.h:113
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-...
const std::vector< unsigned int > & ras1() const
returns vector that specifies the number of RAS1 orbitals in each irrep
Definition psici.h:83
unsigned int ras3_max() const
returns the maximum number of electrons allowed in RAS3 space
Definition psici.h:89
RefSymmSCMatrix onepdm_occ(SpinCase1 spin)
1-pdm in the space reported by occ()
Ref< OrbitalSpace > orbs_sb_[NSpinCases1]
maxiter for detci
Definition psici.h:122
bool repl_otf_
block size for the H0 guess
Definition psici.h:115
const std::vector< unsigned int > & ras3() const
returns vector that specifies the number of RAS3 orbitals in each irrep
Definition psici.h:87
int h0_blocksize_
the symmetry (irrep) of the target root
Definition psici.h:114
std::vector< unsigned int > moorder_
orbital reordering
Definition psici.h:161
bool tpdm_print_
print the one-particle density matrix
Definition psici.h:109
int scf_stop_levelshift_
Psi3 cscf levelshift.
Definition psici.h:139
int nroots_
the spin multiplicity of the target state
Definition psici.h:112
double magnetic_moment() const
Computes the S (or J) magnetic moment of the target state(s), in units of .
void save_data_state(StateOut &s)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
Ref< OneBodyWavefunction > valence_obwfn_
number of iterations, for which the levelshift is applied
Definition psici.h:158
const std::vector< unsigned int > & ras2() const
returns vector that specifies the number of RAS2 orbitals in each irrep
Definition psici.h:85
int root_
print the two-particle density matrix
Definition psici.h:110
RefSymmSCMatrix twopdm_occ()
spin-free 2-pdm in the space reported by occ()
void compute()
Recompute at least the results that have compute true and are not already computed.
RefSymmSCMatrix twopdm_occ(SpinCase2 spin)
2-pdm in the space reported by occ()
PsiRASCI(const Ref< KeyVal > &keyval)
A KeyVal constructor is used to generate a PsiRASCI object from the input.
int multiplicity_
compute a specific root of the wave function
Definition psici.h:111
void write_input(int convergence)
Prepares a complete Psi input file. The input file is assumed to have been opened.
const Ref< OrbitalSpace > & occ(SpinCase1 spin)
returns occupied OrbitalSpace.
int energy_convergence_
do CI string replacements on the fly. saves memory, but is slower.
Definition psici.h:118
RefSymmSCMatrix mo_density(SpinCase1 spin)
PsiRASSCF is a type of a PsiRASCI wavefunction that implements orbital optimization.
Definition psici.h:170
PsiRASSCF(const Ref< KeyVal > &kv)
A KeyVal constructor is used to generate a PsiRASSCF object from the input.
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 &) const
Print information about the object.
void compute()
Recompute at least the results that have compute true and are not already computed.
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
Contains all MPQC code up to version 3.
Definition mpqcin.h:14

Generated at Wed Sep 25 2024 02:45:30 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.