MPQC  3.0.0-alpha
psirdm.h
1 //
2 // psirdm.h
3 //
4 // Copyright (C) 2009 Edward Valeev
5 //
6 // Author: Edward Valeev <evaleev@vt.edu>
7 // Maintainer: EV
8 //
9 // This file is part of the SC Toolkit.
10 //
11 // The SC Toolkit is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU Library General Public License as published by
13 // the Free Software Foundation; either version 2, or (at your option)
14 // any later version.
15 //
16 // The SC Toolkit is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU Library General Public License for more details.
20 //
21 // You should have received a copy of the GNU Library General Public License
22 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 //
25 // The U.S. Government is granted a limited license as per AL 91-7.
26 //
27 
28 #ifndef _mpqc_src_lib_chemistry_qc_psi_psirdm_h
29 #define _mpqc_src_lib_chemistry_qc_psi_psirdm_h
30 
31 #include <chemistry/qc/psi/psiwfn.h>
32 #include <chemistry/qc/wfn/rdm.h>
33 
34 namespace sc {
35 
36  class PsiRDMCumulantTwo;
37 
39  class PsiRDMTwo : public RDM<Two> {
41  public:
54  PsiRDMTwo(const Ref<KeyVal>& kv);
55  PsiRDMTwo(StateIn& si);
56  ~PsiRDMTwo();
57  void save_data_state(StateOut& so);
58 
59  Ref<PsiWavefunction> wfn() const { return wfn_; }
60  RefSymmSCMatrix scmat(SpinCase2 spincase) const;
62  Ref< RDM<One> > rdm_m_1() const;
63  Ref<OrbitalSpace> orbs(SpinCase1 spin) const;
64 
65  private:
67 
68  static ClassDesc class_desc_;
69  };
70 
71 #if 0
72  class PsiRDMCumulantTwo : public RDMCumulant<Two> {
74  public:
75  PsiRDMCumulantTwo(const Ref<PsiRDMTwo>& density);
76  PsiRDMCumulantTwo(StateIn& si);
77  ~PsiRDMCumulantTwo();
78  void save_data_state(StateOut& so);
79 
80  RefSymmSCMatrix scmat(SpinCase2 spincase) const;
81 
82  private:
83  Ref<PsiRDMTwo> density_;
84 
85  static ClassDesc class_desc_;
86  };
87 #endif
88 
90  class PsiRDMOne : public RDM<One> {
91  public:
104  PsiRDMOne(const Ref<KeyVal>& kv);
105  PsiRDMOne(StateIn& si);
107  ~PsiRDMOne();
108  void save_data_state(StateOut& so);
109 
110  Ref<OrbitalSpace> orbs(SpinCase1 spin) const;
111  RefSymmSCMatrix scmat(SpinCase1 spin) const;
112 
113  private:
115 
116  static ClassDesc class_desc_;
117  };
118 
120  class PsiSpinFreeRDMTwo : public SpinFreeRDM<Two> {
121  public:
134  PsiSpinFreeRDMTwo(const Ref<KeyVal>& kv);
137  void save_data_state(StateOut& so);
138 
139  Ref<PsiWavefunction> wfn() const { return wfn_; }
140  RefSymmSCMatrix scmat() const;
141  const Ref<DistArray4>& da4() const;
142  Ref< SpinFreeRDM<One> > rdm_m_1() const;
143  Ref<OrbitalSpace> orbs() const;
144 
145  private:
147 
148  void make_da4();
149 
150  static ClassDesc class_desc_;
151  };
152 
154  class PsiSpinFreeRDMOne : public SpinFreeRDM<One> {
155  public:
168  PsiSpinFreeRDMOne(const Ref<KeyVal>& kv);
172  void save_data_state(StateOut& so);
173 
174  Ref<OrbitalSpace> orbs() const;
175  RefSymmSCMatrix scmat() const;
176 
177  private:
179 
180  static ClassDesc class_desc_;
181  };
182 
183 } // end of namespace sc
184 
185 #endif // end of header guard
186 
187 
188 // Local Variables:
189 // mode: c++
190 // c-file-style: "CLJ-CONDENSED"
191 // End:
sc::PsiRDMOne::PsiRDMOne
PsiRDMOne(const Ref< KeyVal > &kv)
A KeyVal constructor is used to generate a PsiRDMOne object from the input.
sc::PsiRDMOne
PsiRDMOne is a 1-RDM from a PsiWavefunction.
Definition: psirdm.h:90
sc::RefSymmSCMatrix
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:265
sc::PsiRDMTwo::save_data_state
void save_data_state(StateOut &so)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::Ref
A template class that maintains references counts.
Definition: ref.h:361
sc::PsiSpinFreeRDMOne::PsiSpinFreeRDMOne
PsiSpinFreeRDMOne(const Ref< KeyVal > &kv)
A KeyVal constructor is used to generate a PsiRDMOne object from the input.
sc::PsiRDMOne::orbs
Ref< OrbitalSpace > orbs(SpinCase1 spin) const
the orbital space of spincase s in which the density is reported
sc::RDM< One >::wfn
Ref< Wavefunction > wfn() const
the corresponding Wavefunction
Definition: rdm.h:109
sc::PsiSpinFreeRDMOne::orbs
Ref< OrbitalSpace > orbs() const
the orbital space of spincase s in which the density is reported
sc::PsiRDMTwo::cumulant
Ref< cumulant_type > cumulant() const
cumulant of rank R
sc::RDM
RDM<R> is a reduced density matrix of rank R.
Definition: rdm.h:69
sc::PsiRDMTwo::rdm_m_1
Ref< RDM< One > > rdm_m_1() const
RDM of rank decreased by 1.
sc::PsiRDMTwo
PsiRDMTwo is a 2-RDM from a PsiWavefunction.
Definition: psirdm.h:39
sc::StateIn
Definition: statein.h:79
sc::ClassDesc
This class is used to contain information about classes.
Definition: class.h:147
sc::PsiSpinFreeRDMTwo::PsiSpinFreeRDMTwo
PsiSpinFreeRDMTwo(const Ref< KeyVal > &kv)
A KeyVal constructor is used to generate a PsiSpinFreeRDMTwo object from the input.
sc::PsiSpinFreeRDMOne::scmat
RefSymmSCMatrix scmat() const
full density matrix, can be used for RDM of any rank
sc::PsiSpinFreeRDMOne::save_data_state
void save_data_state(StateOut &so)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::PsiSpinFreeRDMTwo::orbs
Ref< OrbitalSpace > orbs() const
the orbital space of spincase s in which the density is reported
sc::SpinFreeRDM
SpinFreeRDM<R> is a spin-free reduced density matrix of rank R.
Definition: rdm.h:226
sc::PsiRDMOne::save_data_state
void save_data_state(StateOut &so)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::StateOut
Definition: stateout.h:71
sc::RDMCumulant< Two >
sc::PsiSpinFreeRDMTwo
PsiRDMTwo is a spin-free 2-RDM from a PsiWavefunction.
Definition: psirdm.h:120
sc::PsiSpinFreeRDMTwo::save_data_state
void save_data_state(StateOut &so)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::SpinFreeRDM< One >::wfn
Ref< Wavefunction > wfn() const
the corresponding Wavefunction
Definition: rdm.h:266
sc::PsiRDMTwo::PsiRDMTwo
PsiRDMTwo(const Ref< KeyVal > &kv)
A KeyVal constructor is used to generate a PsiRDMTwo object from the input.
sc::PsiSpinFreeRDMOne
PsiSpinFreeRDMOne is a spin-free 1-RDM from a PsiWavefunction.
Definition: psirdm.h:154
sc::PsiRDMTwo::orbs
Ref< OrbitalSpace > orbs(SpinCase1 spin) const
the orbital space of spincase s in which the density is reported
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
sc::PsiSpinFreeRDMTwo::da4
const Ref< DistArray4 > & da4() const
should only be used for R=2
sc::PsiSpinFreeRDMTwo::rdm_m_1
Ref< SpinFreeRDM< One > > rdm_m_1() const
RDM of rank decreased by 1.
sc::PsiSpinFreeRDMTwo::scmat
RefSymmSCMatrix scmat() const
full density matrix, can be used for RDM of any rank

Generated at Sun Jan 26 2020 23:23:59 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.