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