![]()
|
accum.h00001 //
00002 // accum.h
00003 //
00004 // Copyright (C) 1996 Limit Point Systems, Inc.
00005 //
00006 // Author: Curtis Janssen <cljanss@limitpt.com>
00007 // Maintainer: LPS
00008 //
00009 // This file is part of the SC Toolkit.
00010 //
00011 // The SC Toolkit is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Library General Public License as published by
00013 // the Free Software Foundation; either version 2, or (at your option)
00014 // any later version.
00015 //
00016 // The SC Toolkit is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00019 // GNU Library General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Library General Public License
00022 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00024 //
00025 // The U.S. Government is granted a limited license as per AL 91-7.
00026 //
00027
00028 #ifndef _chemistry_qc_wfn_accum_h
00029 #define _chemistry_qc_wfn_accum_h
00030
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034
00035 #include <chemistry/qc/wfn/wfn.h>
00036
00037 namespace sc {
00038
00039 // //////////////////////////////////////////////////////////////////////////
00040
00041 // computes additions to H
00042 class AccumH: virtual public SavableState {
00043 protected:
00044 Ref<Wavefunction> wfn_;
00045
00046 public:
00047 AccumH();
00048 AccumH(StateIn&);
00049 AccumH(const Ref<KeyVal>&);
00050 virtual ~AccumH();
00051
00052 void save_data_state(StateOut&);
00053
00054 virtual void init(const Ref<Wavefunction>&);
00055 virtual void accum(const RefSymmSCMatrix& h) =0;
00056 virtual void print_summary();
00057 virtual void done();
00058
00059 // Returns the scalar contribution to the energy.
00060 // Available only after accum is called.
00061 virtual double e();
00062 };
00063
00064
00065 class AccumHNull: public AccumH {
00066 public:
00067 AccumHNull();
00068 AccumHNull(StateIn&);
00069 AccumHNull(const Ref<KeyVal>&);
00070 ~AccumHNull();
00071
00072 void save_data_state(StateOut&);
00073
00074 void accum(const RefSymmSCMatrix& h);
00075 };
00076
00077 class SumAccumH: public AccumH {
00078 protected:
00079 int n_;
00080 Ref<AccumH> *accums_;
00081
00082 public:
00083 SumAccumH(StateIn&);
00084 SumAccumH(const Ref<KeyVal>&);
00085 ~SumAccumH();
00086
00087 void save_data_state(StateOut&);
00088
00089 void init(const Ref<Wavefunction>&);
00090 void accum(const RefSymmSCMatrix& h);
00091 void done();
00092
00093 double e();
00094 };
00095
00096 }
00097
00098 #endif
00099
00100 // Local Variables:
00101 // mode: c++
00102 // c-file-style: "ETS"
00103 // End:
Generated at Fri Jan 10 08:14:08 2003 for MPQC 2.1.3 using the documentation package Doxygen 1.2.14. |