IM-SRG++  0
HartreeFock.hh
1 #ifndef HartreeFock_h
2 #define HartreeFock_h
3 
4 #include "ModelSpace.hh"
5 #include "Operator.hh"
6 #include "IMSRGProfiler.hh"
7 #include <armadillo>
8 #include <map>
9 #include <deque>
10 
12 {
13  public:
16  arma::mat C;
17  arma::mat rho;
18  arma::mat KE;
19  arma::mat Vij;
20  arma::mat V3ij;
21  arma::mat F;
22  array< array< arma::mat,2>,3> Vmon;
23  array< array< arma::mat,2>,3> Vmon_exch;
24  arma::uvec holeorbs;
25  arma::rowvec hole_occ;
26  arma::vec energies;
27  arma::vec prev_energies;
28  double tolerance;
29  double EHF;
30  double e1hf;
31  double e2hf;
32  double e3hf;
33  int iterations;
34  vector< pair<const array<int,6>,double>> Vmon3;
36  deque<double> convergence_ediff;
37  deque<double> convergence_EHF;
38 
39 // Methods
40  HartreeFock(Operator& hbare);
41  void BuildMonopoleV();
42  void BuildMonopoleV3();
43  void Diagonalize();
44  void UpdateF();
45  void UpdateDensityMatrix();
46  bool CheckConvergence();
47  void Solve();
48  void CalcEHF();
49  void PrintEHF();
50  void ReorderCoefficients();
53  Operator GetOmega();
54  Operator GetHbare(){return Hbare;};
55  void PrintSPE();
56 // void PrintSPE(){ F.diag().print();}; ///< Print out the single-particle energies
57  void FreeVmon();
58  void GetRadialWF(index_t index, vector<double>& R, vector<double>& PSI);
59 
60 };
61 
62 
63 
64 #endif
65 
void Solve()
Diagonalize and UpdateF until convergence.
Definition: HartreeFock.cc:62
double e2hf
Two-body contribution to EHF.
Definition: HartreeFock.hh:31
int iterations
iterations used in Solve()
Definition: HartreeFock.hh:33
void UpdateF()
Update the Fock matrix with the new transformation coefficients C.
Definition: HartreeFock.cc:348
Definition: Operator.hh:21
bool CheckConvergence()
Compare the current energies with those from the previous iteration.
Definition: HartreeFock.cc:425
double tolerance
tolerance for convergence
Definition: HartreeFock.hh:28
arma::mat rho
density matrix rho_ij
Definition: HartreeFock.hh:17
Operator & Hbare
Input bare Hamiltonian.
Definition: HartreeFock.hh:14
Definition: HartreeFock.hh:11
deque< double > convergence_ediff
Save last few convergence checks for diagnostics.
Definition: HartreeFock.hh:36
ModelSpace * modelspace
Model Space of the Hamiltonian.
Definition: HartreeFock.hh:15
Definition: IMSRGProfiler.hh:17
arma::vec energies
occupations of hole orbits
Definition: HartreeFock.hh:26
arma::mat C
transformation coefficients, 1st index is ho basis, 2nd = HF basis
Definition: HartreeFock.hh:16
void UpdateDensityMatrix()
Update the density matrix with the new coefficients C.
Definition: HartreeFock.cc:331
arma::mat F
Fock matrix.
Definition: HartreeFock.hh:21
void PrintEHF()
Print out the Hartree Fock energy.
Definition: HartreeFock.cc:134
arma::mat Vij
1 body piece of 2 body potential
Definition: HartreeFock.hh:19
double e3hf
Three-body contribution to EHF.
Definition: HartreeFock.hh:32
arma::vec prev_energies
SPE&#39;s from last iteration.
Definition: HartreeFock.hh:27
void BuildMonopoleV3()
Only the monopole part of V3 is needed.
Definition: HartreeFock.cc:232
void ReorderCoefficients()
Reorder the coefficients in C to eliminate phases etc.
Definition: HartreeFock.cc:457
void GetRadialWF(index_t index, vector< double > &R, vector< double > &PSI)
Return the radial wave function of an orbit in the HF basis.
Definition: HartreeFock.cc:704
double e1hf
One-body contribution to EHF.
Definition: HartreeFock.hh:30
IMSRGProfiler profiler
Profiler for timing, etc.
Definition: HartreeFock.hh:35
array< array< arma::mat, 2 >, 3 > Vmon
Monopole 2-body interaction.
Definition: HartreeFock.hh:22
Definition: ModelSpace.hh:157
void FreeVmon()
Free up the memory used to store Vmon3.
Definition: HartreeFock.cc:660
Operator GetOmega()
Return a generator of the Hartree Fock transformation.
Definition: HartreeFock.cc:674
arma::mat KE
kinetic energy
Definition: HartreeFock.hh:18
void PrintSPE()
Getter function for Hbare.
Definition: HartreeFock.cc:691
Operator TransformToHFBasis(Operator &OpIn)
Transform an operator from oscillator basis to HF basis.
Definition: HartreeFock.cc:502
Operator GetNormalOrderedH()
Return the Hamiltonian in the HF basis at the normal-ordered 2body level.
Definition: HartreeFock.cc:584
arma::mat V3ij
1 body piece of 3 body potential
Definition: HartreeFock.hh:20
void CalcEHF()
Evaluate the Hartree Fock energy.
Definition: HartreeFock.cc:110
arma::uvec holeorbs
list of hole orbits for generating density matrix
Definition: HartreeFock.hh:24
array< array< arma::mat, 2 >, 3 > Vmon_exch
Monopole 2-body interaction.
Definition: HartreeFock.hh:23
void Diagonalize()
Diagonalize the Fock matrix.
Definition: HartreeFock.cc:153
HartreeFock(Operator &hbare)
Constructor.
Definition: HartreeFock.cc:20
deque< double > convergence_EHF
Save last few convergence checks for diagnostics.
Definition: HartreeFock.hh:37
double EHF
Hartree-Fock energy (Normal-ordered 0-body term)
Definition: HartreeFock.hh:29
void BuildMonopoleV()
Only the monopole part of V is needed, so construct it.
Definition: HartreeFock.cc:191