Why opt_diag==2 in module qmc_prep_ctqmc.F90

Total energy, DFT+U, BigDFT,...

Moderator: amadon

Post Reply
PhilippBa
Posts: 15
Joined: Tue May 26, 2015 7:22 pm

Why opt_diag==2 in module qmc_prep_ctqmc.F90

Post by PhilippBa » Wed Jun 03, 2015 2:31 pm

Dear all,

during some DMFT calculations (with CTQMC as impurity solver) i noticed that my occupation matrix is not diagonal after the CTQMC. After checking the output, we noticed that the density matrix is diagonalised before the QMC run (this is due to the flag "opt_diag=2" in qmc_prep_ctqmc.F90 (see code below)). It is, however, diagonal by symmetry in the DFT and also entering the solver.
Can anyone explain what is happening here? After setting opt_diag=0 my occupation matrix after CTQMC remains diagonal.
My inputs are given in a recently opened topic "Runtime error during LDA+DMFT" (with the suggested settings, thanks to B. Amadon)


! =================================================================
! Impose diago of levels and Ylm basis if opt_nondiag=1
! =================================================================
! opt_diag=2 ! 2: diago density matrix (can be used for historical reasons)
! opt_diag=3 ! 3: weiss function is diagonalized: for test, bad and should NOT be used
! opt_diag=1 ! 1: diago the levels (The best choice).

if(nspinor==2) then
opt_diag=1 ! because levels are the quantity to diagonalise for CTQMC and NOT dmat
useylm=1 ! to avoid complex G(tau)
opt_nondiag=1 ! mandatory for soc.
end if
useylm=0
opt_diag=2
opt_nondiag=0 ! impose it now for diagonal CTQMC code



Best regards,

Philipp Bahlke
Philipp Bahlke
University of Hamburg
Institute for inorganic and applied chemistry
Germany

amadon
Posts: 44
Joined: Mon Aug 24, 2009 10:58 am

Re: Why opt_diag==2 in module qmc_prep_ctqmc.F90

Post by amadon » Wed Jun 03, 2015 5:31 pm

Dear Philipp

In the general case, the atomic levels (or the density matrix) have to be diagonalized for the CTQMC solver.
In your case, the diagonalization is useless but nevertheless done. If you have degenerate levels,
the rotation is not the identity but can mix arbitrarily different degenerate levels. Moreover, as the QMC solver generate
noise in the calculation, the occupation matrix will not be perfectly degenerated.
As a consequence, the inverse rotation subsequently applied to this occupation matrix, can generate, (small) non diagonal elements.
If these are not so small, could you post your input and output occupation matrices ?

Best regards
Bernard
Bernard Amadon
CEA
France

PhilippBa
Posts: 15
Joined: Tue May 26, 2015 7:22 pm

Re: Why opt_diag==2 in module qmc_prep_ctqmc.F90

Post by PhilippBa » Fri Jun 05, 2015 8:11 am

Dear Bernard,

this is the occupation matrix i get after the projection:


= Occupation matrix from KS occupations

-------> For Correlated Atom 19

-- polarization spin component 1
0.49828 0.00000 0.00000 -0.00000 0.00000
0.00000 0.48910 0.00000 -0.00000 0.00000
0.00000 0.00000 0.55793 -0.00000 0.00000
-0.00000 -0.00000 -0.00000 0.48910 0.00000
0.00000 0.00000 0.00000 0.00000 0.52510


After the search of the Fermi level the DMFT loops starts with the diagonalisation:

Slm basis is used
The correlated occupation matrix is diagonalized

== Print Energy levels for Fermi Level= -0.09543

-------> For Correlated Atom 19

-- polarization spin component 1
-1.00084 -0.00000 0.00000 0.00000 0.00000
-0.00000 -1.00668 -0.00000 0.00000 0.00000
0.00000 -0.00000 -0.99886 0.00000 0.00000
0.00000 0.00000 0.00000 -1.00668 0.00000
0.00000 0.00000 0.00000 0.00000 -1.01032


Then the CTQMC starts and after transforming back to the original basis:

-------> For Correlated Atom 19

-- polarization spin component 1
0.72479 -0.00000 0.00215 0.00000 0.00000
-0.00000 0.78315 0.00000 0.05991 0.00000
0.00215 0.00000 0.74983 -0.00000 0.00000
0.00000 0.05991 -0.00000 0.78315 0.00000
0.00000 0.00000 0.00000 0.00000 0.87721


