Psi4
multipolesymmetry.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
29 #ifndef MULTIPOLESYMMETRY_H
30 #define MULTIPOLESYMMETRY_H
31 
32 #include <vector>
33 #include <string>
34 #include <map>
35 
36 namespace psi{
37 
38 class Molecule;
39 class IntegralFactory;
40 class MatrixFactory;
41 
43 {
44  // The order of the multipole (dipole=1, quadrupole=2, etc...)
45  int order_;
46 
47  // Variables we need from the user
48  std::shared_ptr<Molecule> molecule_;
49  std::shared_ptr<IntegralFactory> integral_;
50  std::shared_ptr<MatrixFactory> matrix_;
51 
56  std::vector<int> component_symmetry_;
57 
65  std::string form_suffix(int x, int y, int z);
66 
67  void common_init();
68 
69 public:
70  enum Operator {
71  Dipole = 1,
73 
74  L = -1,
76  P = Dipole,
78  };
79 
92  OperatorSymmetry(int order,
93  std::shared_ptr<Molecule> mol,
94  std::shared_ptr<IntegralFactory> ints,
95  std::shared_ptr<MatrixFactory> mats);
96  //OperatorSymmetry(int order,
97  // std::shared_ptr<Molecule> mol,
98  // std::shared_ptr<IntegralFactory> ints);
99  virtual ~OperatorSymmetry();
100 
101  std::string name_of_component(int i);
102  int component_symmetry(int i) const { return component_symmetry_[i]; }
103 
104  std::vector<SharedMatrix > create_matrices(const std::string& basename);
105 };
106 
108 {
109  // The order of the multipole (dipole=1, quadrupole=2, etc...)
110  int order_;
111 
112  // Variables we need from the user
113  std::shared_ptr<Molecule> molecule_;
114  std::shared_ptr<IntegralFactory> integral_;
115  std::shared_ptr<MatrixFactory> matrix_;
116 
121  std::vector<int> component_symmetry_;
122 
126  std::map< int, std::map< int, std::map< int, int > > > addresses_;
127 
128  void common_init();
129 
130 public:
131 
144  MultipoleSymmetry(int order,
145  std::shared_ptr<Molecule> mol,
146  std::shared_ptr<IntegralFactory> ints,
147  std::shared_ptr<MatrixFactory> mats);
148  //MultipoleSymmetry(int order,
149  // std::shared_ptr<Molecule> mol,
150  // std::shared_ptr<IntegralFactory> ints);
151  virtual ~MultipoleSymmetry();
152 
156  int address_of_component(int lx, int ly, int lz);
157  int component_symmetry(int i) const { return component_symmetry_[i]; }
158 
159  std::vector<SharedMatrix > create_matrices(const std::string& basename, bool ignore_symmetry=false);
160 };
161 }
162 
163 #endif // MULTIPOLESYMMETRY_H
std::shared_ptr< Molecule > molecule_
Definition: multipolesymmetry.h:113
virtual ~OperatorSymmetry()
Definition: multipolesymmetry.cc:126
std::shared_ptr< MatrixFactory > matrix_
Definition: multipolesymmetry.h:115
std::shared_ptr< MatrixFactory > matrix_
Definition: multipolesymmetry.h:50
OperatorSymmetry(int order, std::shared_ptr< Molecule > mol, std::shared_ptr< IntegralFactory > ints, std::shared_ptr< MatrixFactory > mats)
Definition: multipolesymmetry.cc:52
Definition: multipolesymmetry.h:72
Definition: multipolesymmetry.h:76
void common_init()
Definition: multipolesymmetry.cc:61
std::shared_ptr< Molecule > molecule_
Definition: multipolesymmetry.h:48
Operator
Definition: multipolesymmetry.h:70
Definition: pointgrp.h:106
int component_symmetry(int i) const
Definition: multipolesymmetry.h:157
std::vector< SharedMatrix > create_matrices(const std::string &basename)
Definition: multipolesymmetry.cc:161
MultipoleSymmetry(int order, std::shared_ptr< Molecule > mol, std::shared_ptr< IntegralFactory > ints, std::shared_ptr< MatrixFactory > mats)
Definition: multipolesymmetry.cc:185
std::vector< SharedMatrix > create_matrices(const std::string &basename, bool ignore_symmetry=false)
Definition: multipolesymmetry.cc:269
std::map< int, std::map< int, std::map< int, int > > > addresses_
Definition: multipolesymmetry.h:126
int component_symmetry(int i) const
Definition: multipolesymmetry.h:102
Definition: multipolesymmetry.h:71
Definition: multipolesymmetry.h:77
std::string name_of_component(int i)
Definition: multipolesymmetry.cc:155
std::shared_ptr< IntegralFactory > integral_
Definition: multipolesymmetry.h:49
Definition: multipolesymmetry.h:74
std::vector< int > component_symmetry_
Definition: multipolesymmetry.h:121
std::string form_suffix(int x, int y, int z)
Definition: multipolesymmetry.cc:130
std::shared_ptr< IntegralFactory > integral_
Definition: multipolesymmetry.h:114
Definition: multipolesymmetry.h:42
int order_
Definition: multipolesymmetry.h:45
void common_init()
Definition: multipolesymmetry.cc:209
std::vector< int > component_symmetry_
Definition: multipolesymmetry.h:56
Definition: multipolesymmetry.h:75
int order_
Definition: multipolesymmetry.h:110
Definition: multipolesymmetry.h:107
virtual ~MultipoleSymmetry()
Definition: multipolesymmetry.cc:263
int address_of_component(int lx, int ly, int lz)
Definition: multipolesymmetry.cc:194