MPQC  3.0.0-alpha
accum.h
1 //
2 // accum.h
3 //
4 // Copyright (C) 1996 Limit Point Systems, Inc.
5 //
6 // Author: Curtis Janssen <cljanss@limitpt.com>
7 // Maintainer: LPS
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 _chemistry_qc_wfn_accum_h
29 #define _chemistry_qc_wfn_accum_h
30 
31 #include <chemistry/qc/wfn/wfn.h>
32 
33 namespace sc {
34 
35 // //////////////////////////////////////////////////////////////////////////
36 
41 class AccumH: virtual public SavableState {
42  protected:
43  Ref<Wavefunction> wfn_;
44 
45  public:
46  AccumH();
47  AccumH(StateIn&);
60  AccumH(const Ref<KeyVal>&);
61  virtual ~AccumH();
62 
64 
69  virtual void init(const Ref<Wavefunction>&);
71  virtual void accum(const RefSymmSCMatrix& h) =0;
73  virtual void print_summary();
78  virtual void done();
79 
83  virtual double e();
84 };
85 
86 
89 class AccumHNull: public AccumH {
90  public:
91  AccumHNull();
93  AccumHNull(const Ref<KeyVal>&);
94  ~AccumHNull();
95 
97 
98  void accum(const RefSymmSCMatrix& h);
99 };
100 
104 class SumAccumH: public AccumH {
105  protected:
106  int n_;
107  Ref<AccumH> *accums_;
108 
109  public:
110  SumAccumH(StateIn&);
121  SumAccumH(const Ref<KeyVal>&);
122  ~SumAccumH();
123 
124  void save_data_state(StateOut&);
125 
126  void init(const Ref<Wavefunction>&);
127  void accum(const RefSymmSCMatrix& h);
128  void done();
129 
130  double e();
131 };
132 
133 }
134 
135 #endif
136 
137 // Local Variables:
138 // mode: c++
139 // c-file-style: "ETS"
140 // End:
sc::RefSymmSCMatrix
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:265
sc::Ref
A template class that maintains references counts.
Definition: ref.h:361
sc::AccumHNull::save_data_state
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::AccumHNull
This specialization of AccumH does nothing.
Definition: accum.h:89
sc::SumAccumH::e
double e()
Returns the scalar contribution to the energy.
sc::AccumH::print_summary
virtual void print_summary()
Print information about the contribution.
sc::AccumH::init
virtual void init(const Ref< Wavefunction > &)
Sets the current Wavefunction.
sc::AccumH::done
virtual void done()
Should be called after we are finished with this AccumH.
sc::StateIn
Definition: statein.h:79
sc::AccumH::e
virtual double e()
Returns the scalar contribution to the energy.
sc::SumAccumH::done
void done()
Should be called after we are finished with this AccumH.
sc::AccumH
AccumH computes additions to the one body Hamiltonian.
Definition: accum.h:41
sc::AccumHNull::accum
void accum(const RefSymmSCMatrix &h)
Sum the contribution from this object into h.
sc::SumAccumH::save_data_state
void save_data_state(StateOut &)
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::AccumH::accum
virtual void accum(const RefSymmSCMatrix &h)=0
Sum the contribution from this object into h.
sc::SumAccumH
This specialization of AccumHNull does nothing.
Definition: accum.h:104
sc::SavableState
Base class for objects that can save/restore state.
Definition: state.h:45
sc::AccumH::save_data_state
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::SumAccumH::accum
void accum(const RefSymmSCMatrix &h)
Sum the contribution from this object into h.
sc::SumAccumH::init
void init(const Ref< Wavefunction > &)
Sets the current Wavefunction.
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14

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