MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
ccsd_sub_bar_r12.h
1//
2// ccsd_sub_bar_r12.h : Torheyden & Valeev, Phys Chem Chem Phys 10, 3410 (2008)
3//
4// Copyright (C) 2009 Toru Shiozaki
5//
6// Author: Toru Shiozaki <shiozaki.toru@gmail.com>
7// Maintainer: TS
8//
9// This file is part of the SC Toolkit.
10//
11// The SC Toolkit is free software; you can redistribute it and/or modify
12// it under the terms of the GNU Library General Public License as published by
13// the Free Software Foundation; either version 2, or (at your option)
14// any later version.
15//
16// The SC Toolkit is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU Library General Public License for more details.
20//
21// You should have received a copy of the GNU Library General Public License
22// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24//
25// The U.S. Government is granted a limited license as per AL 91-7.
26//
27
28#pragma once
29#ifndef __chemistry_qc_ccr12_ccsd_sub_bar_r12_h
30#define __chemistry_qc_ccr12_ccsd_sub_bar_r12_h
31
32#include <chemistry/qc/ccr12/ccsd_sub_r12.h>
33#include <chemistry/qc/ccr12/ccr12_info.h>
34
35namespace sc {
36
38 protected:
39
40 void compute_amp();
41 void smith_0_1(Ref<Tensor>&);
42 void smith_0_2(Ref<Tensor>&);
43
44 public:
45 CCSD_Sub_Bar_R12(CCR12_Info* inz) : CCSD_Sub_R12(inz, true) { };
46
48
49 double compute() {
50 compute_amp();
51 if (!z->r12world()->r12tech()->ansatz()->diag()) {
52 // ijkl ansatz
53 z->denom_contraction(tildeV_, intermediate_);
54 z->prod_iiii(tildeV_, intermediate_, energy_, true);
55 return z->get_e(energy_);
56 } else {
57 // fixed diagonal ansatz
58 const Ref<Tensor> gt2 = z->gt2();
59 intermediate_->zero();
60 z->denom_contraction(gt2, intermediate_);
61 z->prod_iiii(gt2, intermediate_, energy_, true);
62 const double bterm = z->get_e(energy_);
63 energy_->zero();
64 z->prod_iiii(tildeV_, gt2, energy_, false);
65 const double direct_en = 2.0*(z->get_e(energy_));
66 return direct_en - bterm;
67 }
68 };
69
70};
71
72}
73
74#endif
75
CCR12_Info is the compilation of members that are used in CC and CC-R12 methods.
Definition ccr12_info.h:50
void prod_iiii(const Ref< Tensor > &, const Ref< Tensor > &, Ref< Tensor > &, const bool transpose=false)
utilities for Lambda contribution in fixed-amp approaches
double get_e(const Ref< Tensor > &)
Functions used in specific (i.e. derived) CC-R12 object.
Definition ccsd_sub_bar_r12.h:37
CCSD_Sub_R12 is the base class for some (2)R12 methods.
Definition ccsd_sub_r12.h:38
A template class that maintains references counts.
Definition ref.h:361
Contains all MPQC code up to version 3.
Definition mpqcin.h:14

Generated at Wed Sep 25 2024 02:45:29 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.