21 static constexpr char const*
tag =
"cc2";
41 double thresh_operators=1.e-6;
42 initialize < std::string > (
"calc_type",
"mp2",
"the calculation type", {
"mp2",
"mp3",
"cc2",
"cis",
"lrcc2",
"cispd",
"adc2",
"test"});
43 initialize < double > (
"lo", 1.e-7,
"the finest length scale to be resolved by 6D operators");
44 initialize < double > (
"dmin", 1.0,
"defines the depth of the special level");
45 initialize < double > (
"thresh_6d",
thresh,
"threshold for the 6D wave function");
46 initialize < double > (
"tight_thresh_6d", 0.1*
thresh,
"tight threshold for the 6D wave function");
47 initialize < double > (
"thresh_3d", 0.01*
thresh,
"threshold for the 3D reference wave function");
48 initialize < double > (
"tight_thresh_3d", 0.001*
thresh,
"tight threshold for the 3D reference wave function");
49 initialize < double > (
"thresh_bsh_3d", thresh_operators,
"threshold for BSH operators");
50 initialize < double > (
"thresh_bsh_6d", thresh_operators,
"threshold for BSH operators");
51 initialize < double > (
"thresh_poisson", thresh_operators,
"threshold for Poisson operators");
52 initialize < double > (
"thresh_f12", thresh_operators,
"threshold for Poisson operators");
53 initialize < double > (
"thresh_Ue", thresh_operators,
"ue threshold");
54 initialize < double > (
"econv",
thresh,
"overal convergence threshold ");
55 initialize < double > (
"econv_pairs", 0.1*
thresh,
"convergence threshold for pairs");
56 initialize < double > (
"dconv_3d", 0.3*
thresh,
"convergence for cc singles");
57 initialize < double > (
"dconv_6d", 3.0*
thresh,
"convergence for cc doubles");
58 initialize < std::size_t > (
"iter_max", 10,
"max iterations");
59 initialize < std::size_t > (
"iter_max_3d", 10,
"max iterations for singles");
60 initialize < std::size_t > (
"iter_max_6d", 10,
"max iterations for doubles");
61 initialize < std::pair<int, int>> (
"only_pair", {-1, -1},
"compute only a single pair");
62 initialize < bool > (
"restart",
false,
"restart");
63 initialize < bool > (
"no_compute",
false,
"no compute");
64 initialize < bool > (
"no_compute_gs",
false,
"no compute");
65 initialize < bool > (
"no_compute_mp2_constantpart",
false,
"no compute");
66 initialize < bool > (
"no_compute_response",
false,
"no compute");
67 initialize < bool > (
"no_compute_mp2",
false,
"no compute");
68 initialize < bool > (
"no_compute_cc2",
false,
"no compute");
69 initialize < bool > (
"no_compute_cispd",
false,
"no compute");
70 initialize < bool > (
"no_compute_lrcc2",
false,
"no compute");
71 initialize < double > (
"corrfac_gamma", 1.0,
"exponent for the correlation factor");
72 initialize < std::size_t > (
"output_prec", 8,
"for formatted output");
73 initialize < bool > (
"debug",
false,
"");
74 initialize < bool > (
"plot",
false,
"");
75 initialize < bool > (
"kain",
true,
"");
76 initialize < std::size_t > (
"kain_subspace", 3,
"");
77 initialize < long > (
"freeze", -1,
"number of frozen orbitals: -1: automatic");
78 initialize < bool > (
"test",
false,
"");
80 initialize < bool > (
"decompose_Q",
true,
"always true",{
true});
84 initialize < bool > (
"QtAnsatz",
true,
"always true",{
true});
86 initialize < std::vector<size_t>>
87 (
"excitations", {},
"vector containing the excitations");
93 std::string value = get<std::string>(
"calc_type");
94 if (value ==
"mp2")
return CT_MP2;
95 if (value ==
"mp3")
return CT_MP3;
96 if (value ==
"cc2")
return CT_CC2;
98 if (value ==
"lrcc2")
return CT_LRCC2;
99 if (value ==
"cispd")
return CT_CISPD;
100 if (value ==
"adc2")
return CT_ADC2;
101 if (value ==
"test")
return CT_TEST;
106 double lo()
const {
return get<double>(
"lo"); }
108 double dmin()
const {
return get<double>(
"dmin"); }
110 double thresh_3D()
const {
return get<double>(
"thresh_3d"); }
114 double thresh_6D()
const {
return get<double>(
"thresh_6d"); }
124 double thresh_f12()
const {
return get<double>(
"thresh_f12"); }
126 double thresh_Ue()
const {
return get<double>(
"thresh_ue"); }
128 double econv()
const {
return get<double>(
"econv"); }
132 double dconv_3D()
const {
return get<double>(
"dconv_3d"); }
134 double dconv_6D()
const {
return get<double>(
"dconv_6d"); }
136 std::size_t
iter_max()
const {
return get<std::size_t>(
"iter_max"); }
138 std::size_t
iter_max_3D()
const {
return get<std::size_t>(
"iter_max_3d"); }
140 std::size_t
iter_max_6D()
const {
return get<std::size_t>(
"iter_max_6d"); }
142 std::pair<int, int>
only_pair()
const {
return get<std::pair<int, int>>(
"only_pair"); }
144 bool restart()
const {
return get<bool>(
"restart"); }
162 bool debug()
const {
return get<bool>(
"debug"); }
164 bool plot()
const {
return get<bool>(
"plot"); }
166 bool kain()
const {
return get<bool>(
"kain"); }
168 bool test()
const {
return get<bool>(
"test"); }
172 bool QtAnsatz()
const {
return get<bool>(
"qtansatz"); }
174 std::size_t
output_prec()
const {
return get<std::size_t>(
"output_prec"); }
176 std::size_t
kain_subspace()
const {
return get<std::size_t>(
"kain_subspace"); }
178 long freeze()
const {
return get<long>(
"freeze"); }
180 std::vector<std::size_t>
excitations()
const {
return get<std::vector<std::size_t>>(
"excitations"); }
182 double gamma()
const {
return get<double>(
"corrfac_gamma");}
191 if (world.
rank() == 0)
192 std::cout <<
"\n\n\n\n\n!!!!!!!!!\n\nERROR IN CC_PARAMETERS:\n ERROR MESSAGE IS: " << msg
193 <<
"\n\n\n!!!!!!!!" << std::endl;
198 if (world.
rank() == 0) std::cout <<
"WARNING IN CC_PARAMETERS!: " << msg << std::endl;
class for holding the parameters for calculation
Definition QCCalculationParametersBase.h:294
virtual void read_input_and_commandline_options(World &world, const commandlineparser &parser, const std::string tag)
Definition QCCalculationParametersBase.h:328
A parallel world class.
Definition world.h:132
ProcessID rank() const
Returns the process rank in this World (same as MPI_Comm_rank()).
Definition world.h:320
#define MADNESS_EXCEPTION(msg, value)
Macro for throwing a MADNESS exception.
Definition madness_exception.h:119
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
CalcType
Calculation Types used by CC2.
Definition CCParameters.h:14
@ CT_CC2
Definition CCParameters.h:15
@ CT_LRCC2
Definition CCParameters.h:15
@ CT_MP3
Definition CCParameters.h:15
@ CT_UNDEFINED
Definition CCParameters.h:15
@ CT_LRCCS
Definition CCParameters.h:15
@ CT_CISPD
Definition CCParameters.h:15
@ CT_TEST
Definition CCParameters.h:15
@ CT_MP2
Definition CCParameters.h:15
@ CT_ADC2
Definition CCParameters.h:15
@ CT_TDHF
Definition CCParameters.h:15
static const double thresh
Definition rk.cc:45
Definition CCParameters.h:20
double thresh_Ue() const
Definition CCParameters.h:126
double thresh_f12() const
Definition CCParameters.h:124
std::size_t kain_subspace() const
Definition CCParameters.h:176
double tight_thresh_6D() const
Definition CCParameters.h:116
std::size_t iter_max_3D() const
Definition CCParameters.h:138
bool no_compute_cispd() const
Definition CCParameters.h:158
CCParameters(World &world, const commandlineparser &parser)
ctor reading out the input file
Definition CCParameters.h:32
bool no_compute_mp2_constantpart() const
Definition CCParameters.h:150
std::pair< int, int > only_pair() const
Definition CCParameters.h:142
bool kain() const
Definition CCParameters.h:166
bool plot() const
Definition CCParameters.h:164
bool no_compute_response() const
Definition CCParameters.h:152
double thresh_poisson() const
Definition CCParameters.h:122
CCParameters()
Definition CCParameters.h:24
double thresh_bsh_3D() const
Definition CCParameters.h:118
bool no_compute_mp2() const
Definition CCParameters.h:154
double dconv_6D() const
Definition CCParameters.h:134
double econv_pairs() const
Definition CCParameters.h:130
void initialize_parameters()
Definition CCParameters.h:39
bool response() const
Definition CCParameters.h:105
bool decompose_Q() const
Definition CCParameters.h:170
double thresh_bsh_6D() const
Definition CCParameters.h:120
void error(World &world, const std::string &msg) const
Definition CCParameters.h:190
CCParameters(const CCParameters &other)=default
copy constructor
double gamma() const
Definition CCParameters.h:182
double thresh_3D() const
Definition CCParameters.h:110
double tight_thresh_3D() const
Definition CCParameters.h:112
bool no_compute() const
Definition CCParameters.h:146
double dconv_3D() const
Definition CCParameters.h:132
std::size_t iter_max() const
Definition CCParameters.h:136
double lo() const
Definition CCParameters.h:106
long freeze() const
Definition CCParameters.h:178
double thresh_6D() const
Definition CCParameters.h:114
bool no_compute_cc2() const
Definition CCParameters.h:156
std::vector< std::size_t > excitations() const
Definition CCParameters.h:180
void set_derived_values()
Definition CCStructures.cc:159
bool QtAnsatz() const
Definition CCParameters.h:172
bool test() const
Definition CCParameters.h:168
double dmin() const
Definition CCParameters.h:108
std::size_t output_prec() const
Definition CCParameters.h:174
bool restart() const
Definition CCParameters.h:144
double econv() const
Definition CCParameters.h:128
static constexpr char const * tag
Definition CCParameters.h:21
std::size_t iter_max_6D() const
Definition CCParameters.h:140
CalcType calc_type() const
Definition CCParameters.h:92
bool no_compute_gs() const
Definition CCParameters.h:148
bool debug() const
Definition CCParameters.h:162
void information(World &world) const
print out the parameters
Definition CCStructures.cc:191
bool no_compute_lrcc2() const
Definition CCParameters.h:160
size_t warning(World &world, const std::string &msg) const
Definition CCParameters.h:197
void sanity_check(World &world) const
check if parameters are set correct
Definition CCStructures.cc:202
very simple command line parser
Definition commandlineparser.h:15
Declares the World class for the parallel runtime environment.