Psi4
dpdmospace.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 
29 #ifndef DPD_MOSPACE_H
30 #define DPD_MOSPACE_H
31 
32 #include <vector>
33 #include <string>
35 
36 //Bad, no, don't do this...
37 //using namespace std;
38 
39 namespace psi {
40 
41 std::vector<std::string> dpd_split(const std::string &indices);
42 
43 class DPDMOSpace {
44  protected:
45  // name of the space
46  char label_;
47  // list of allowed orbital-index labels
48  std::vector<std::string> indices_;
49  // number of irreps
50  int nIrrep_;
51  // number of orbitals
52  int nOrb_;
53  // number of orbitals per irrep
54  std::vector<int> orbPI_;
55  // irrep of each orbital
56  std::vector<int> orbSym_;
57 
58  public:
59  DPDMOSpace(const char label, const std::string &indices, std::vector<int> orbspi);
60  DPDMOSpace(const char label, const std::string &indices, Dimension orbspi);
61  DPDMOSpace();
62  ~DPDMOSpace();
63 
64  char label() { return label_; }
65  std::vector<std::string> indices() { return indices_; }
66  int nIrrep() { return nIrrep_; }
67  int nOrb() { return nOrb_; }
68  std::vector<int> orbPI() { return orbPI_; }
69  std::vector<int> orbSym() { return orbSym_; }
70 
71  void print();
72  bool operator==(const char *c);
73  bool operator==(const std::string &c);
74  bool operator==(DPDMOSpace &lhs);
75  friend bool operator==(const char *c, const DPDMOSpace &rhs);
76  friend bool operator==(const std::string &c, const DPDMOSpace &rhs);
77  std::vector<std::string> overlap(DPDMOSpace &rhs);
78 };
79 
80 } // namespace psi
81 
82 #endif // DPD_MOSPACE_H
int nOrb()
Definition: dpdmospace.h:67
char label_
Definition: dpdmospace.h:46
Definition: dpdmospace.h:43
int nOrb_
Definition: dpdmospace.h:52
std::vector< int > orbPI()
Definition: dpdmospace.h:68
std::vector< std::string > dpd_split(const std::string &indices)
int nIrrep()
Definition: dpdmospace.h:66
std::vector< std::string > indices()
Definition: dpdmospace.h:65
char label()
Definition: dpdmospace.h:64
int nIrrep_
Definition: dpdmospace.h:50
bool operator==(const char *c)
Definition: dpdmospace.cc:70
std::vector< int > orbSym()
Definition: dpdmospace.h:69
std::vector< int > orbPI_
Definition: dpdmospace.h:54
void print()
Definition: dpdmospace.cc:114
Definition: dimension.h:39
~DPDMOSpace()
Definition: dpdmospace.cc:68
std::vector< int > orbSym_
Definition: dpdmospace.h:56
std::vector< std::string > overlap(DPDMOSpace &rhs)
Definition: dpdmospace.cc:131
indices
Definition: libdpd/dpd.h:245
std::vector< std::string > indices_
Definition: dpdmospace.h:48
DPDMOSpace()
Definition: dpdmospace.cc:63