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 "psi4/libmints/typedefs.h"
33 
34 #include <vector>
35 #include <string>
36 #include <map>
37 
38 namespace psi{
39 
40 class Molecule;
41 class IntegralFactory;
42 class MatrixFactory;
43 
45 {
46  // The order of the multipole (dipole=1, quadrupole=2, etc...)
47  int order_;
48 
49  // Variables we need from the user
50  std::shared_ptr<Molecule> molecule_;
51  std::shared_ptr<IntegralFactory> integral_;
52  std::shared_ptr<MatrixFactory> matrix_;
53 
58  std::vector<int> component_symmetry_;
59 
67  std::string form_suffix(int x, int y, int z);
68 
69  void common_init();
70 
71 public:
72  enum Operator {
73  Dipole = 1,
75 
76  L = -1,
78  P = Dipole,
80  };
81 
94  OperatorSymmetry(int order,
95  std::shared_ptr<Molecule> mol,
96  std::shared_ptr<IntegralFactory> ints,
97  std::shared_ptr<MatrixFactory> mats);
98  //OperatorSymmetry(int order,
99  // std::shared_ptr<Molecule> mol,
100  // std::shared_ptr<IntegralFactory> ints);
101  virtual ~OperatorSymmetry();
102 
103  std::string name_of_component(int i);
104  int component_symmetry(int i) const { return component_symmetry_[i]; }
105 
106  std::vector<SharedMatrix > create_matrices(const std::string& basename);
107 };
108 
110 {
111  // The order of the multipole (dipole=1, quadrupole=2, etc...)
112  int order_;
113 
114  // Variables we need from the user
115  std::shared_ptr<Molecule> molecule_;
116  std::shared_ptr<IntegralFactory> integral_;
117  std::shared_ptr<MatrixFactory> matrix_;
118 
123  std::vector<int> component_symmetry_;
124 
128  std::map< int, std::map< int, std::map< int, int > > > addresses_;
129 
130  void common_init();
131 
132 public:
133 
146  MultipoleSymmetry(int order,
147  std::shared_ptr<Molecule> mol,
148  std::shared_ptr<IntegralFactory> ints,
149  std::shared_ptr<MatrixFactory> mats);
150  //MultipoleSymmetry(int order,
151  // std::shared_ptr<Molecule> mol,
152  // std::shared_ptr<IntegralFactory> ints);
153  virtual ~MultipoleSymmetry();
154 
158  int address_of_component(int lx, int ly, int lz);
159  int component_symmetry(int i) const { return component_symmetry_[i]; }
160 
161  std::vector<SharedMatrix > create_matrices(const std::string& basename, bool ignore_symmetry=false);
162 };
163 }
164 
165 #endif // MULTIPOLESYMMETRY_H
std::shared_ptr< Molecule > molecule_
Definition: multipolesymmetry.h:115
virtual ~OperatorSymmetry()
Definition: multipolesymmetry.cc:125
std::shared_ptr< MatrixFactory > matrix_
Definition: multipolesymmetry.h:117
std::shared_ptr< MatrixFactory > matrix_
Definition: multipolesymmetry.h:52
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:74
Definition: multipolesymmetry.h:78
void common_init()
Definition: multipolesymmetry.cc:60
std::shared_ptr< Molecule > molecule_
Definition: multipolesymmetry.h:50
Operator
Definition: multipolesymmetry.h:72
std::string form_suffix(int x, int y, int z)
Definition: multipolesymmetry.cc:129
Definition: pointgrp.h:106
std::vector< SharedMatrix > create_matrices(const std::string &basename, bool ignore_symmetry=false)
Definition: multipolesymmetry.cc:268
int component_symmetry(int i) const
Definition: multipolesymmetry.h:159
MultipoleSymmetry(int order, std::shared_ptr< Molecule > mol, std::shared_ptr< IntegralFactory > ints, std::shared_ptr< MatrixFactory > mats)
Definition: multipolesymmetry.cc:184
std::map< int, std::map< int, std::map< int, int > > > addresses_
Definition: multipolesymmetry.h:128
int component_symmetry(int i) const
Definition: multipolesymmetry.h:104
Definition: multipolesymmetry.h:73
Definition: multipolesymmetry.h:79
std::shared_ptr< IntegralFactory > integral_
Definition: multipolesymmetry.h:51
Definition: multipolesymmetry.h:76
std::vector< int > component_symmetry_
Definition: multipolesymmetry.h:123
std::shared_ptr< IntegralFactory > integral_
Definition: multipolesymmetry.h:116
Definition: multipolesymmetry.h:44
std::vector< SharedMatrix > create_matrices(const std::string &basename)
Definition: multipolesymmetry.cc:160
int order_
Definition: multipolesymmetry.h:47
void common_init()
Definition: multipolesymmetry.cc:208
std::vector< int > component_symmetry_
Definition: multipolesymmetry.h:58
Definition: multipolesymmetry.h:77
int order_
Definition: multipolesymmetry.h:112
Definition: multipolesymmetry.h:109
virtual ~MultipoleSymmetry()
Definition: multipolesymmetry.cc:262
std::string name_of_component(int i)
Definition: multipolesymmetry.cc:154
int address_of_component(int lx, int ly, int lz)
Definition: multipolesymmetry.cc:193