-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdump_ao_integrals.h
More file actions
40 lines (30 loc) · 1.06 KB
/
dump_ao_integrals.h
File metadata and controls
40 lines (30 loc) · 1.06 KB
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
#ifndef LIBRESPONSE_DUMP_AO_INTEGRALS_H_
#define LIBRESPONSE_DUMP_AO_INTEGRALS_H_
#include "operator_spec.h"
/*!
* @brief Write the contents of an Armadillo container (matrix, cube)
* to disk.
*/
template<typename T>
void dump_integrals(
const T& arma_integrals,
const std::string& integral_description,
const std::string& input_basename,
const std::string& integral_filename_ending) {
const std::string integral_filename = \
input_basename + "." + integral_filename_ending;
std::cout \
<< " Dumping " \
<< integral_description \
<< " integrals to file: " \
<< integral_filename \
<< std::endl;
const bool res = arma_integrals.save(integral_filename, arma::arma_ascii);
if (!res) {
std::cout << " Couldn't save integrals to file." << std::endl;
throw 1;
}
return;
}
void dump_ao_integrals(const std::vector<libresponse::operator_spec> &operators, const std::string &basename);
#endif // LIBRESPONSE_DUMP_AO_INTEGRALS_H_