00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifdef __GNUG__
00029 #pragma interface
00030 #endif
00031
00032 #include <util/state/state.h>
00033 #include <util/state/statein.h>
00034 #include <util/state/stateout.h>
00035
00036 #ifndef _chemistry_qc_mbptr12_twoparticlecontraction_h
00037 #define _chemistry_qc_mbptr12_twoparticlecontraction_h
00038
00039 namespace sc {
00040
00041 namespace LinearR12 {
00042
00045 class TwoParticleContraction : virtual public SavableState {
00046 public:
00047 TwoParticleContraction(unsigned int nrow, unsigned int ncol);
00048 TwoParticleContraction(StateIn& si);
00049 virtual ~TwoParticleContraction() {}
00050
00051 void save_data_state(StateOut& so);
00052
00053 unsigned int nrow() const;
00054 unsigned int ncol() const;
00055
00057 virtual double contract(const double* A, const double* B) const =0;
00058
00059 protected:
00060 double dot_prod(const double* A, const double* B) const;
00061
00062 private:
00063 unsigned int nrow_;
00064 unsigned int ncol_;
00065 };
00066
00069 class Direct_Contraction : public TwoParticleContraction {
00070 public:
00071 Direct_Contraction(unsigned int nrow, unsigned int ncol, double scale);
00072 Direct_Contraction(StateIn& si);
00073 ~Direct_Contraction() {}
00074 void save_data_state(StateOut& so);
00075
00077 double contract(const double* A, const double* B) const;
00078
00079 private:
00080 double scale_;
00081 };
00082
00086 class ABS_OBS_Contraction : public TwoParticleContraction {
00087 public:
00089 ABS_OBS_Contraction(unsigned int nobs, unsigned int nocc1, unsigned int nocc2);
00090 ABS_OBS_Contraction(StateIn&);
00091 ~ABS_OBS_Contraction() {}
00092 void save_data_state(StateOut&);
00094 double contract(const double* A, const double* B) const;
00095
00096 private:
00097 unsigned int nocc1_;
00098 unsigned int nocc2_;
00099 };
00100
00104 class CABS_OBS_Contraction : public TwoParticleContraction {
00105 public:
00107 CABS_OBS_Contraction(unsigned int nobs);
00108 CABS_OBS_Contraction(StateIn&);
00109 ~CABS_OBS_Contraction() {}
00110 void save_data_state(StateOut&);
00112 double contract(const double* A, const double* B) const;
00113 };
00114 }
00115 }
00116
00117 #endif
00118