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 program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  *
25  * @END LICENSE
26  */
27 
28 #ifndef MULTIPOLESYMMETRY_H
29 #define MULTIPOLESYMMETRY_H
30 
31 #include <vector>
32 #include <string>
33 #include <map>
34 
35 namespace psi{
36 
37 class Molecule;
38 class IntegralFactory;
39 class MatrixFactory;
40 
42 {
43  // The order of the multipole (dipole=1, quadrupole=2, etc...)
44  int order_;
45 
46  // Variables we need from the user
47  std::shared_ptr<Molecule> molecule_;
48  std::shared_ptr<IntegralFactory> integral_;
49  std::shared_ptr<MatrixFactory> matrix_;
50 
55  std::vector<int> component_symmetry_;
56 
64  std::string form_suffix(int x, int y, int z);
65 
66  void common_init();
67 
68 public:
69  enum Operator {
70  Dipole = 1,
72 
73  L = -1,
75  P = Dipole,
77  };
78 
91  OperatorSymmetry(int order,
92  std::shared_ptr<Molecule> mol,
93  std::shared_ptr<IntegralFactory> ints,
94  std::shared_ptr<MatrixFactory> mats);
95  //OperatorSymmetry(int order,
96  // std::shared_ptr<Molecule> mol,
97  // std::shared_ptr<IntegralFactory> ints);
98  virtual ~OperatorSymmetry();
99 
100  std::string name_of_component(int i);
101  int component_symmetry(int i) const { return component_symmetry_[i]; }
102 
103  std::vector<SharedMatrix > create_matrices(const std::string& basename);
104 };
105 
107 {
108  // The order of the multipole (dipole=1, quadrupole=2, etc...)
109  int order_;
110 
111  // Variables we need from the user
112  std::shared_ptr<Molecule> molecule_;
113  std::shared_ptr<IntegralFactory> integral_;
114  std::shared_ptr<MatrixFactory> matrix_;
115 
120  std::vector<int> component_symmetry_;
121 
125  std::map< int, std::map< int, std::map< int, int > > > addresses_;
126 
127  void common_init();
128 
129 public:
130 
143  MultipoleSymmetry(int order,
144  std::shared_ptr<Molecule> mol,
145  std::shared_ptr<IntegralFactory> ints,
146  std::shared_ptr<MatrixFactory> mats);
147  //MultipoleSymmetry(int order,
148  // std::shared_ptr<Molecule> mol,
149  // std::shared_ptr<IntegralFactory> ints);
150  virtual ~MultipoleSymmetry();
151 
155  int address_of_component(int lx, int ly, int lz);
156  int component_symmetry(int i) const { return component_symmetry_[i]; }
157 
158  std::vector<SharedMatrix > create_matrices(const std::string& basename, bool ignore_symmetry=false);
159 };
160 }
161 
162 #endif // MULTIPOLESYMMETRY_H
std::shared_ptr< Molecule > molecule_
Definition: multipolesymmetry.h:112
virtual ~OperatorSymmetry()
Definition: multipolesymmetry.cc:125
std::shared_ptr< MatrixFactory > matrix_
Definition: multipolesymmetry.h:114
std::shared_ptr< MatrixFactory > matrix_
Definition: multipolesymmetry.h:49
OperatorSymmetry(int order, std::shared_ptr< Molecule > mol, std::shared_ptr< IntegralFactory > ints, std::shared_ptr< MatrixFactory > mats)
Definition: multipolesymmetry.cc:51
Definition: multipolesymmetry.h:71
Definition: multipolesymmetry.h:75
void common_init()
Definition: multipolesymmetry.cc:60
std::shared_ptr< Molecule > molecule_
Definition: multipolesymmetry.h:47
Operator
Definition: multipolesymmetry.h:69
Definition: pointgrp.h:105
int component_symmetry(int i) const
Definition: multipolesymmetry.h:156
std::vector< SharedMatrix > create_matrices(const std::string &basename)
Definition: multipolesymmetry.cc:160
MultipoleSymmetry(int order, std::shared_ptr< Molecule > mol, std::shared_ptr< IntegralFactory > ints, std::shared_ptr< MatrixFactory > mats)
Definition: multipolesymmetry.cc:184
std::vector< SharedMatrix > create_matrices(const std::string &basename, bool ignore_symmetry=false)
Definition: multipolesymmetry.cc:268
std::map< int, std::map< int, std::map< int, int > > > addresses_
Definition: multipolesymmetry.h:125
int component_symmetry(int i) const
Definition: multipolesymmetry.h:101
Definition: multipolesymmetry.h:70
Definition: multipolesymmetry.h:76
std::string name_of_component(int i)
Definition: multipolesymmetry.cc:154
std::shared_ptr< IntegralFactory > integral_
Definition: multipolesymmetry.h:48
Definition: multipolesymmetry.h:73
std::vector< int > component_symmetry_
Definition: multipolesymmetry.h:120
std::string form_suffix(int x, int y, int z)
Definition: multipolesymmetry.cc:129
std::shared_ptr< IntegralFactory > integral_
Definition: multipolesymmetry.h:113
Definition: multipolesymmetry.h:41
int order_
Definition: multipolesymmetry.h:44
void common_init()
Definition: multipolesymmetry.cc:208
std::vector< int > component_symmetry_
Definition: multipolesymmetry.h:55
Definition: multipolesymmetry.h:74
int order_
Definition: multipolesymmetry.h:109
Definition: multipolesymmetry.h:106
virtual ~MultipoleSymmetry()
Definition: multipolesymmetry.cc:262
int address_of_component(int lx, int ly, int lz)
Definition: multipolesymmetry.cc:193