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 <string>
00036 #include <util/misc/compute.h>
00037 #include <util/group/memory.h>
00038 #include <util/group/message.h>
00039 #include <util/group/thread.h>
00040 #include <chemistry/qc/basis/obint.h>
00041 #include <chemistry/qc/basis/tbint.h>
00042 #include <chemistry/qc/scf/scf.h>
00043 #include <chemistry/qc/mbpt/mbpt.h>
00044 #include <chemistry/qc/mbptr12/linearr12.h>
00045 //#include <chemistry/qc/mbptr12/vxb_eval.h>
00046 #include <chemistry/qc/mbptr12/r12int_eval.h>
00047 #include <chemistry/qc/mbptr12/vxb_eval_info.h>
00048 #include <chemistry/qc/mbptr12/mp2r12_energy.h>
00049 #include <chemistry/qc/mbptr12/twobodygrid.h>
00050 
00051 namespace sc {
00052 
00053 // //////////////////////////////////////////////////////////////////////////
00054 
00055 class R12IntEval;
00056 class R12IntEvalInfo;
00057 class MP2R12Energy;
00058   
00061 class MBPT2_R12: public MBPT2 {
00062 
00063     Ref<R12IntEval> r12eval_;           // the R12 intermediates evaluator
00064 
00067     Ref<MP2R12Energy> r12a_energy_;
00068     Ref<MP2R12Energy> r12ap_energy_;
00069     Ref<MP2R12Energy> r12b_energy_;
00070 
00071     Ref<GaussianBasisSet> aux_basis_;   // This is the auxiliary basis set (ABS)
00072     Ref<GaussianBasisSet> vir_basis_;   // This is the virtuals basis set (VBS)
00073     Ref<SCVector> epair_0_, epair_1_;   // Singlet/triplet pair energies if spin-adapted
00074                                         // Alpha-beta/alpha-alpha pair energies if spin-orbital
00075 
00076     Ref<TwoBodyGrid> twopdm_grid_aa_;     // The set of 2 particle positions on which to compute values of alpha-alpha 2-PDM
00077     Ref<TwoBodyGrid> twopdm_grid_ab_;     // The set of 2 particle positions on which to compute values of alpha-beta 2-PDM
00078 
00079 #define ref_to_mp2r12_acc_ 100.0
00080 
00081     double mp2_corr_energy_;
00082     double r12_corr_energy_;
00083     LinearR12::StandardApproximation stdapprox_;
00084     LinearR12::ABSMethod abs_method_;
00085     R12IntEvalInfo::StoreMethod r12ints_method_;
00086     std::string r12ints_file_;
00087     bool gbc_;
00088     bool ebc_;
00089     bool spinadapted_;
00090     bool include_mp1_;
00091 
00092     void init_variables_();
00093 
00094     // This checks if the integral factory is suitable for R12 calculations
00095     void check_integral_factory_();
00096 
00097     // calculate the MP2-R12 energy in std approximations A and A'
00098     void compute_energy_a_();
00099 
00100   protected:
00101     // implement the Compute::compute() function,
00102     // overrides MBPT2::compute()
00103     void compute();
00104 
00105   public:
00106     MBPT2_R12(StateIn&);
00219     MBPT2_R12(const Ref<KeyVal>&);
00220     ~MBPT2_R12();
00221 
00222     void save_data_state(StateOut&);
00223 
00224     Ref<GaussianBasisSet> aux_basis() const;
00225     Ref<GaussianBasisSet> vir_basis() const;
00226     bool gbc() const;
00227     bool ebc() const;
00228     LinearR12::ABSMethod abs_method() const;
00229     LinearR12::StandardApproximation stdapprox() const;
00230     bool spinadapted() const;
00231     R12IntEvalInfo::StoreMethod r12ints_method() const;
00232     const std::string& r12ints_file() const;
00233 
00234     double corr_energy();
00235     double r12_corr_energy();
00236 
00237     RefSymmSCMatrix density();
00238 
00239     void obsolete();
00240     int gradient_implemented() const;
00241     int value_implemented() const;
00242 
00243     void print(std::ostream&o=ExEnv::out0()) const;
00244 };
00245 
00246 }
00247 
00248 #endif
00249 
00250 // Local Variables:
00251 // mode: c++
00252 // c-file-style: "CLJ"
00253 // End:

Generated at Mon Dec 3 23:23:38 2007 for MPQC 2.3.1 using the documentation package Doxygen 1.5.2.