Psi4
rohf.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 __rohf_psi_h__
29 #define __rohf_psi_h__
30 
31 #include <vector>
32 #include "psi4/libpsio/psio.hpp"
33 #include "hf.h"
34 
35 namespace psi { namespace scf {
36 
37 class ROHF : public HF {
38 protected:
52 
53  void form_initialF();
54  void form_initial_C();
55  void form_C();
56  void form_D();
57  double compute_initial_E();
58  double compute_E();
59  virtual bool stability_analysis();
61  void semicanonicalize();
62 
63  void form_G();
64  void form_F();
65 
66  virtual void compute_orbital_gradient(bool save_diis);
67  bool diis();
68 
69  bool test_convergency();
70 
71  void save_information();
72  // Finalize memory/files
73  virtual void finalize();
74 
76  void format_guess();
77 
78  // Second-order convergence code
79  void Hx(SharedMatrix x, SharedMatrix ret);
80  virtual int soscf_update(void);
81 
83  virtual void damp_update();
84 
85  void common_init();
86 public:
87  ROHF(SharedWavefunction ref_wfn, std::shared_ptr<SuperFunctional> functional);
88  ROHF(SharedWavefunction ref_wfn, std::shared_ptr<SuperFunctional> functional,
89  Options& options, std::shared_ptr<PSIO> psio);
90  virtual ~ROHF();
91 
92  SharedMatrix moFeff() const {return moFeff_; }
93  SharedMatrix moFa() const {return moFa_; }
94  SharedMatrix moFb() const {return moFb_; }
95 
96 };
97 
98 }}
99 
100 #endif
Options & options() const
Definition: wavefunction.cc:400
SharedMatrix Dt_old_
Definition: rohf.h:44
SharedMatrix moFa() const
Definition: rohf.h:93
std::shared_ptr< PSIO > psio() const
Definition: wavefunction.cc:395
double compute_initial_E()
Definition: rohf.cc:532
SharedMatrix Ka_
Definition: rohf.h:48
SharedMatrix Gb_
Definition: rohf.h:47
double compute_E()
Compute energy for the iteration.
Definition: rohf.cc:537
double ** scf
Definition: dx_write.cc:56
SharedMatrix moFa_
Definition: rohf.h:50
std::shared_ptr< SuperFunctional > functional() const
The DFT Functional object (or null if it has been deleted)
Definition: hf.h:239
virtual void finalize()
Definition: rohf.cc:254
SharedMatrix soFeff_
Definition: rohf.h:40
void Hx(SharedMatrix x, SharedMatrix ret)
Definition: rohf.cc:557
virtual void damp_update()
Definition: rohf.cc:851
SharedMatrix moFeff_
Definition: rohf.h:39
SharedMatrix Da_old_
Definition: rohf.h:42
SharedMatrix Kb_
Definition: rohf.h:49
void format_guess()
Definition: rohf.cc:107
bool diis()
Definition: rohf.cc:357
SharedMatrix Db_old_
Definition: rohf.h:43
bool test_convergency()
Definition: rohf.cc:362
SharedMatrix moFb() const
Definition: rohf.h:94
SharedMatrix moFeff() const
Definition: rohf.h:92
void form_initialF()
Definition: rohf.cc:374
SharedMatrix Ga_
Definition: rohf.h:46
virtual void compute_orbital_gradient(bool save_diis)
Definition: rohf.cc:313
virtual ~ROHF()
Definition: rohf.cc:71
Definition: liboptions.h:359
void form_G()
Definition: rohf.cc:1022
void semicanonicalize()
Definition: rohf.cc:121
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:50
void common_init()
Definition: rohf.cc:74
Definition: rohf.h:37
virtual bool stability_analysis()
Check the stability of the wavefunction, and correct (if requested)
Definition: rohf.cc:1058
Definition: hf.h:54
void save_information()
Definition: rohf.cc:309
void form_C()
Compute the MO coefficients (C_)
Definition: rohf.cc:454
void form_F()
Definition: rohf.cc:391
void save_density_and_energy()
Save the current density and energy.
Definition: rohf.cc:301
SharedMatrix Dt_
Definition: rohf.h:41
void form_D()
Computes the density matrix (D_)
Definition: rohf.cc:497
std::shared_ptr< Wavefunction > SharedWavefunction
Definition: typedefs.h:50
ROHF(SharedWavefunction ref_wfn, std::shared_ptr< SuperFunctional > functional)
Definition: rohf.cc:58
SharedMatrix moFb_
Definition: rohf.h:51
void form_initial_C()
Definition: rohf.cc:477
SharedMatrix Ct_
Definition: rohf.h:45
virtual void prepare_canonical_orthogonalization()
Edit matrices if we are doing canonical orthogonalization.
Definition: rohf.cc:468
virtual int soscf_update(void)
Definition: rohf.cc:861