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