21 static constexpr char const*
tag =
"cc2";
38 return std::string(
tag);
44 double thresh_operators=1.e-6;
45 initialize < std::string > (
"calc_type",
"mp2",
"the calculation type", {
"mp2",
"mp3",
"cc2",
"cis",
"lrcc2",
"cispd",
"adc2",
"test"});
46 initialize < double > (
"lo", 1.e-7,
"the finest length scale to be resolved by 6D operators");
47 initialize < double > (
"dmin", 1.0,
"defines the depth of the special level");
48 initialize < double > (
"thresh_6d",
thresh,
"threshold for the 6D wave function");
49 initialize < double > (
"tight_thresh_6d", 0.1*
thresh,
"tight threshold for the 6D wave function");
50 initialize < double > (
"thresh_3d", 0.01*
thresh,
"threshold for the 3D reference wave function");
51 initialize < double > (
"tight_thresh_3d", 0.001*
thresh,
"tight threshold for the 3D reference wave function");
52 initialize < double > (
"thresh_bsh_3d", thresh_operators,
"threshold for BSH operators");
53 initialize < double > (
"thresh_bsh_6d", thresh_operators,
"threshold for BSH operators");
54 initialize < double > (
"thresh_poisson", thresh_operators,
"threshold for Poisson operators");
55 initialize < double > (
"thresh_f12", thresh_operators,
"threshold for Poisson operators");
56 initialize < double > (
"thresh_Ue", thresh_operators,
"ue threshold");
57 initialize < double > (
"econv",
thresh,
"overal convergence threshold ");
58 initialize < double > (
"econv_pairs", 0.1*
thresh,
"convergence threshold for pairs");
59 initialize < double > (
"dconv_3d", 0.3*
thresh,
"convergence for cc singles");
60 initialize < double > (
"dconv_6d", 3.0*
thresh,
"convergence for cc doubles");
61 initialize < std::size_t > (
"iter_max", 10,
"max iterations");
62 initialize < std::size_t > (
"iter_max_3d", 10,
"max iterations for singles");
63 initialize < std::size_t > (
"iter_max_6d", 10,
"max iterations for doubles");
64 initialize < std::pair<int, int>> (
"only_pair", {-1, -1},
"compute only a single pair");
65 initialize < bool > (
"restart",
false,
"restart");
66 initialize < bool > (
"no_compute",
false,
"no compute");
67 initialize < bool > (
"no_compute_gs",
false,
"no compute");
68 initialize < bool > (
"no_compute_mp2_constantpart",
false,
"no compute");
69 initialize < bool > (
"no_compute_response",
false,
"no compute");
70 initialize < bool > (
"no_compute_mp2",
false,
"no compute");
71 initialize < bool > (
"no_compute_cc2",
false,
"no compute");
72 initialize < bool > (
"no_compute_cispd",
false,
"no compute");
73 initialize < bool > (
"no_compute_lrcc2",
false,
"no compute");
74 initialize < double > (
"corrfac_gamma", 1.0,
"exponent for the correlation factor");
75 initialize < std::size_t > (
"output_prec", 8,
"for formatted output");
76 initialize < bool > (
"debug",
false,
"");
77 initialize < bool > (
"plot",
false,
"");
78 initialize < bool > (
"kain",
true,
"");
79 initialize < std::size_t > (
"kain_subspace", 3,
"");
80 initialize < long > (
"freeze", -1,
"number of frozen orbitals: -1: automatic");
81 initialize < bool > (
"test",
false,
"");
83 initialize < bool > (
"decompose_Q",
true,
"always true",{
true});
87 initialize < bool > (
"QtAnsatz",
true,
"always true",{
true});
89 initialize < std::vector<size_t>>
90 (
"excitations", {},
"vector containing the excitations");
96 std::string value = get<std::string>(
"calc_type");
97 if (value ==
"mp2")
return CT_MP2;
98 if (value ==
"mp3")
return CT_MP3;
99 if (value ==
"cc2")
return CT_CC2;
100 if (value ==
"cis")
return CT_LRCCS;
101 if (value ==
"lrcc2")
return CT_LRCC2;
102 if (value ==
"cispd")
return CT_CISPD;
103 if (value ==
"adc2")
return CT_ADC2;
104 if (value ==
"test")
return CT_TEST;
109 double lo()
const {
return get<double>(
"lo"); }
111 double dmin()
const {
return get<double>(
"dmin"); }
113 double thresh_3D()
const {
return get<double>(
"thresh_3d"); }
117 double thresh_6D()
const {
return get<double>(
"thresh_6d"); }
127 double thresh_f12()
const {
return get<double>(
"thresh_f12"); }
129 double thresh_Ue()
const {
return get<double>(
"thresh_ue"); }
131 double econv()
const {
return get<double>(
"econv"); }
135 double dconv_3D()
const {
return get<double>(
"dconv_3d"); }
137 double dconv_6D()
const {
return get<double>(
"dconv_6d"); }
139 std::size_t
iter_max()
const {
return get<std::size_t>(
"iter_max"); }
141 std::size_t
iter_max_3D()
const {
return get<std::size_t>(
"iter_max_3d"); }
143 std::size_t
iter_max_6D()
const {
return get<std::size_t>(
"iter_max_6d"); }
145 std::pair<int, int>
only_pair()
const {
return get<std::pair<int, int>>(
"only_pair"); }
147 bool restart()
const {
return get<bool>(
"restart"); }
165 bool debug()
const {
return get<bool>(
"debug"); }
167 bool plot()
const {
return get<bool>(
"plot"); }
169 bool kain()
const {
return get<bool>(
"kain"); }
171 bool test()
const {
return get<bool>(
"test"); }
175 bool QtAnsatz()
const {
return get<bool>(
"qtansatz"); }
177 std::size_t
output_prec()
const {
return get<std::size_t>(
"output_prec"); }
179 std::size_t
kain_subspace()
const {
return get<std::size_t>(
"kain_subspace"); }
181 long freeze()
const {
return get<long>(
"freeze"); }
183 std::vector<std::size_t>
excitations()
const {
return get<std::vector<std::size_t>>(
"excitations"); }
185 double gamma()
const {
return get<double>(
"corrfac_gamma");}
194 if (world.
rank() == 0)
195 std::cout <<
"\n\n\n\n\n!!!!!!!!!\n\nERROR IN CC_PARAMETERS:\n ERROR MESSAGE IS: " << msg
196 <<
"\n\n\n!!!!!!!!" << std::endl;
201 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:330
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:129
double thresh_f12() const
Definition CCParameters.h:127
std::size_t kain_subspace() const
Definition CCParameters.h:179
double tight_thresh_6D() const
Definition CCParameters.h:119
std::size_t iter_max_3D() const
Definition CCParameters.h:141
bool no_compute_cispd() const
Definition CCParameters.h:161
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:153
std::pair< int, int > only_pair() const
Definition CCParameters.h:145
bool kain() const
Definition CCParameters.h:169
bool plot() const
Definition CCParameters.h:167
bool no_compute_response() const
Definition CCParameters.h:155
double thresh_poisson() const
Definition CCParameters.h:125
std::string get_tag() const override
Definition CCParameters.h:37
CCParameters()
Definition CCParameters.h:24
double thresh_bsh_3D() const
Definition CCParameters.h:121
bool no_compute_mp2() const
Definition CCParameters.h:157
double dconv_6D() const
Definition CCParameters.h:137
double econv_pairs() const
Definition CCParameters.h:133
void initialize_parameters()
Definition CCParameters.h:42
bool response() const
Definition CCParameters.h:108
bool decompose_Q() const
Definition CCParameters.h:173
double thresh_bsh_6D() const
Definition CCParameters.h:123
void error(World &world, const std::string &msg) const
Definition CCParameters.h:193
CCParameters(const CCParameters &other)=default
copy constructor
double gamma() const
Definition CCParameters.h:185
double thresh_3D() const
Definition CCParameters.h:113
double tight_thresh_3D() const
Definition CCParameters.h:115
bool no_compute() const
Definition CCParameters.h:149
double dconv_3D() const
Definition CCParameters.h:135
std::size_t iter_max() const
Definition CCParameters.h:139
double lo() const
Definition CCParameters.h:109
long freeze() const
Definition CCParameters.h:181
double thresh_6D() const
Definition CCParameters.h:117
bool no_compute_cc2() const
Definition CCParameters.h:159
std::vector< std::size_t > excitations() const
Definition CCParameters.h:183
void set_derived_values()
Definition CCStructures.cc:159
bool QtAnsatz() const
Definition CCParameters.h:175
bool test() const
Definition CCParameters.h:171
double dmin() const
Definition CCParameters.h:111
std::size_t output_prec() const
Definition CCParameters.h:177
bool restart() const
Definition CCParameters.h:147
double econv() const
Definition CCParameters.h:131
static constexpr char const * tag
Definition CCParameters.h:21
std::size_t iter_max_6D() const
Definition CCParameters.h:143
CalcType calc_type() const
Definition CCParameters.h:95
bool no_compute_gs() const
Definition CCParameters.h:151
bool debug() const
Definition CCParameters.h:165
void information(World &world) const
print out the parameters
Definition CCStructures.cc:191
bool no_compute_lrcc2() const
Definition CCParameters.h:163
size_t warning(World &world, const std::string &msg) const
Definition CCParameters.h:200
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.