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

r12ia.h

00001 //
00002 // r12ia.h
00003 //
00004 // Copyright (C) 2002 Edward Valeev
00005 //
00006 // Author: Edward Valeev <edward.valeev@chemistry.gatech.edu>
00007 // Maintainer: EV
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_mbptr12_r12ia_h
00029 #define _chemistry_qc_mbptr12_r12ia_h
00030 
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034 
00035 #include <util/ref/ref.h>
00036 #include <util/group/memory.h>
00037 
00038 namespace sc {
00039 
00041 // R12IntsAcc accumulates transformed integrals of (og|og) type
00042 //   o = active occupied MO
00043 //   g = general MO
00044 
00045 class R12IntsAcc: public RefCount {
00046 
00047     int num_te_types_;  // Number of types of integrals in a block (usually, 3 or 4)
00048 
00049    protected:
00050     int nocc_, nocc_act_, nfzc_;
00051     int nbasis1_, nbasis2_;
00052     size_t nbasis__2_;  // nbasis_ squared - the size of a block of integrals of one type
00053     size_t blksize_;    // the same in bytes
00054     size_t blocksize_;  // hence the size of the block of num_te_types of integrals is nbasis__2_ * num_te_types
00055     bool committed_;    // Whether all data has been written out and ready to be read
00056 
00057   public:
00058     R12IntsAcc(int num_te_types, int nbasis1, int nbasis2, int nocc, int nfzc);
00059     ~R12IntsAcc();
00060 
00062     enum tbint_type { eri=0, r12=1, r12t1=2, r12t2=3};
00063     static const int max_num_te_types_ = 4;
00064 
00066     int num_te_types() const { return num_te_types_; };
00067 
00071     virtual void store_memorygrp(Ref<MemoryGrp>& mem, int ni)=0;
00075     virtual void store_pair_block(int i, int j, double *ints)=0;
00077     virtual void commit() { committed_ = true; };
00079     virtual void deactivate() {};
00081     virtual double* retrieve_pair_block(int i, int j, tbint_type oper_type) =0;
00083     virtual void release_pair_block(int i, int j, tbint_type oper_type) =0;
00085     virtual bool is_local(int i, int j) const =0;
00087     virtual bool is_avail(int i, int j) const =0;
00089     virtual bool has_access(int proc) const =0;
00091     virtual bool can_restart() const =0;
00092 };
00093 
00094 }
00095 
00096 #endif
00097 
00098 // Local Variables:
00099 // mode: c++
00100 // c-file-style: "CLJ"
00101 // End:

Generated at Wed Apr 28 10:12:54 2004 for MPQC 2.2.2 using the documentation package Doxygen 1.2.14.