MPQC
3.0.0-alpha
ccsd_sub_r12.h
1
//
2
// ccsd_sub_r12.h : Base class for (2)R12 family of methods
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_r12_h
30
#define __chemistry_qc_ccr12_ccsd_sub_r12_h
31
32
#include <chemistry/qc/ccr12/ccr12_info.h>
33
#include <cassert>
34
35
namespace
sc
{
36
38
class
CCSD_Sub_R12
:
public
RefCount
{
39
40
protected
:
41
CCR12_Info
* z;
42
Ref<Tensor>
tildeV_;
43
Ref<Tensor>
intermediate_;
44
Ref<Tensor>
energy_;
45
46
void
denom_contraction() { z->denom_contraction(tildeV_, intermediate_); };
47
48
public
:
49
CCSD_Sub_R12
(
CCR12_Info
* inz,
const
bool
do_init) : z(inz) {
50
intermediate_ =
new
Tensor
(
"intermediate"
, z->mem());
51
energy_ =
new
Tensor
(
"energy"
, z->mem());
52
if
(do_init) {
53
tildeV_ =
new
Tensor
(
"tildeV"
, z->mem());
54
z->offset_gt2(tildeV_,
false
);
55
}
56
z->offset_gt2(intermediate_,
false
);
57
z->offset_e(energy_);
58
};
59
60
virtual
~
CCSD_Sub_R12
() {};
61
virtual
double
compute() = 0;
62
};
63
64
}
65
66
#endif
67
sc::Tensor
Definition:
tensor.h:49
sc::Ref
A template class that maintains references counts.
Definition:
ref.h:361
sc::RefCount
The base class for all reference counted objects.
Definition:
ref.h:192
sc::CCSD_Sub_R12
CCSD_Sub_R12 is the base class for some (2)R12 methods.
Definition:
ccsd_sub_r12.h:38
sc
Contains all MPQC code up to version 3.
Definition:
mpqcin.h:14
sc::CCR12_Info
CCR12_Info is the compilation of members that are used in CC and CC-R12 methods.
Definition:
ccr12_info.h:50
Generated at Sun Jan 26 2020 23:23:57 for
MPQC
3.0.0-alpha using the documentation package
Doxygen
1.8.16.