ergo
Main Page
Namespaces
Classes
Files
File List
File Members
SCF_unrestricted.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_UNRESTRICTED_HEADER
29
#define SCF_UNRESTRICTED_HEADER
30
31
#include "
SCF_general.h
"
32
33
34
class
SCF_unrestricted
:
public
SCF_general
35
{
36
public
:
37
38
// Constructor
39
SCF_unrestricted
(
const
Molecule
& molecule_,
40
const
Molecule
& extraCharges_,
41
const
BasisInfoStruct
& basisInfo_,
42
const
BasisInfoStruct
& basisInfoDensFit_,
43
const
IntegralInfo
& integralInfo_,
44
const
char
* guessDmatFileName_,
45
const
JK::Params
& J_K_params_,
46
const
Dft::GridParams
& gridParams_,
47
const
SCF::Options
&
scfopts
,
48
const
SCF::MatOptions
&
matOpts
,
49
ergo_real
threshold_integrals_1el_input,
50
int
alpha_beta_diff_input);
51
52
// Destructor
53
~SCF_unrestricted
();
54
55
void
get_Fock_matrices
(
symmMatrix
& FockMatrix_a,
symmMatrix
& FockMatrix_b);
56
void
get_no_of_electrons
(
int
& noOfElectrons_a,
int
& noOfElectrons_b);
57
58
private
:
59
void
initialize_matrices
();
60
void
check_params
();
61
void
get_starting_guess_density
();
62
void
initialize_homo_lumo_limits
();
63
void
write_matrices_to_file
();
64
void
get_2e_part_and_energy
();
65
void
output_sparsity_S_F_D
(
SCF_statistics
& stats);
66
void
calculate_energy
();
67
void
get_FDSminusSDF
();
68
void
get_error_measure
();
69
void
add_to_DIIS_list
();
70
void
update_best_fock_so_far
();
71
void
combine_old_fock_matrices
(
ergo_real
stepLength);
72
void
use_diis_to_get_new_fock_matrix
();
73
void
clear_diis_list
();
74
void
clear_error_matrices
();
75
void
save_current_fock_as_fprev
();
76
void
get_new_density_matrix
();
77
void
write_density_to_file
();
78
void
save_final_potential
();
79
void
add_random_disturbance_to_starting_guess
();
80
void
output_density_images
();
81
void
output_csr_matrices_for_gao
();
82
void
do_electron_dynamics
();
83
void
write_diag_dens_to_file
();
84
void
report_final_results
();
85
void
save_density_as_prevdens
();
86
void
update_subspace_diff
();
87
void
disturb_fock_matrix
(
ergo_real
subspaceError);
88
void
disturb_dens_matrix
(
ergo_real
subspaceError);
89
void
do_spin_flip
(
int
atomCount);
90
void
disturb_dens_matrix_exact
(
ergo_real
subspaceError);
91
void
save_full_matrices_for_matlab
();
92
void
report_density_difference
();
93
void
create_mtx_files_F
(
int
const
scfIter);
94
void
create_mtx_files_D
(
int
const
scfIter);
95
void
create_homo_eigvec_file
()
const
;
96
void
create_lumo_eigvec_file
()
const
;
97
void
create_gabedit_file
()
const
;
98
void
compute_dipole_moment
();
99
void
do_mulliken_pop_stuff
();
100
101
void
get_S2
(
ergo_real
& S2_exact,
ergo_real
& S2);
102
103
symmMatrix
densityMatrix_alpha
;
104
symmMatrix
densityMatrix_beta
;
105
symmMatrix
FockMatrix_alpha
;
106
symmMatrix
FockMatrix_beta
;
107
symmMatrix
Fprev_alpha
;
108
symmMatrix
Fprev_beta
;
109
symmMatrix
Dprev_alpha
;
110
symmMatrix
Dprev_beta
;
111
symmMatrix
F_ort_prev_alpha
;
// Used by purification
112
symmMatrix
F_ort_prev_beta
;
// Used by purification
113
symmMatrix
bestFockMatrixSoFar_alpha
;
114
symmMatrix
bestFockMatrixSoFar_beta
;
115
symmMatrix
bestFockMatrixSoFar2_alpha
;
116
symmMatrix
bestFockMatrixSoFar2_beta
;
117
normalMatrix
ErrorMatrix_alpha
;
118
normalMatrix
ErrorMatrix_beta
;
119
symmMatrix
G_alpha
;
120
symmMatrix
G_beta
;
121
122
// HOMO/LUMO info
123
intervalType
homoInterval_F_ort_prev_alpha
;
124
intervalType
lumoInterval_F_ort_prev_alpha
;
125
intervalType
homoInterval_F_ort_prev_beta
;
126
intervalType
lumoInterval_F_ort_prev_beta
;
127
intervalType
homoInterval_Fprev_alpha
;
128
intervalType
lumoInterval_Fprev_alpha
;
129
intervalType
homoInterval_Fprev_beta
;
130
intervalType
lumoInterval_Fprev_beta
;
131
132
int
alpha_beta_diff
;
133
int
noOfElectrons_alpha
;
134
int
noOfElectrons_beta
;
135
};
136
137
138
139
140
141
#endif
source
scf
SCF_unrestricted.h
Generated on Thu Jan 31 2013 18:51:20 for ergo by
1.8.1.1