Psi4
sad.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 #ifndef LIBSCF_SAD_H
29 #define LIBSCF_SAD_H
30 
31 namespace psi {
32 
33 class BasisSet;
34 class Molecule;
35 class Matrix;
36 
37 namespace scf {
38 
39 class SADGuess {
40 
41 protected:
42 
43  int print_;
44  int debug_;
45 
46  std::shared_ptr<Molecule> molecule_;
47  std::shared_ptr<BasisSet> basis_;
48  std::vector<std::shared_ptr<BasisSet>> atomic_bases_;
49  std::vector<std::shared_ptr<BasisSet>> atomic_fit_bases_;
51 
52  int nalpha_;
53  int nbeta_;
54 
56 
61 
62  void common_init();
63 
65  void form_gradient(int norbs, SharedMatrix grad, SharedMatrix F, SharedMatrix D,
67  void get_uhf_atomic_density(std::shared_ptr<BasisSet> atomic_basis, std::shared_ptr<BasisSet> fit_basis,
68  int n_electrons, int multiplicity, SharedMatrix D);
69  void form_C_and_D(int nocc, int norbs, SharedMatrix X, SharedMatrix F,
71  SharedMatrix D);
72 
73  void form_D();
74  void form_C();
75 
76 public:
77  SADGuess(std::shared_ptr<BasisSet> basis,
78  std::vector<std::shared_ptr<BasisSet>> atomic_bases, int nalpha,
79  int nbeta, Options& options);
80  virtual ~SADGuess();
81 
82  void compute_guess();
83 
84  SharedMatrix Da() const { return Da_; }
85  SharedMatrix Db() const { return Db_; }
86  SharedMatrix Ca() const { return Ca_; }
87  SharedMatrix Cb() const { return Cb_; }
88 
89  void set_atomic_fit_bases(std::vector<std::shared_ptr<BasisSet>> fit_bases) { atomic_fit_bases_ = fit_bases; }
90  void set_print(int print) { print_ = print; }
91  void set_debug(int debug) { debug_ = debug; }
92 
93 };
94 
95 }}
96 
97 #endif
void form_gradient(int norbs, SharedMatrix grad, SharedMatrix F, SharedMatrix D, SharedMatrix S, SharedMatrix X)
Definition: sad.cc:591
std::vector< std::shared_ptr< BasisSet > > atomic_fit_bases_
Definition: sad.h:49
void set_atomic_fit_bases(std::vector< std::shared_ptr< BasisSet >> fit_bases)
Definition: sad.h:89
void form_C()
Definition: sad.cc:138
void set_debug(int debug)
Definition: sad.h:91
SharedMatrix Db_
Definition: sad.h:58
std::shared_ptr< BasisSet > basis
Definition: dx_write.cc:58
int nbeta_
Definition: sad.h:53
void compute_guess()
Definition: sad.cc:86
double ** scf
Definition: dx_write.cc:56
std::shared_ptr< Molecule > molecule_
Definition: sad.h:46
virtual ~SADGuess()
Definition: sad.cc:72
void set_print(int print)
Definition: sad.h:90
int nalpha_
Definition: sad.h:52
SharedMatrix Ca() const
Definition: sad.h:86
void common_init()
Definition: sad.cc:73
SharedMatrix Ca_
Definition: sad.h:59
SharedMatrix form_D_AO()
Definition: sad.cc:156
Definition: sad.h:39
Options & options_
Definition: sad.h:55
Definition: liboptions.h:359
SharedMatrix AO2SO_
Definition: sad.h:50
std::shared_ptr< BasisSet > basis_
Definition: sad.h:47
SharedMatrix Cb_
Definition: sad.h:60
SharedMatrix Cb() const
Definition: sad.h:87
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:50
SharedMatrix Da() const
Definition: sad.h:84
void get_uhf_atomic_density(std::shared_ptr< BasisSet > atomic_basis, std::shared_ptr< BasisSet > fit_basis, int n_electrons, int multiplicity, SharedMatrix D)
Definition: sad.cc:296
SharedMatrix Db() const
Definition: sad.h:85
void form_C_and_D(int nocc, int norbs, SharedMatrix X, SharedMatrix F, SharedMatrix C, SharedMatrix Cocc, SharedVector occ, SharedMatrix D)
Definition: sad.cc:618
std::vector< std::shared_ptr< BasisSet > > atomic_bases_
Definition: sad.h:48
SADGuess(std::shared_ptr< BasisSet > basis, std::vector< std::shared_ptr< BasisSet >> atomic_bases, int nalpha, int nbeta, Options &options)
Definition: sad.cc:65
void form_D()
Definition: sad.cc:94
int print_
Definition: sad.h:43
int debug_
Definition: sad.h:44
SharedMatrix Da_
Definition: sad.h:57
std::shared_ptr< Vector > SharedVector
Definition: adc.h:52