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-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 __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 {
37 namespace scf {
38 
39 class ROHF : public HF {
40  protected:
54 
55  void form_initialF();
56  void form_initial_C();
57  double compute_initial_E();
59  void semicanonicalize();
60 
61  // Second-order convergence code
62  void Hx(SharedMatrix x, SharedMatrix ret);
63 
64  void format_guess();
65 
66  void common_init();
67 
68  public:
69  ROHF(SharedWavefunction ref_wfn, std::shared_ptr<SuperFunctional> functional);
70  ROHF(SharedWavefunction ref_wfn, std::shared_ptr<SuperFunctional> functional, Options& options,
71  std::shared_ptr<PSIO> psio);
72  virtual ~ROHF();
73 
74  SharedMatrix moFeff() const { return moFeff_; }
75  SharedMatrix moFa() const { return moFa_; }
76  SharedMatrix moFb() const { return moFb_; }
77 
78  bool diis();
80  double compute_orbital_gradient(bool save_diis, int max_diis_vectors);
81 
82  void form_C();
83  void form_D();
84  void form_F();
85  void form_G();
86  double compute_E();
87  void finalize();
88 
89  void damping_update(double);
90  int soscf_update(double soscf_conv, int soscf_min_iter, int soscf_max_iter, int soscf_print);
91  bool stability_analysis();
92 
93  std::shared_ptr<ROHF> c1_deep_copy(std::shared_ptr<BasisSet> basis);
94 };
95 } // namespace scf
96 } // namespace psi
97 
98 #endif
double compute_orbital_gradient(bool save_diis, int max_diis_vectors)
Definition: rohf.cc:305
std::shared_ptr< ROHF > c1_deep_copy(std::shared_ptr< BasisSet > basis)
Definition: rohf.cc:1300
Options & options() const
Definition: wavefunction.cc:572
SharedMatrix Dt_old_
Definition: rohf.h:46
SharedMatrix moFa() const
Definition: rohf.h:75
std::shared_ptr< PSIO > psio() const
Definition: wavefunction.cc:570
std::shared_ptr< BasisSet > basis
Definition: dx_write.cc:59
double compute_initial_E()
Definition: rohf.cc:502
SharedMatrix Ka_
Definition: rohf.h:50
SharedMatrix Gb_
Definition: rohf.h:49
double compute_E()
Compute energy for the iteration.
Definition: rohf.cc:504
double ** scf
Definition: dx_write.cc:57
SharedMatrix moFa_
Definition: rohf.h:52
std::shared_ptr< SuperFunctional > functional() const
The DFT Functional object (or null if it has been deleted)
Definition: hf.h:296
void finalize()
Definition: rohf.cc:253
SharedMatrix soFeff_
Definition: rohf.h:42
void Hx(SharedMatrix x, SharedMatrix ret)
Definition: rohf.cc:520
SharedMatrix moFeff_
Definition: rohf.h:41
SharedMatrix Da_old_
Definition: rohf.h:44
SharedMatrix Kb_
Definition: rohf.h:51
void format_guess()
Definition: rohf.cc:109
bool diis()
Definition: rohf.cc:347
void damping_update(double)
Definition: rohf.cc:784
SharedMatrix Db_old_
Definition: rohf.h:45
SharedMatrix moFb() const
Definition: rohf.h:76
int soscf_update(double soscf_conv, int soscf_min_iter, int soscf_max_iter, int soscf_print)
Definition: rohf.cc:793
SharedMatrix moFeff() const
Definition: rohf.h:74
void form_initialF()
Definition: rohf.cc:349
SharedMatrix Ga_
Definition: rohf.h:48
virtual ~ROHF()
Definition: rohf.cc:74
Definition: liboptions.h:353
void form_G()
Definition: rohf.cc:949
void semicanonicalize()
Definition: rohf.cc:122
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
void common_init()
Definition: rohf.cc:76
Definition: rohf.h:39
bool stability_analysis()
Check the stability of the wavefunction, and correct (if requested)
Definition: rohf.cc:982
Definition: hf.h:48
void form_C()
Compute the MO coefficients (C_)
Definition: rohf.cc:433
void form_F()
Definition: rohf.cc:365
void save_density_and_energy()
Save the current density and energy.
Definition: rohf.cc:299
SharedMatrix Dt_
Definition: rohf.h:43
void form_D()
Computes the density matrix (D_)
Definition: rohf.cc:472
std::shared_ptr< Wavefunction > SharedWavefunction
Definition: typedefs.h:54
ROHF(SharedWavefunction ref_wfn, std::shared_ptr< SuperFunctional > functional)
Definition: rohf.cc:63
SharedMatrix moFb_
Definition: rohf.h:53
void form_initial_C()
Definition: rohf.cc:454
SharedMatrix Ct_
Definition: rohf.h:47
virtual void prepare_canonical_orthogonalization()
Edit matrices if we are doing canonical orthogonalization.
Definition: rohf.cc:446