MPQC 2.3.1
hsosscf.h
1//
2// hsosscf.h --- definition of the high-spin open shell SCF class
3//
4// Copyright (C) 1996 Limit Point Systems, Inc.
5//
6// Author: Edward Seidl <seidl@janed.com>
7// Maintainer: LPS
8//
9// This file is part of the SC Toolkit.
10//
11// The SC Toolkit is free software; you can redistribute it and/or modify
12// it under the terms of the GNU Library General Public License as published by
13// the Free Software Foundation; either version 2, or (at your option)
14// any later version.
15//
16// The SC Toolkit 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 Library General Public License for more details.
20//
21// You should have received a copy of the GNU Library General Public License
22// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24//
25// The U.S. Government is granted a limited license as per AL 91-7.
26//
27
28#ifndef _chemistry_qc_scf_hsosscf_h
29#define _chemistry_qc_scf_hsosscf_h
30
31#ifdef __GNUC__
32#pragma interface
33#endif
34
35#include <chemistry/qc/scf/scf.h>
36
37namespace sc {
38
39// //////////////////////////////////////////////////////////////////////////
40
43class HSOSSCF: public SCF {
44 protected:
45 Ref<PointGroup> most_recent_pg_;
46 int user_occupations_;
47 int tndocc_;
48 int tnsocc_;
49 int nirrep_;
50 int *initial_ndocc_;
51 int *initial_nsocc_;
52 int *ndocc_;
53 int *nsocc_;
54
55 ResultRefSymmSCMatrix cl_fock_;
56 ResultRefSymmSCMatrix op_fock_;
57
58 public:
104 ~HSOSSCF();
105
107
108 void print(std::ostream&o=ExEnv::out0()) const;
109
110 double occupation(int irrep, int vectornum);
111 double alpha_occupation(int irrep, int vectornum);
112 double beta_occupation(int irrep, int vectornum);
113
114 int n_fock_matrices() const;
122
124
125 // returns 1
130
131 protected:
132 // these are temporary data, so they should not be checkpointed
133 RefSymmSCMatrix cl_dens_;
134 RefSymmSCMatrix cl_dens_diff_;
135 RefSymmSCMatrix cl_gmat_;
136 RefSymmSCMatrix op_dens_;
137 RefSymmSCMatrix op_dens_diff_;
138 RefSymmSCMatrix op_gmat_;
139
140 RefSymmSCMatrix cl_hcore_;
141
142 void set_occupations(const RefDiagSCMatrix& evals);
143
144 // scf things
145 void init_vector();
146 void done_vector();
147 void reset_density();
148 double new_density();
149 double scf_energy();
150
151 Ref<SCExtrapData> extrap_data();
152
153 // gradient things
154 void init_gradient();
155 void done_gradient();
156
157 RefSymmSCMatrix lagrangian();
158 RefSymmSCMatrix gradient_density();
159
160 // hessian things
161 void init_hessian();
162 void done_hessian();
163
164 // The Hartree-Fock derivatives
165 void two_body_deriv_hf(double*grad,double exchange_fraction);
166};
167
168}
169
170#endif
171
172// Local Variables:
173// mode: c++
174// c-file-style: "ETS"
175// End:
static std::ostream & out0()
Return an ostream that writes from node 0.
The HSOSSCF class is a base for classes implementing a self-consistent procedure for high-spin open-s...
Definition: hsosscf.h:43
RefSymmSCMatrix density()
Returns the SO density.
double alpha_occupation(int irrep, int vectornum)
Returns the alpha occupation.
RefSymmSCMatrix alpha_density()
Return alpha electron densities in the SO basis.
double occupation(int irrep, int vectornum)
Returns the occupation.
HSOSSCF(const Ref< KeyVal > &)
The KeyVal constructor.
RefSymmSCMatrix beta_density()
Return beta electron densities in the SO basis.
RefSymmSCMatrix fock(int i)
Returns closed-shell (i==0) or open-shell (i==1) Fock matrix in AO basis (excluding XC contribution i...
void symmetry_changed()
Call this if you have changed the molecular symmetry of the molecule contained by this MolecularEnerg...
int spin_polarized()
Return 1 if the alpha density is not equal to the beta density.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
RefSymmSCMatrix effective_fock()
Returns effective Fock matrix in MO basis (including XC contribution for KS DFT).
void print(std::ostream &o=ExEnv::out0()) const
Print information about the object.
double beta_occupation(int irrep, int vectornum)
Returns the beta occupation.
The RefDiagSCMatrix class is a smart pointer to an DiagSCMatrix specialization.
Definition: matrix.h:380
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:261
A template class that maintains references counts.
Definition: ref.h:332
The SCF class is the base for all classes that use a self-consistent field procedure to solve an effe...
Definition: scf.h:49
Restores objects that derive from SavableState.
Definition: statein.h:70
Serializes objects that derive from SavableState.
Definition: stateout.h:61

Generated at Sat Mar 29 2025 15:15:51 for MPQC 2.3.1 using the documentation package Doxygen 1.9.6.