forked from sanshar/Block
-
Notifications
You must be signed in to change notification settings - Fork 0
/
screen.h
108 lines (77 loc) · 8.02 KB
/
screen.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
Developed by Sandeep Sharma and Garnet K.-L. Chan, 2012
Copyright (c) 2012, Garnet K.-L. Chan
This program is integrated in Molpro with the permission of
Sandeep Sharma and Garnet K.-L. Chan
*/
#ifndef SPIN_SCREEN_HEADER
#define SPIN_SCREEN_HEADER
#include <vector>
#include <utility>
#include <IntegralMatrix.h>
namespace SpinAdapted{
/**
* from a list of (sorted) indices in a given block
* returns the screened pair indices for the operators
* cd and cdcomp that
* interact
* with the other block indices (interactingix)
*/
std::vector<std::pair<int, int> > screened_cd_indices(const std::vector<int, std::allocator<int> >& indices,
const std::vector<int, std::allocator<int> >& interactingix,
const TwoElectronArray& twoe, double thresh);
/**
* from a list of (sorted) indices in a given block
* returns the screened pair indices for the operators
* dd and ddcomp that
* interact
* with the other block indices (interactingix)
*/
std::vector<std::pair<int, int> > screened_dd_indices(const std::vector<int, std::allocator<int> >& indices,
const std::vector<int, std::allocator<int> >& interactingix,
const TwoElectronArray& twoe, double thresh);
/**
* given two indices i and j, determine
* whether we should build c+i dj
* or the complementary operator for c+i dj
* by looking at the integrals of the complementary
* operator
* interactingix are the indices that we are summing over
* (i.e. the indices in the block that we are interacting with)
*/
bool screen_cd_interaction(int ci, int dj, const std::vector<int, std::allocator<int> >& interactingix,
const TwoElectronArray& twoe, double thresh);
/* see comment for screen_cd_interaction */
bool screen_dd_interaction(int di, int dj, const std::vector<int, std::allocator<int> >& interactingix,
const TwoElectronArray& twoe, double thresh);
std::vector<int, std::allocator<int> > screened_d_indices(const std::vector<int, std::allocator<int> >& indices,
const std::vector<int, std::allocator<int> >& interactingix,
const OneElectronArray& onee, const TwoElectronArray& twoe, double thresh);
bool screen_d_interaction(int index, const std::vector<int, std::allocator<int> >& interactingix,
const OneElectronArray& onee, const TwoElectronArray& twoe, double thresh);
std::vector<int, std::allocator<int> > screened_cddcomp_indices(const std::vector<int, std::allocator<int> >& otherindices,
const std::vector<int, std::allocator<int> >& selfindices,
const OneElectronArray& onee,
const TwoElectronArray& twoe, double thresh);
bool screen_cddcomp_interaction(int otherindex, const std::vector<int, std::allocator<int> >& selfindices,
const OneElectronArray& onee,
const TwoElectronArray& twoe, double thresh);
// used for BCS calculations
std::vector<int, std::allocator<int> > screened_d_indices(const std::vector<int, std::allocator<int> >& indices, const std::vector<int, std::allocator<int> >& interactingix, const OneElectronArray& onee, const TwoElectronArray& twoe, const PairArray& vcc, const CCCCArray& vcccc, const CCCDArray& vcccd, double thresh);
bool screen_d_interaction(int index, const std::vector<int, std::allocator<int> >& interactingix, const OneElectronArray& onee, const TwoElectronArray& twoe, const PairArray& vcc, const CCCCArray& vcccc, const CCCDArray& vcccd, double thresh);
std::vector<std::pair<int, int> > screened_cd_indices(const std::vector<int, std::allocator<int> >& indices, const std::vector<int, std::allocator<int> >& interactingix, const TwoElectronArray& twoe, const PairArray& vcc, const CCCCArray& vcccc, const CCCDArray& vcccd, double thresh);
bool screen_cd_interaction(int ci, int dj, const std::vector<int, std::allocator<int> >& interactingix, const TwoElectronArray& twoe, const PairArray& vcc, const CCCCArray& vcccc, const CCCDArray& vcccd, double thresh);
std::vector<std::pair<int, int> > screened_dd_indices(const std::vector<int, std::allocator<int> >& indices, const std::vector<int, std::allocator<int> >& interactingix, const TwoElectronArray& twoe, const PairArray& vcc, const CCCCArray& vcccc, const CCCDArray& vcccd, double thresh);
bool screen_dd_interaction(int di, int dj, const std::vector<int, std::allocator<int> >& interactingix, const TwoElectronArray& twoe, const PairArray& vcc, const CCCCArray& vcccc, const CCCDArray& vcccd, double thresh);
std::vector<int, std::allocator<int> > screened_cddcomp_indices(const std::vector<int, std::allocator<int> >& otherindices, const std::vector<int, std::allocator<int> >& selfindices, const OneElectronArray& onee, const TwoElectronArray& twoe, const PairArray& vcc, const CCCCArray& vcccc, const CCCDArray& vcccd, double thresh);
bool screen_cddcomp_interaction(int otherindex, const std::vector<int, std::allocator<int> >& selfindices, const OneElectronArray& onee, const TwoElectronArray& twoe, const PairArray& vcc, const CCCCArray& vcccc, const CCCDArray& vcccd, double thresh);
vector<int, std::allocator<int> > screened_cdd_c_indices(const vector<int, std::allocator<int> >& indices, const vector<int, std::allocator<int> >& interactingix, int external_orb, const OneElectronArray& onee, const PerturbTwoElectronArray& twoe, double thresh);
vector<int, std::allocator<int> > screened_cdd_d_indices(const vector<int, std::allocator<int> >& indices, const vector<int, std::allocator<int> >& interactingix, int external_orb, const OneElectronArray& onee, const PerturbTwoElectronArray& twoe, double thresh);
vector<int, std::allocator<int> > screened_ccd_c_indices(const vector<int, std::allocator<int> >& indices, const vector<int, std::allocator<int> >& interactingix, int external_orb, const OneElectronArray& onee, const PerturbTwoElectronArray& twoe, double thresh);
vector<int, std::allocator<int> > screened_ccd_d_indices(const vector<int, std::allocator<int> >& indices, const vector<int, std::allocator<int> >& interactingix, int external_orb, const OneElectronArray& onee, const PerturbTwoElectronArray& twoe, double thresh);
bool screen_cdd_c_interaction(int index, const vector<int, std::allocator<int> >& interactingix, int external_orb, const OneElectronArray& onee, const PerturbTwoElectronArray& twoe, double thresh);
bool screen_cdd_d_interaction(int index, const vector<int, std::allocator<int> >& interactingix, int external_orb, const OneElectronArray& onee, const PerturbTwoElectronArray& twoe, double thresh);
bool screen_ccd_c_interaction(int index, const vector<int, std::allocator<int> >& interactingix, int external_orb, const OneElectronArray& onee, const PerturbTwoElectronArray& twoe, double thresh);
bool screen_ccd_d_interaction(int index, const vector<int, std::allocator<int> >& interactingix, int external_orb, const OneElectronArray& onee, const PerturbTwoElectronArray& twoe, double thresh);
}
#endif