61 #ifndef SRC_APPS_CHEM_POINTGROUPSYMMETRY_H_
62 #define SRC_APPS_CHEM_POINTGROUPSYMMETRY_H_
69 template<
typename T, std::
size_t NDIM>
81 std::map<std::string,characterlineT>
irreps_;
108 std::transform(pointgroup.begin(), pointgroup.end(), pointgroup.begin(), ::tolower);
115 if (world.
rank()==0) {
130 std::transform(irrep.begin(), irrep.end(), irrep.begin(), ::tolower);
135 print(
"irrep",irrep);
180 print(
"projector_irrep: ordering parameter unknown: ",o);
193 template<
typename T, std::
size_t NDIM>
196 std::vector<Function<T,NDIM> > vrhs;
205 template<
typename T, std::
size_t NDIM>
210 std::vector<std::string> sirrep;
217 template<
typename T, std::
size_t NDIM>
222 std::vector<std::string> sirrep;
229 template<
typename T, std::
size_t NDIM>
233 std::vector<std::string>& sirreps)
const {
241 template<
typename T, std::
size_t NDIM>
244 std::vector<std::string>& sirreps)
const {
253 template<
typename T, std::
size_t NDIM>
257 std::vector<std::string>& sirreps) {
259 std::vector<Function<T,NDIM> > vrhs(1,rhs);
267 template<
typename T, std::
size_t NDIM>
270 std::vector<std::string>& sirreps) {
272 std::vector<Function<T,NDIM> > vrhs(1,rhs);
283 printf(
" %5s ",
op.symbol().c_str());
287 printf(
" %5s ",mullikan.c_str());
288 std::vector<int> characters=
table_.
irreps_.find(mullikan)->second;
289 for (
auto& character : characters) {
290 printf(
" %5i ",character);
301 template<
typename T, std::
size_t NDIM>
303 const std::vector<std::string>& irreps)
const;
309 std::vector<std::string>
reduce(
const std::vector<std::string> reps)
const;
312 std::vector<std::string>
reduce(
const std::string irrep1,
const std::string irrep2)
const {
313 return reduce(vector_factory<std::string>(irrep1,irrep2));
317 std::vector<std::string>
reduce(
const std::string irrep1,
const std::string irrep2,
318 const std::string irrep3)
const {
319 return reduce(vector_factory<std::string>(irrep1,irrep2,irrep3));
323 std::vector<std::string>
reduce(
const std::string irrep1,
const std::string irrep2,
324 const std::string irrep3,
const std::string irrep4)
const {
325 return reduce(vector_factory<std::string>(irrep1,irrep2,irrep3,irrep4));
332 std::map<std::string,std::vector<int> >
m;
333 for (
size_t i=0; i<sirreps.size(); ++i)
m[sirreps[i]].push_back(i);
336 std::vector<int> map;
338 map.insert(end(map), begin(
m[irrep]), end(
m[irrep]));
345 static std::vector<R>
resort(
const std::vector<int> map,
346 const std::vector<R>& vrhs) {
348 std::vector<R> result(vrhs.size());
349 for (
size_t i=0; i<map.size(); ++i) result[i]=vrhs[map[i]];
356 const std::vector<R>& vrhs) {
358 std::vector<R> result(vrhs.size());
359 for (
int i=0; i<map.size(); ++i) result[map[i]]=vrhs[i];
402 std::transform(pointgroup.begin(), pointgroup.end(), pointgroup.begin(), ::tolower);
428 template<
typename T, std::
size_t NDIM>
432 std::vector<std::string>& sirreps)
const;
435 template<
typename T, std::
size_t NDIM>
437 std::vector<std::string>& sirreps)
const {
This header should include pretty much everything needed for the parallel runtime.
A multiresolution adaptive numerical function.
Definition: mra.h:122
TensorTypeData< T >::scalar_type scalar_type
C++ typename of the real type associated with a complex type.
Definition: tensor.h:409
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:318
Definition: pointgroupsymmetry.h:98
const charactertable get_table(std::string pointgroup)
return the character table according to the requested point group
Definition: pointgroupsymmetry.h:400
std::vector< Function< T, NDIM > > operator()(const std::vector< Function< T, NDIM > > &vrhs, const Function< typename Tensor< T >::scalar_type, NDIM > &metric, std::vector< std::string > &sirreps) const
projector on a given irrep
Definition: pointgroupsymmetry.h:230
projector_irrep & set_orthonormalize_irreps(bool flag)
get the verbosity level
Definition: pointgroupsymmetry.h:161
int get_verbosity() const
get the verbosity level
Definition: pointgroupsymmetry.h:158
projector_irrep()=default
default ctor
bool get_orthonormalize_irreps() const
get the verbosity level
Definition: pointgroupsymmetry.h:167
charactertable make_d2h_table() const
Definition: pointgroupsymmetry.cc:470
void print_info(World &world) const
print the parameters of this projector
Definition: pointgroupsymmetry.h:114
charactertable make_cs_table() const
Definition: pointgroupsymmetry.cc:384
std::string irrep_
choose one of the irreps or "all"
Definition: pointgroupsymmetry.h:368
double lindep_
linear dependency threshold for the orthogonalization
Definition: pointgroupsymmetry.h:371
charactertable make_c1_table() const
Definition: pointgroupsymmetry.cc:374
charactertable table_
Definition: pointgroupsymmetry.h:365
std::vector< int > get_canonical_to_irrep_map(std::vector< std::string > sirreps) const
get a mapping canonical to irrep-sorting
Definition: pointgroupsymmetry.h:329
bool orthonormalize_irreps_
orthonormalize within the irreps or simply discard linear dependent vectors
Definition: pointgroupsymmetry.h:380
std::vector< Function< T, NDIM > > sort_to_irreps(std::vector< Function< T, NDIM > > &vrhs, std::vector< std::string > &sirreps) const
sort the functions according to their irreps
Definition: pointgroupsymmetry.h:436
std::vector< std::string > reduce(const std::string irrep1, const std::string irrep2) const
reduce a product of two irreps
Definition: pointgroupsymmetry.h:312
charactertable make_c2h_table() const
Definition: pointgroupsymmetry.cc:438
projector_irrep & set_lindep(const double ld)
set the linear dependency threshold
Definition: pointgroupsymmetry.h:146
static std::vector< R > resort(const std::vector< int > map, const std::vector< R > &vrhs)
given a mapping resort
Definition: pointgroupsymmetry.h:345
std::vector< std::string > get_all_irreps() const
Definition: pointgroupsymmetry.h:186
std::vector< Function< T, NDIM > > operator()(const std::vector< Function< T, NDIM > > &vrhs) const
projector on a given irrep
Definition: pointgroupsymmetry.h:206
std::vector< Function< T, NDIM > > create_symmetry_adapted_basis(const Function< T, NDIM > &rhs, std::vector< std::string > &sirreps)
create a symmetry-adapted basis from a single function
Definition: pointgroupsymmetry.h:268
std::vector< Function< T, NDIM > > create_symmetry_adapted_basis(const Function< T, NDIM > &rhs, const Function< typename Tensor< T >::scalar_type, NDIM > &metric, std::vector< std::string > &sirreps)
create a symmetry-adapted basis from a single function
Definition: pointgroupsymmetry.h:254
std::vector< std::string > reduce(const std::string irrep1, const std::string irrep2, const std::string irrep3) const
reduce a product of three irreps
Definition: pointgroupsymmetry.h:317
charactertable make_d2_table() const
Definition: pointgroupsymmetry.cc:454
charactertable make_c2_table() const
Definition: pointgroupsymmetry.cc:409
std::vector< Function< T, NDIM > > apply_symmetry_operators(const std::vector< Function< T, NDIM > > &vrhs, Function< typename Tensor< T >::scalar_type, NDIM > metric, std::vector< std::string > &sirreps) const
symmetrize a vector of functions
Definition: pointgroupsymmetry.cc:107
std::vector< Function< T, NDIM > > project_on_irreps(const std::vector< Function< T, NDIM > > &vhrs, const std::vector< std::string > &irreps) const
(re-)project the argument on the given irreps
Definition: pointgroupsymmetry.cc:56
void print_character_table() const
print the character table
Definition: pointgroupsymmetry.h:279
bool keep_ordering_
after projection: result functions being ordered according to irreps or ordering unchanged
Definition: pointgroupsymmetry.h:377
std::vector< Function< T, NDIM > > operator()(const Function< T, NDIM > &rhs) const
projector on a given irrep
Definition: pointgroupsymmetry.h:194
std::vector< Function< T, NDIM > > operator()(const std::vector< Function< T, NDIM > > &vrhs, const Function< typename Tensor< T >::scalar_type, NDIM > &metric) const
projector on a given irrep
Definition: pointgroupsymmetry.h:218
projector_irrep(std::string pointgroup, std::string irrep="all")
ctor takes the point group and the optionally the irrep
Definition: pointgroupsymmetry.h:106
std::vector< std::string > reduce(const std::string irrep1, const std::string irrep2, const std::string irrep3, const std::string irrep4) const
reduce a product of four irreps
Definition: pointgroupsymmetry.h:323
charactertable get_table() const
return the character table
Definition: pointgroupsymmetry.h:173
static std::vector< R > reverse_resort(const std::vector< int > map, const std::vector< R > &vrhs)
given a mapping resort
Definition: pointgroupsymmetry.h:355
std::vector< Function< T, NDIM > > operator()(const std::vector< Function< T, NDIM > > &vrhs, std::vector< std::string > &sirreps) const
projector on a given irrep
Definition: pointgroupsymmetry.h:242
charactertable make_c2v_table() const
Definition: pointgroupsymmetry.cc:421
std::vector< std::string > reduce(const std::vector< std::string > reps) const
reduce a reducible representation
Definition: pointgroupsymmetry.cc:320
std::string get_pointgroup() const
get the point group name
Definition: pointgroupsymmetry.h:170
projector_irrep & set_verbosity(int v)
set the verbosity level
Definition: pointgroupsymmetry.h:152
projector_irrep & set_irrep(std::string irrep)
set the irrep on which this projector projects
Definition: pointgroupsymmetry.h:129
int verbosity_
verbosity level
Definition: pointgroupsymmetry.h:374
projector_irrep & set_ordering(const std::string o)
set the ordering after symmetrization: irreps or keep as is
Definition: pointgroupsymmetry.h:176
charactertable make_ci_table() const
Definition: pointgroupsymmetry.cc:397
std::vector< Fcwf > transform(World &world, std::vector< Fcwf > &a, Tensor< std::complex< double >> U)
Definition: fcwf.cc:477
const double m
Definition: gfit.cc:199
static const double v
Definition: hatom_sf_dirac.cc:20
Tensor< double > op(const Tensor< double > &x)
Definition: kain.cc:508
#define MADNESS_EXCEPTION(msg, value)
Macro for throwing a MADNESS exception.
Definition: madness_exception.h:119
#define MADNESS_ASSERT(condition)
Assert a condition that should be free of side-effects since in release builds this might be a no-op.
Definition: madness_exception.h:134
File holds all helper structures necessary for the CC_Operator and CC2 class.
Definition: DFParameters.h:10
void print(const T &t, const Ts &... ts)
Print items to std::cout (items separated by spaces) and terminate with a new line.
Definition: print.h:225
implements point group operations
Definition: pointgroupsymmetry.h:76
std::vector< std::string > mullikan_
Mullikan symbols of the irreps.
Definition: pointgroupsymmetry.h:83
std::vector< int > characterlineT
Definition: pointgroupsymmetry.h:77
std::vector< pg_operator > operators_
symmetry operators
Definition: pointgroupsymmetry.h:82
std::map< std::string, characterlineT > irreps_
Definition: pointgroupsymmetry.h:81
int order_
order of the point group
Definition: pointgroupsymmetry.h:80
std::string schoenflies_
Schoenflies symbol of the point group.
Definition: pointgroupsymmetry.h:79
bool is_abelian
currently always true
Definition: pointgroupsymmetry.h:84
static const std::size_t NDIM
Definition: testpdiff.cc:42