MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
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
33namespace sc {
34
35// //////////////////////////////////////////////////////////////////////////
36
41class AccumH: virtual public SavableState {
42 protected:
44
45 public:
46 AccumH();
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
89class AccumHNull: public AccumH {
90 public:
91 AccumHNull();
93 AccumHNull(const Ref<KeyVal>&);
95
97
98 void accum(const RefSymmSCMatrix& h);
99};
100
104class SumAccumH: public AccumH {
105 protected:
106 int n_;
107 Ref<AccumH> *accums_;
108
109 public:
122 ~SumAccumH();
123
125
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:
This specialization of AccumH does nothing.
Definition accum.h:89
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 accum(const RefSymmSCMatrix &h)
Sum the contribution from this object into h.
AccumH computes additions to the one body Hamiltonian.
Definition accum.h:41
virtual double e()
Returns the scalar contribution to the energy.
virtual void accum(const RefSymmSCMatrix &h)=0
Sum the contribution from this object into h.
virtual void print_summary()
Print information about the contribution.
virtual void init(const Ref< Wavefunction > &)
Sets the current Wavefunction.
virtual void done()
Should be called after we are finished with this AccumH.
AccumH(const Ref< KeyVal > &)
The KeyVal constructor.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
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
Base class for objects that can save/restore state.
Definition state.h:45
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
This specialization of AccumHNull does nothing.
Definition accum.h:104
double e()
Returns the scalar contribution to the energy.
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 accum(const RefSymmSCMatrix &h)
Sum the contribution from this object into h.
void init(const Ref< Wavefunction > &)
Sets the current Wavefunction.
void done()
Should be called after we are finished with this AccumH.
SumAccumH(const Ref< KeyVal > &)
The KeyVal constructor.
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.