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

mbptr12.h

00001 //
00002 // mbptr12.h
00003 //
00004 // Copyright (C) 2001 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_mbptr12_h
00029 #define _chemistry_qc_mbptr12_mbptr12_h
00030 
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034 
00035 #include <util/misc/compute.h>
00036 #include <util/group/memory.h>
00037 #include <util/group/message.h>
00038 #include <util/group/thread.h>
00039 #include <chemistry/qc/basis/obint.h>
00040 #include <chemistry/qc/basis/tbint.h>
00041 #include <chemistry/qc/scf/scf.h>
00042 #include <chemistry/qc/mbpt/mbpt.h>
00043 #include <chemistry/qc/mbptr12/linearr12.h>
00044 #include <chemistry/qc/mbptr12/vxb_eval.h>
00045 #include <chemistry/qc/mbptr12/vxb_eval_info.h>
00046 #include <chemistry/qc/mbptr12/mp2r12_energy.h>
00047 
00048 namespace sc {
00049 
00050 // //////////////////////////////////////////////////////////////////////////
00051 
00052 class R12IntEval;
00053 class R12IntEvalInfo;
00054 class MP2R12Energy;
00055   
00058 class MBPT2_R12: public MBPT2 {
00059 
00060     Ref<R12IntEval> r12eval_;           // the R12 intermediates evaluator
00061 
00064     Ref<MP2R12Energy> r12a_energy_;
00065     Ref<MP2R12Energy> r12ap_energy_;
00066     Ref<MP2R12Energy> r12b_energy_;
00067 
00068     Ref<GaussianBasisSet> aux_basis_;
00069     Ref<SCVector> epair_0_, epair_1_;   // Singlet/triplet pair energies if spin-adapted
00070                                         // Alpha-beta/alpha-alpha pair energies if spin-orbital
00071 
00072 #define ref_to_mp2r12_acc_ 100.0
00073 
00074     double mp2_corr_energy_;
00075     double r12_corr_energy_;
00076     LinearR12::StandardApproximation stdapprox_;
00077     R12IntEvalInfo::StoreMethod r12ints_method_;
00078     char* r12ints_file_;
00079     bool spinadapted_;
00080 
00081     void init_variables_();
00082 
00083     // This checks if the integral factory is suitable for R12 calculations
00084     void check_integral_factory_();
00085 
00086     /* calculate the MP2-R12 energy in std approximations A and A' */
00087     void compute_energy_a_();
00088 
00089   protected:
00090     // implement the Compute::compute() function,
00091     // overrides MBPT2::compute()
00092     void compute();
00093 
00094   public:
00095     MBPT2_R12(StateIn&);
00167     MBPT2_R12(const Ref<KeyVal>&);
00168     ~MBPT2_R12();
00169 
00170     void save_data_state(StateOut&);
00171 
00172     Ref<GaussianBasisSet> aux_basis() const;
00173     LinearR12::StandardApproximation stdapprox() const;
00174     bool spinadapted() const;
00175     R12IntEvalInfo::StoreMethod r12ints_method() const;
00176     char* r12ints_file() const;
00177 
00178     double corr_energy();
00179     double r12_corr_energy();
00180 
00181     RefSymmSCMatrix density();
00182 
00183     void obsolete();
00184     int gradient_implemented() const;
00185     int value_implemented() const;
00186 
00187     void print(std::ostream&o=ExEnv::out0()) const;
00188 };
00189 
00190 }
00191 
00192 #endif
00193 
00194 // Local Variables:
00195 // mode: c++
00196 // c-file-style: "CLJ"
00197 // End:

Generated at Fri Mar 19 10:48:19 2004 for MPQC 2.2.1 using the documentation package Doxygen 1.3.5.