00001 // 00002 // psicc_pt2r12.h 00003 // 00004 // Copyright (C) 2002 Edward Valeev 00005 // 00006 // Author: Edward Valeev <evaleev@vt.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 #ifdef __GNUC__ 00029 #pragma interface 00030 #endif 00031 00032 #ifndef _chemistry_qc_psi_psiccpt2r12_h 00033 #define _chemistry_qc_psi_psiccpt2r12_h 00034 00035 #include <chemistry/qc/basis/integral.h> 00036 #include <chemistry/qc/mbptr12/mbptr12.h> 00037 #include <chemistry/qc/psi/psicc.h> 00038 00039 namespace sc { 00040 00041 class MBPT2_R12; 00042 00045 class PsiCCSD_PT2R12 : public PsiCC { 00046 double eccsd_; 00047 00048 Ref<MBPT2_R12> mbptr12_; 00049 protected: 00051 bool new_approach_; 00053 static const bool mp2_only_ = false; 00055 static const bool replace_Lambda_with_T_ = true; 00057 static const unsigned int completeness_order_for_energy_ = 3; 00059 static const unsigned int 00060 completeness_order_for_intermediates_ = completeness_order_for_energy_ 00061 - 1; 00062 00063 void write_input(int conv); 00065 void import_occupations(); 00066 public: 00067 PsiCCSD_PT2R12(const Ref<KeyVal>&); 00068 PsiCCSD_PT2R12(StateIn&); 00069 ~PsiCCSD_PT2R12(); 00070 void save_data_state(StateOut&); 00071 int gradient_implemented() const; 00072 void compute(); 00073 00075 void set_desired_value_accuracy(double acc); 00076 00078 double eccsd(); 00080 void print(std::ostream&o=ExEnv::out0()) const; 00081 }; 00082 00085 class PsiCCSD_PT2R12T : public PsiCCSD_PT2R12 { 00086 double e_t_; 00087 void write_input(int conv); 00088 public: 00089 PsiCCSD_PT2R12T(const Ref<KeyVal>&); 00090 PsiCCSD_PT2R12T(StateIn&); 00091 ~PsiCCSD_PT2R12T(); 00092 void save_data_state(StateOut&); 00093 int gradient_implemented() const; 00094 void compute(); 00096 void print(std::ostream&o=ExEnv::out0()) const; 00097 }; 00098 00099 } 00100 00101 #endif /* header guard */