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