15 #ifndef QMCPLUSPLUS_CI_CONFIGURATION_H 16 #define QMCPLUSPLUS_CI_CONFIGURATION_H 45 APP_ABORT(
"ci_configuration::operator==() - ci_configurations are not compatible.");
50 for (
int i = 0; i <
occup.size(); i++)
52 app_log() << std::endl <<
"c1: ";
53 for (
int i = 0; i < c.
occup.size(); i++)
57 "ci_configuration::operator==() - ci_configurations are not compatible. Unequal number of occupied states. ");
59 for (
int i = 0; i <
occup.size(); i++)
76 APP_ABORT(
"ci_configuration::isSingle() - ci_configurations are not compatible.");
81 "ci_configuration::isSingle() - ci_configurations are not compatible. Unequal number of occupied states. ");
83 int nr = 0, na = 0, r = -1, a = -1;
84 for (
int i = 0; i <
occup.size(); i++)
100 if (na == 1 && nr == 1)
113 for (
int i = 0; i <
occup.size(); i++)
121 int str_size = str.size();
122 occup.resize(str_size);
123 for (
int i = 0; i < str_size; i++)
124 occup[i] = str[i] -
'0';
130 out <<
"ci ci_configuration: ";
131 for (
int i = 0; i < c.
occup.size(); i++)
void add_occupation(std::string &str)
helper functions for EinsplineSetBuilder
std::vector< bool > occup
bool operator==(const ci_configuration &c) const
std::ostream & operator<<(std::ostream &out, const AntiSymTensor< T, D > &rhs)
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
void add(int n, const T *restrict in, T *restrict out)
ci_configuration(const ci_configuration &c)
bool isSingle(const ci_configuration &c, int &rem, int &add) const
ci_configuration(std::vector< bool > &v, int n)