Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

accum.h

00001 //
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 // //////////////////////////////////////////////////////////////////////////
00038 
00039 // computes additions to H
00040 class AccumH: virtual public SavableState {
00041   protected:
00042     Ref<Wavefunction> wfn_;
00043 
00044   public:
00045     AccumH();
00046     AccumH(StateIn&);
00047     AccumH(const Ref<KeyVal>&);
00048     virtual ~AccumH();
00049 
00050     void save_data_state(StateOut&);
00051     
00052     virtual void init(const Ref<Wavefunction>&);
00053     virtual void accum(const RefSymmSCMatrix& h) =0;
00054     virtual void print_summary();
00055     virtual void done();
00056 
00057     // Returns the scalar contribution to the energy.
00058     // Available only after accum is called.
00059     virtual double e();
00060 };
00061 
00062 
00063 class AccumHNull: public AccumH {
00064   public:
00065     AccumHNull();
00066     AccumHNull(StateIn&);
00067     AccumHNull(const Ref<KeyVal>&);
00068     ~AccumHNull();
00069 
00070     void save_data_state(StateOut&);
00071     
00072     void accum(const RefSymmSCMatrix& h);
00073 };
00074 
00075 class SumAccumH: public AccumH {
00076   protected:
00077     int n_;
00078     Ref<AccumH> *accums_;
00079 
00080   public:
00081     SumAccumH(StateIn&);
00082     SumAccumH(const Ref<KeyVal>&);
00083     ~SumAccumH();
00084 
00085     void save_data_state(StateOut&);
00086 
00087     void init(const Ref<Wavefunction>&);
00088     void accum(const RefSymmSCMatrix& h);
00089     void done();
00090 
00091     double e();
00092 };
00093 
00094 #endif
00095 
00096 // Local Variables:
00097 // mode: c++
00098 // c-file-style: "ETS"
00099 // End:

Generated at Thu Oct 4 18:08:42 2001 for MPQC 2.0.0 using the documentation package Doxygen 1.2.5.