Here you can see that one of the off-diagonal elements starts to be non-zero (0.05991). And the converged occupation matrix (after the calculation of the total energy) is then:

========== LDA+U DATA ===================================================

====== For Atom 19, occupations for correlated orbitals. l = 2


== Calculated occupation matrix for correlated orbitals:

Calculated occupation matrix for component up
0.45815 0.00144 0.00146 -0.00144 0.00000
0.00144 0.48435 0.00114 0.01550 -0.00091
0.00146 0.00114 0.47312 -0.00114 0.00000
-0.00144 0.01550 -0.00114 0.48435 -0.00091
0.00000 -0.00091 0.00000 -0.00091 0.52702


Ok, the off-diagonal element is just 0.01550, however, I already calculated the system with much more copper atoms (91 atoms in the unit cell instead off 19). The converged matrix for this one is:

Calculated occupation matrix for component up
0.36026 -0.00121 -0.00022 0.00121 0.00000
-0.00121 0.43399 0.00098 -0.05749 0.00259
-0.00022 0.00098 0.51731 -0.00098 0.00000
0.00121 -0.05749 -0.00098 0.43399 0.00259
0.00000 0.00259 0.00000 0.00259 0.54571



I am not sure if 0.0155 or 0.05749 are small enough for the off-diagonal elements. But if i set opt_diag to 0 i get (for the large system):

Calculated occupation matrix for component up
0.37335 -0.00308 -0.00012 0.00308 0.00000
-0.00308 0.52172 0.00098 0.00002 0.00010
-0.00012 0.00098 0.41617 -0.00098 0.00000
0.00308 0.00002 -0.00098 0.52172 0.00010
0.00000 0.00010 0.00000 0.00010 0.54874


So the off-diagonal elements are a bit smaller. But I have to know if I do some error by setting opt_diag to 0 in the code? Or if everything is fine if I do so, as long as my matrix are diagonal?


Best regards,

Philipp
Philipp Bahlke
University of Hamburg
Institute for inorganic and applied chemistry
Germany

amadon
Posts: 44
Joined: Mon Aug 24, 2009 10:58 am

Re: Why opt_diag==2 in module qmc_prep_ctqmc.F90

Post by amadon » Thu Jun 11, 2015 3:09 pm

Dear Philipp,

Indeed, it seems that the fact that the LDA occupation matrix is diagonal, is not imposed by symmetry (you have a reduced number of symmetries).
So, your occupation matrix is not exactly diagonal (it can be checked by increasing the precision in the writings) even before the CTQMC.
I do not know if the reason is physical or a LDA convergence which is not sufficient.
And moreover, the density matrix and the atomic levels are not diagonal in the same basis (it seems: I have done some quick checks).
If it is not a convergence problem (at the LDA level), the solution would be to diagonalise
the atomic levels and use a CTQMC code with a non diagonal hybridization.
This is not yet available in the public version of ABINIT. It will be available soon nevertheless, but anyway,
the computational cost would be higher for a very weak improvement (you have small non diagonal terms).

=> However, what you can do is to use opt_diag=0 indeed and use pawprtvol=3.
You will have much more information about the density matrices after the CTQMC.

I was however not able to recover your results for the small system (I have in my case very small non diagonal elements even for the DMFT occupation matrices). Can you post the exact inputs (LDA and DMFT) that you use to have these occupation matrices ?

Best regards
Bernard
Bernard Amadon
CEA
France

PhilippBa
Posts: 15
Joined: Tue May 26, 2015 7:22 pm

Re: Why opt_diag==2 in module qmc_prep_ctqmc.F90

Post by PhilippBa » Fri Jun 12, 2015 3:11 pm

Thanks for response!


The exact inputs are given below! I used the PSP's from http://www.physics.rutgers.edu/gbrv/ , maybe that could be important to reproduce my results.

By the way: I am looking for a way to print the Hybridization function. Is there any possibility to do so in ABINIT?


Best regards,


Philipp
Attachments
lda.in
(927 Bytes) Downloaded 141 times
dmft.in
(1.33 KiB) Downloaded 119 times
Philipp Bahlke
University of Hamburg
Institute for inorganic and applied chemistry
Germany

Post Reply