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