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-2018 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 #include "psi4/pragma.h"
34 
35 #include <vector>
36 #include <string>
37 #include <map>
38 
39 namespace psi {
40 
41 class Molecule;
42 class IntegralFactory;
43 class MatrixFactory;
44 
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,
74  Quadrupole = 2,
75 
76  L = -1,
77  AngularMomentum = -1,
78  P = Dipole,
79  Nabla = Dipole
80  };
81 
94  OperatorSymmetry(int order, std::shared_ptr<Molecule> mol, 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  // 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:
142  MultipoleSymmetry(int order, std::shared_ptr<Molecule> mol, std::shared_ptr<IntegralFactory> ints,
143  std::shared_ptr<MatrixFactory> mats);
144  // MultipoleSymmetry(int order,
145  // std::shared_ptr<Molecule> mol,
146  // std::shared_ptr<IntegralFactory> ints);
147  virtual ~MultipoleSymmetry();
148 
152  int address_of_component(int lx, int ly, int lz);
153  int component_symmetry(int i) const { return component_symmetry_[i]; }
154 
155  std::vector<SharedMatrix> create_matrices(const std::string& basename, bool ignore_symmetry = false);
156 };
157 } // namespace psi
158 
159 #endif // MULTIPOLESYMMETRY_H
std::shared_ptr< Molecule > molecule_
Definition: multipolesymmetry.h:112
std::shared_ptr< MatrixFactory > matrix_
Definition: multipolesymmetry.h:114
std::shared_ptr< MatrixFactory > matrix_
Definition: multipolesymmetry.h:52
std::shared_ptr< Molecule > molecule_
Definition: multipolesymmetry.h:50
Operator
Definition: multipolesymmetry.h:72
Definition: pointgrp.h:104
std::vector< SharedMatrix > create_matrices(const std::string &basename, bool ignore_symmetry=false)
Definition: multipolesymmetry.cc:243
int component_symmetry(int i) const
Definition: multipolesymmetry.h:153
MultipoleSymmetry(int order, std::shared_ptr< Molecule > mol, std::shared_ptr< IntegralFactory > ints, std::shared_ptr< MatrixFactory > mats)
Definition: multipolesymmetry.cc:167
int component_symmetry(int i) const
Definition: multipolesymmetry.h:102
std::map< int, std::map< int, std::map< int, int > > > addresses_
Definition: multipolesymmetry.h:125
std::shared_ptr< IntegralFactory > integral_
Definition: multipolesymmetry.h:51
#define PSI_API
Definition: pragma.h:155
std::vector< int > component_symmetry_
Definition: multipolesymmetry.h:120
std::shared_ptr< IntegralFactory > integral_
Definition: multipolesymmetry.h:113
Definition: multipolesymmetry.h:45
int order_
Definition: multipolesymmetry.h:47
void common_init()
Definition: multipolesymmetry.cc:189
std::vector< int > component_symmetry_
Definition: multipolesymmetry.h:58
int order_
Definition: multipolesymmetry.h:109
Definition: multipolesymmetry.h:107
virtual ~MultipoleSymmetry()
Definition: multipolesymmetry.cc:241
int address_of_component(int lx, int ly, int lz)
Definition: multipolesymmetry.cc:173