~ubuntu-branches/ubuntu/utopic/psicode/utopic

« back to all changes in this revision

Viewing changes to .pc/08_525758_ftbfs_with_gcc44.patch/src/bin/mcscf/scf.h

  • Committer: Package Import Robot
  • Author(s): Michael Banck
  • Date: 2012-03-29 01:26:55 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20120329012655-8lnngrup9p40ow4z
Tags: 3.4.0-3
* debian/control: Add CC3, MRCCSD and SCS-MP2 energies, RHF hessian and
  closed-shell MP2 gradient to features, clarify that MP2-R12 is an
  explicitly correlated method.
* debian/patches/09_system_libint.dpatch: New patch, modifies the build
  system to use the system libint and not compile and link in the shipped
  libint codes.
* debian/control (Build-Depends): Added libint-dev.
* debian/rules (DEB_MAKE_CHECK_TARGET): Run quicktests target to invoke the
  test suite.
* debian/rules: Rewritten for dh.
* debian/control (Build-Depends): Bumped debhelper version to 8, removed
  cdbs and dpatch.
* debian/patches: Moved to source version 3.0 (quilt).
* debian/source/format: New file.
* debian/rules (override_dh_auto_install): Install some test suite input
  files as examples.
* debian/dirs: Added examples directory.
* debian/TODO: Updated.
* debian/control (Standards-Version): Bumped to 3.9.3.
* debian/rules (override_dh_auto_test): Do not abort build on test suite
  failure.
* debian/rules (override_dh_auto_build): New rule, build the user manual in
  addition to the main code.
* debian/control (Build-Depends): Added texlive-latex-recommended.
* debian/patches/10_makerules_doc.patch: New patch, build the postscript
  file by default and deletes some more generated files on realclean.
* debian/rules (override_dh_auto_install): Install postscript user manual
  into documentation directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _psi_src_bin_mcscf_scf_h_
 
2
#define _psi_src_bin_mcscf_scf_h_
 
3
 
 
4
#include "sblock_vector.h"
 
5
#include "sblock_matrix.h"
 
6
 
 
7
#define STORE_TEI 0
 
8
 
 
9
namespace psi{ namespace mcscf{
 
10
 
 
11
enum ReferenceType {rhf, rohf, uhf, tcscf};
 
12
 
 
13
class SCF
 
14
{
 
15
public:
 
16
  SCF();
 
17
  ~SCF();
 
18
  void compute_energy();
 
19
private:
 
20
  ReferenceType reference;
 
21
  static const int maxci   = 8;
 
22
  static const int maxdiis = 10;
 
23
  static const int maxbatches = 50;
 
24
  
 
25
  int  nirreps;
 
26
  int  nso;
 
27
  size_t* ioff;
 
28
  int* sopi;
 
29
  int* docc;
 
30
  int* actv;
 
31
  int  turn_on_actv;
 
32
  int  root;
 
33
  int  ndiis;
 
34
  int  current_diis;
 
35
  bool use_diis;
 
36
  double total_energy;
 
37
 
 
38
  // Out-of-core algorithm
 
39
  bool   out_of_core;
 
40
  int    nbatch;
 
41
  size_t batch_pq_min[maxbatches];
 
42
  size_t batch_pq_max[maxbatches];
 
43
  size_t batch_index_min[maxbatches];
 
44
  size_t batch_index_max[maxbatches];
 
45
  size_t batch_size[maxbatches];
 
46
  size_t total_symmetric_block_size;
 
47
  size_t nin_core;                    // Number of matrix elements of the PK and K matrices held in of core
 
48
 
 
49
  // Addressing routines
 
50
  int* block_offset;
 
51
  int  npairs;              // Total number of pairs
 
52
  int* pairpi;              // Number of pairs per irrep
 
53
  int* pairs;               // The pairs stored as [ p1 q1 p2 q2 ... ]
 
54
  int** pair;               // Maps absolute p and q to the pair index
 
55
  int** pair_sym;           // Maps absolute p and q to the pair symmetry
 
56
  int*  pair_offset;        // Offset for first pair of a given irrep
 
57
 
 
58
  double*  PK;              // PK(pq|rs)
 
59
  double*  K;               // K(pq|rs)
 
60
 
 
61
  SBlockVector epsilon;     // Effective Fock matrix eigenvalues
 
62
 
 
63
 
 
64
  SBlockMatrix C;           // MO coefficients matrix
 
65
  SBlockMatrix C_t;         // transformed C matrix
 
66
  SBlockMatrix C_T;         // MO coefficients matrix transposed
 
67
  SBlockMatrix Dc;          // The density matrix (closed)
 
68
  SBlockMatrix Do;          // The density matrix (open)
 
69
  SBlockMatrix Dtc[maxci];  // The density matrix (tcscf)
 
70
  SBlockMatrix Dsum[maxci]; // The density matrix (closed + tcscf)
 
71
  SBlockMatrix Fc;          // The Fock matrix (closed)
 
72
  SBlockMatrix Fc_t;        // The transformed Fock matrix (closed)
 
73
  SBlockMatrix Fo;          // The Fock matrix (open)
 
74
  SBlockMatrix Fo_t;        // The transformed Fock matrix (open)
 
75
  SBlockMatrix Favg;        // The Fock matrix (average)
 
76
  SBlockMatrix Favg_t;      // The transformed Fock matrix (average)
 
77
  SBlockMatrix Ftc[maxci];  // The Fock matrix (tcscf)
 
78
  SBlockMatrix Ftc_t[maxci];// The transformed Fock matrix (tcscf)
 
79
  SBlockMatrix Feff_t;      // The transformed effective Fock matrix
 
80
  SBlockMatrix Feff_oAO;    // The effective Fock matrix in the orthogonal AO basis
 
81
  SBlockMatrix G;           // The G matrix
 
82
  SBlockMatrix T;           // a temp matrix
 
83
  SBlockMatrix H;           // one electron integrals
 
84
  SBlockMatrix O;           // The occupation matrix
 
85
  SBlockMatrix S;           // overlap integrals
 
86
  SBlockMatrix S_sqrt_inv;  // S^-1/2
 
87
  SBlockMatrix S_sqrt;      // S^1/2
 
88
 
 
89
  SBlockMatrix e;                         // MO coefficients error matrix
 
90
  SBlockMatrix diis_F[maxdiis];           // The Fock matrices saved for DIIS
 
91
  SBlockMatrix diis_e[maxdiis];           // The error matrices saved for DIIS
 
92
  double       diis_ci[maxci][maxdiis];   // The ci vector saved for DIIS
 
93
 
 
94
  // TWOCON Specific
 
95
  int          nci;         // Number of references
 
96
  double   norm_ci_grad;    // Norm of the CI gradient (sum_I |C_I|)
 
97
  double*       ci;         // TWOCON CI coefficients
 
98
  double*       ci_grad;    // TWOCON CI coefficients gradient
 
99
  double** H_tcscf;         // TWOCON Hamiltonian
 
100
  int tcscf_mos[maxci];     // Number of the TWOCON mos (relative to the irrep)
 
101
  int tcscf_sym[maxci];     // Symmetry of the TWOCON mos
 
102
 
 
103
  // Private functions
 
104
  void startup();
 
105
  void cleanup();
 
106
 
 
107
  void generate_pairs();
 
108
  void read_so_oei();
 
109
  void read_so_tei();
 
110
  void read_so_tei_form_PK();
 
111
  void read_so_tei_form_PK_and_K();
 
112
  void read_Raffanetti(const char* integral_type, double* integrals, int batch);
 
113
  void write_Raffanetti(const char* integral_type, double* integrals, int batch);
 
114
 
 
115
  void construct_S_inverse_sqrt();
 
116
  void iterate_scf_equations();
 
117
  void canonicalize_MO();
 
118
  void save_info();
 
119
  void check_orthonormality();
 
120
  void print_eigenvectors_and_MO();
 
121
 
 
122
  void initial_guess();
 
123
  void density_matrix();
 
124
  void construct_G(SBlockMatrix& density,SBlockMatrix& G,double* integrals,int batch, double factor);
 
125
  void construct_G(SBlockMatrix& density,SBlockMatrix& G,double* integrals,int batch);
 
126
  void construct_F();
 
127
  void construct_Favg();
 
128
  void construct_Feff(int cycle);
 
129
  double energy(int cycle,double old_energy);
 
130
 
 
131
  void diis(int cycle);
 
132
 
 
133
  // Auxiliary functions
 
134
  void transform(SBlockMatrix& Initial, SBlockMatrix& Final, SBlockMatrix& Transformation);
 
135
};
 
136
 
 
137
}} /* End Namespaces */
 
