ergo
Main Page
Namespaces
Classes
Files
File List
File Members
SCF_restricted.h
Go to the documentation of this file.
1
/* Ergo, version 3.2, a program for linear scaling electronic structure
2
* calculations.
3
* Copyright (C) 2012 Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek.
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*
18
* Primary academic reference:
19
* KohnâSham Density Functional Theory Electronic Structure Calculations
20
* with Linearly Scaling Computational Time and Memory Usage,
21
* Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek,
22
* J. Chem. Theory Comput. 7, 340 (2011),
23
* <http://dx.doi.org/10.1021/ct100611z>
24
*
25
* For further information about Ergo, see <http://www.ergoscf.org>.
26
*/
27
28
#ifndef SCF_RESTRICTED_HEADER
29
#define SCF_RESTRICTED_HEADER
30
31
#include "
SCF_general.h
"
32
33
34
class
SCF_restricted
:
public
SCF_general
35
{
36
public
:
37
38
// Constructor
39
SCF_restricted
(
const
Molecule
& molecule_,
40
const
Molecule
& extraCharges_,
41
const
BasisInfoStruct
& basisInfo_,
42
const
BasisInfoStruct
& basisInfoDensFit_,
43
const
IntegralInfo
& integralInfo_,
44
const
char
* guessDmatFileNamePtr,
45
const
JK::Params
& J_K_paramsPtr,
46
const
Dft::GridParams
& gridParams_,
47
const
SCF::Options
&
scfopts
,
48
const
SCF::MatOptions
&
matOpts
,
49
ergo_real
threshold_integrals_1el_input);
50
51
// Destructor
52
~SCF_restricted
();
53
54
private
:
55
void
initialize_matrices
();
56
void
check_params
();
57
void
get_starting_guess_density
();
58
void
initialize_homo_lumo_limits
();
59
void
write_matrices_to_file
();
60
void
get_2e_part_and_energy
();
61
void
output_sparsity_S_F_D
(
SCF_statistics
& stats);
62
void
calculate_energy
();
63
void
get_FDSminusSDF
();
64
void
get_error_measure
();
65
void
add_to_DIIS_list
();
66
void
update_best_fock_so_far
();
67
void
combine_old_fock_matrices
(
ergo_real
stepLength);
68
void
use_diis_to_get_new_fock_matrix
();
69
void
clear_diis_list
();
70
void
clear_error_matrices
();
71
void
save_current_fock_as_fprev
();
72
void
get_new_density_matrix
();
73
void
write_density_to_file
();
74
void
save_final_potential
();
75
void
add_random_disturbance_to_starting_guess
();
76
void
output_density_images
();
77
void
output_csr_matrices_for_gao
();
78
void
do_electron_dynamics
();
79
void
write_diag_dens_to_file
();
80
void
report_final_results
();
81
void
save_density_as_prevdens
();
82
void
update_subspace_diff
();
83
void
disturb_fock_matrix
(
ergo_real
subspaceError);
84
void
disturb_dens_matrix
(
ergo_real
subspaceError);
85
void
do_spin_flip
(
int
atomCount);
86
void
disturb_dens_matrix_exact
(
ergo_real
subspaceError);
87
void
save_full_matrices_for_matlab
();
88
void
report_density_difference
();
89
void
create_mtx_files_F
(
int
const
scfIter);
90
void
create_mtx_files_D
(
int
const
scfIter);
91
void
create_homo_eigvec_file
()
const
;
92
void
create_lumo_eigvec_file
()
const
;
93
void
create_gabedit_file
()
const
;
94
void
compute_dipole_moment
();
95
void
do_mulliken_pop_stuff
();
96
97
void
get_non_ort_err_mat_normalized_in_ort_basis
(
symmMatrix
& randomMatrix,
int
transform_with_S_also);
98
void
transform_with_S
(
symmMatrix
&
A
);
99
void
transform_with_invChol
(
symmMatrix
& A);
100
101
void
disturb_dens_matrix_exact_try
(
const
symmMatrix
& randomMatrix,
102
const
symmMatrix
& orgDensMatrix,
103
ergo_real
disturbanceFactor,
104
ergo_real
& resultSinTheta,
105
symmMatrix
& resultDensMatrix);
106
107
symmMatrix
densityMatrix
;
108
symmMatrix
FockMatrix
;
109
symmMatrix
Fprev
;
110
symmMatrix
Dprev
;
111
symmMatrix
F_ort_prev
;
// Used by purification
112
symmMatrix
bestFockMatrixSoFar
;
113
symmMatrix
bestFockMatrixSoFar2
;
114
normalMatrix
ErrorMatrix
;
115
// The following three matrices are only used when doing sparsity investigation, otherwise they are empty
116
symmMatrix
J_matrix
;
117
symmMatrix
K_matrix
;
118
symmMatrix
Fxc_matrix
;
119
120
generalVector
eigVecLUMO
;
121
generalVector
eigVecHOMO
;
122
123
124
intervalType
homoInterval_F_ort_prev
;
125
intervalType
lumoInterval_F_ort_prev
;
126
intervalType
homoInterval_Fprev
;
127
intervalType
lumoInterval_Fprev
;
128
129
};
130
131
132
133
134
135
#endif
source
scf
SCF_restricted.h
Generated on Sun Mar 17 2013 14:03:37 for ergo by
1.8.3.1