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