138
 
 
139
#endif // _psi_src_bin_mcscf_scf_h_
 
140
 
 
141
/*
 
142
//   void read_C();
 
143
 
 
144
 
 
145
 
 
146
  int* so_sym;
 
147
 
 
148
  // TWOCON
 
149
 
 
150
 
 
151
 
 
152
  // DIIS
 
153
  int maxdiis;
 
154
  int current_diis;
 
155
 
 
156
  double*      epsilon;     // Eigenvalues
 
157
  SBlockMatrix* C;           // MO coefficients matrix
 
158
  SBlockMatrix* C_T;         // Transpose coefficients matrix
 
159
  SBlockMatrix* C_t;         // transformed C matrix
 
160
  SBlockMatrix* D;           // density matrix
 
161
  SBlockMatrix* Dc;          // closed-shell density matrix
 
162
  SBlockMatrix* Do;          // open-shell density matrix
 
163
  SBlockMatrix* Dtc[2];      // tcscf density matrices
 
164
  SBlockMatrix* Ex;          // tcscf exchange matrix
 
165
  SBlockMatrix* F;           // Fock matrix
 
166
  SBlockMatrix* F_t;         // transformed Fock matrix
 
167
  SBlockMatrix* Fc;          // closed-shell Fock matrix
 
168
  SBlockMatrix* Fo;          // open-shell   Fock matrix
 
169
 
 
170
  SBlockMatrix* Fc_t;        // transformed closed-shell Fock matrix
 
171
  SBlockMatrix* Fo_t;        // transformed open-shell   Fock matrix
 
172
  SBlockMatrix* Feff_t;      // transformed effective Fock matrix
 
173
  SBlockMatrix* G;           // two electron contribution to F
 
174
 
 
175
  SBlockMatrix* SDF;         // SDF: used to compute the diis error
 
176
  SBlockMatrix* FDS;         // FDS: used to compute the diis error
 
177
  SBlockMatrix* CSC;         // CSC = 1 for orthornormal MOs
 
178
 
 
179
 
 
180
  SBlockMatrix* Temp;        // A temporary matrix
 
181
 
 
182
 
 
183
 
 
184
*/