Psi4
orbitalspace.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 _psi_src_lib_libmints_moindexspace_h_
30 #define _psi_src_lib_libmints_moindexspace_h_
31 
32 #include <string>
33 #include "typedefs.h"
35 
36 namespace psi {
37 class BasisSet;
38 class IntegralFactory;
39 
48 class OrbitalSpace {
50  std::string id_;
52  std::string name_;
55 
57  std::shared_ptr<Vector> evals_;
58 
60  std::shared_ptr<BasisSet> basis_;
62  std::shared_ptr<IntegralFactory> ints_;
63 
65  Dimension dim_; // dim_.n() better equal nirrep_
66 
68  OrbitalSpace();
69 
70  public:
71  OrbitalSpace(const std::string& id, const std::string& name, const SharedMatrix& full_C,
72  const std::shared_ptr<Vector>& evals, const std::shared_ptr<BasisSet>& basis,
73  const std::shared_ptr<IntegralFactory>& ints);
74 
75  OrbitalSpace(const std::string& id, const std::string& name, const SharedMatrix& full_C,
76  const std::shared_ptr<BasisSet>& basis, const std::shared_ptr<IntegralFactory>& ints);
77 
78  OrbitalSpace(const std::string& id, const std::string& name, const std::shared_ptr<Wavefunction>& wave);
79 
80  int nirrep() const;
81  const std::string& id() const;
82  const std::string& name() const;
83 
85  const SharedMatrix& C() const;
86 
88  const std::shared_ptr<Vector>& evals() const;
89 
91  const std::shared_ptr<BasisSet>& basisset() const;
92 
94  const std::shared_ptr<IntegralFactory>& integral() const;
95 
97  const Dimension& dim() const;
98 
100  void print() const;
101 
104  static OrbitalSpace transform(const OrbitalSpace& from, const std::shared_ptr<BasisSet>& to);
105 
111  static SharedMatrix overlap(const OrbitalSpace& space1, const OrbitalSpace& space2);
115  static SharedMatrix overlap(const std::shared_ptr<BasisSet>& basis1, const std::shared_ptr<BasisSet>& basis2);
116 
122  static OrbitalSpace build_cabs_space(const OrbitalSpace& orb_space, const OrbitalSpace& ri_space,
123  double linear_tol);
124 
132  static OrbitalSpace build_ri_space(const std::shared_ptr<Molecule>& molecule, const std::string& obs_key,
133  const std::string& aux_key, double lindep_tol);
134 
140  static OrbitalSpace build_abs_space(std::shared_ptr<BasisSet> aux_bs, std::shared_ptr<IntegralFactory> ints,
141  double lindep_tol);
142 };
143 
144 namespace SpaceBuilder {}
145 
146 } // namespace psi
147 
148 #endif // _psi_src_lib_libmints_moindexspace_h_
static OrbitalSpace build_abs_space(std::shared_ptr< BasisSet > aux_bs, std::shared_ptr< IntegralFactory > ints, double lindep_tol)
static OrbitalSpace transform(const OrbitalSpace &from, const std::shared_ptr< BasisSet > &to)
Definition: orbitalspace.cc:85
std::shared_ptr< BasisSet > basis
Definition: dx_write.cc:59
const std::shared_ptr< IntegralFactory > & integral() const
Integral factory used to create C.
Definition: orbitalspace.cc:81
const std::string & id() const
Definition: orbitalspace.cc:71
SharedMatrix C_
AO-&gt;MO transformation matrix (ao x mo) or SO-&gt;MO transformation matrix.
Definition: orbitalspace.h:54
int nirrep() const
Definition: orbitalspace.cc:69
const Dimension & dim() const
MO dimensionality.
Definition: orbitalspace.cc:83
void print() const
Print information about the orbital space.
Definition: orbitalspace.cc:158
OrbitalSpace()
No default constructor.
static OrbitalSpace build_cabs_space(const OrbitalSpace &orb_space, const OrbitalSpace &ri_space, double linear_tol)
Definition: orbitalspace.cc:262
const std::shared_ptr< BasisSet > & basisset() const
The AO basis set used to create C.
Definition: orbitalspace.cc:79
std::string id_
Unique identifier.
Definition: orbitalspace.h:50
const std::shared_ptr< Vector > & evals() const
&quot;Eigenvalues&quot; of the C matrix
Definition: orbitalspace.cc:77
Definition: dimension.h:40
std::shared_ptr< Molecule > molecule
Definition: dx_write.cc:58
Dimension dim_
MO Dimensionality.
Definition: orbitalspace.h:65
std::shared_ptr< BasisSet > basis_
AO basis set.
Definition: orbitalspace.h:60
const SharedMatrix & C() const
C - transformation matrix (AO x MO)
Definition: orbitalspace.cc:75
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
std::shared_ptr< Vector > evals_
MO &quot;eigenvalues&quot;.
Definition: orbitalspace.h:57
std::shared_ptr< IntegralFactory > ints_
Integral factory that as.
Definition: orbitalspace.h:62
const std::string & name() const
Definition: orbitalspace.cc:73
The OrbitalSpace class.
Definition: orbitalspace.h:48
std::string name_
Name of the orbital space.
Definition: orbitalspace.h:52
static SharedMatrix overlap(const OrbitalSpace &space1, const OrbitalSpace &space2)
Definition: orbitalspace.cc:127
static OrbitalSpace build_ri_space(const std::shared_ptr< Molecule > &molecule, const std::string &obs_key, const std::string &aux_key, double lindep_tol)
Definition: orbitalspace.cc:267