TRIQS / dft_tools

Interface to DFT codes
https://triqs.github.io/dft_tools
Other
40 stars 39 forks source link

problem for SRVO3 #36

Closed Soumeniisc closed 9 years ago

Soumeniisc commented 9 years ago

Hi! I was using the same exactly same python script for DMFT as is given in source. I am getting following error.

https://gist.github.com/Soumeniisc/2bf374de807a497a066e

Chemical Potential = 61.864286
Total Density = -0.727171 11.364286 < Chemical Potential < 61.864286 -1.141574 < Total Density < -0.727171 FAILURE to adjust Chemical Potential to the value 1.000000 after 101 iterations. Traceback (most recent call last): File "SRVO-DMFT.py", line 77, in S.G_iw << SK.extract_G_loc()[0] # calc the local Green function File "/home/soumen/INSTALLPACKAGES/23_10_15/lib/python2.7/dist-packages/pytriqs/applications/dft/sumk_dft.py", line 370, in extract_G_loc G_latt_iw = self.lattice_gf(ik=ik, mu=mu, iw_or_w="iw", with_Sigma=with_Sigma, with_dc=with_dc, beta=beta) File "/home/soumen/INSTALLPACKAGES/23_10_15/lib/python2.7/dist-packages/pytriqs/applications/dft/sumk_dft.py", line 304, in lattice_gf M[ibl] = self.hopping[ik,ind,0:n_orb,0:n_orb] - (idmat[ibl]_mu) - (idmat[ibl] * self.h_field * (1-2_ibl)) TypeError: unsupported operand type(s) for *: 'complex' and 'NoneType'

pseth commented 9 years ago

This is a problem in finding the chemical potential, potentially due to a insufficiently dense k-grid mesh. You can try two things: 1) Try with more k-points. 2) Try to set the chemical potential before the first call of calc_mu to different values (these will be the starting guesses) using SK.set_mu(mu) to help calc_mu out.

Soumeniisc commented 9 years ago

Hi! Thank for your usefull instruction.This time I used 3000 k points and increased the no_cycle. Now above problem is sorted out but at 28 th LDA+DMFT iteration i am getting following error.

DC for shell 0 and block up = 1.319399 DC for shell 0 and block down = 1.319399 DC energy for shell 0 = 0.145302958057 Corr. energy = -13.6557972754 EU and DC -13.6557972754 [0.1453029580571332] Trace of Density Matrix: {'down': 0.71242200070248396, 'up': 0.71242200070248396} sed: can't read s/\/$//: No such file or directory

LAPW2 - Error. Check file lapw2.error

Error in LAPW2 'LAPW2' - can't open unit: 10
'LAPW2' - filename: /SRVO-DMFT1.vector

'LAPW2' - status: unknown form: unformatted

I know this one is wien2k related issue. Still any suggestion will be appreciated. It would be helpful if refer me resources about how chemical potential and dc is calculated in this code.

Thnaks

pseth commented 9 years ago

It looks to me like a problem indeed in the wien2k part. Take a look at src/python/sumk_dft.py for the dc/chemical potential source code.

aichhorn commented 9 years ago

Hi, there is something seriously wrong in your setup. Your chemical potential is around 61eV!!! This cannote be. And moreover, you get a total density of -0.72!!! The density MUST be positive, it comes from the Greens function and is, up to some numerical errors, positive and normalised. My suggestion: You have to start again from the very first iteration, and check the very first G0 that you get from LDA if it makes sence physically. That means, the chemical potential should be around 0eV, the double counting should be around U*(N-1/2) (and not 61 for instance). It does not make sense to look for the error that you got at iteration 28, you have to sort out first what goes wrong in the very beginning. Very important: If your first iteration does not make sense, it makes no sense either to continue to the next iteration!

mzingl commented 9 years ago

I'd like to comment on your initial error. I usually get the same error in finding the chemical potential if quantities (G, Sigma, Delta ...) become unphysical (e.g. due to a positive imaginary part of the self-energy). It might be related to a poor statistics of your impurity solver, which leads to a lot of noise and eventually to a bad tail fit. I don't know how many cores you are using for your calculations, but 5000 measurements (p["n_cycles"] = 5000) seems to be too little. As Markus said you should check your first input AND also the first output of the ctqmc solver!

pseth commented 9 years ago

Ah oops, I didn't see your gist script. Yes, 50 warmup cycles and 5000 cycles is much too little! And remember that the number of warmup cycles needs to be independent of number of cores used as the Markov chains on each core are independent. Perhaps it was not linked to the number of kpoints after all (though that can cause mu finding issues in my experience..).

Soumeniisc commented 9 years ago

Hi! Thanks for all useful comments. But in the second error (where i mentioned after 28 th iteration) i used p["max_time"] = -1 p["length_cycle"] = 200 p["n_warmup_cycles"] = 2000 p["n_cycles"] = 200000 i used single processor. Hopefully this didn't lead to a poor statistics of impurity solver. Thanks

pseth commented 9 years ago

The best thing to do is to take a look at the GFs and judge the correctness/noise for yourself, but 2000 warmup cycles is still not enough. I would say 50000 is a safer bet.

mzingl commented 9 years ago

I used at least n_cycles = 3*10^6 for SrVO3. You really need to look at your first self-energy! Usually, if you don't use a very large number of cycles you have to play around with the tail fit by setting fit_n_moments, fit_min_n and fit_max_n !

Soumeniisc commented 9 years ago

Hi all, this time i used p["max_time"] = -1 p["length_cycle"] = 200 p["n_warmup_cycles"] = 50000 p["n_cycles"] = 14*10^6

self energy is very noise. when i used the "fit_min_n"=40, self is not fitted smoothly with the default moments. Any suggestion to deal with this. thanks

aichhorn commented 9 years ago

Can you show us in a plot what your self energy looks like? Otherwise it will be complicated to guess a solution. And please provide the text output of the FIRST DMFT iteration that you get (Wannier charge, chemical potential, double counting initialization, all this matters).

Soumeniisc commented 9 years ago

Hi, Sigma from G_tau Measurement. sigma_tau_measure dc_energy=1.2925566278112184 correngy=0.4978122523020122 chem=-0.012443047922473305 dc_imp_up= 4.241234051324236 0 0 0 4.241234051324236 0 0 0 4.24123405132423


Sigma from G_l Measurement with n_l=40 sigma_gl_measure sigma this time does not converge to zero.

aichhorn commented 9 years ago

The Sigma from G_tau looks okay, the data at low energy is fine. Only the tail fit goes crazy, there you have to change also the number of moments that you fit, or you use a larger fit_min_n to go further into the i/omega regime. The Sigma from G_l looks completely crazy. What version of TRIQS and CTHYB did you use to produce this?

Soumeniisc commented 9 years ago

I am using triqs and dfttool version 1.2 (recent one). after about w{n=90} selfenegy is very fluctuating. In the above figures I used number of moments=3(default) and default moments. can anyone please let me know where and how these default moments are calculated?

mzingl commented 9 years ago

Your tailfit parameters are probably not ok. If you say that the self energy becomes very noisy after n=90, then try fit_min_n = 40 and fit_max_n = 90. Set fit_n_moments to 4 or 5. Look again at your self energy. Keep always in mind that you should adjust those parameters if you change the number of measurements.

Soumeniisc commented 9 years ago

After single sort LDA+DMFT itaration I plotted the band structure band width increased instead of decrease.

after LDA+DMFT srvo afte LDA only srvo_lda


i run the following command to get the band structure x lapw1 -band x lapw2 -band -qtl x spagetti gv spaggeti_sp U = 3.5 J = 0.68 beta = 40 energy after single shot LDA+DMFT(with 10 dmft iteration) :ENE : ****** TOTAL ENERGY IN Ry = -8710.45826551 :ENE : ****** TOTAL ENERGY IN Ry = -8710.45827174 :ENE : ****** TOTAL ENERGY IN Ry = -8710.45914720(energy after LDA+DMFT) DCenerg,correnerg,chemical_potential= 0.181868442213, 0.357777562245, -0.547734503006 self_energy_after_10_dmft_iteration self_energy_after_10_dmft_iteration

aichhorn commented 9 years ago

???? What does your message mean?

Soumeniisc commented 9 years ago

Pls have a look at complete edited version

aichhorn commented 9 years ago

Oh, you try to plot the band structure like this? That does not work. What you are plotting is a modified LDA band structure, not the LDA+DMFT correlated band structure. Please go to the documentation http://ipht.cea.fr/triqs/applications/dft_tools/documentation.html to see how this has to be done, see section 'Tools for analysis'. It involves an analytic continuation of your self energies to the REAL frequency axis, which is NOT part of TRIQS!!!!

Soumeniisc commented 9 years ago

Oh i see, Thanks but I think for the recent version of triqs, documentation is not updated yet beacuse SK.check_input_dos(om_min, om_max, n_om) function is not working.

mzingl commented 9 years ago

check_input_dos() is now called dos_wannier_basis(). This function gives you the DOS in the Wannier basis. There is another function called dos_parproj_basis() which replaces dos_partial() and calculates the orbital resolved correlated DOS. However, you need to obtain a self energy on the real axis first! And yes you are right - we are currently working on the documentation...

Soumeniisc commented 9 years ago

1> dos_wannier_basis() routines is not without real-frequency self energy. am i correct?? i am confussed because in documentation it's corresponding function is in without real-frequency self energy section but Sumk_dft_tool.py shows its need ReSigma. 2> Apart from band narrowing what are the other things should i look at to confirm that calculation is physical.

mzingl commented 9 years ago

1> No, just use with_Sigma=False as argument. However, what you really want to use is dos_parproj_basis and spaghetti to get your DFT+DMFT DOS and bandstructure. Here you need a real-frequency self energy!
2> This a very general question. In principle your band structure will be "smeared out" (no discrete bands...) and your DOS will be quite different from the DFT one. Just have a look at papers with plots of DFT+DMFT results. You will find plenty of them out ....

Soumeniisc commented 9 years ago

Hi Thanks this time command "x lapw2 -almd -band" giving "FERMI ERROR!" Error in LAPW2 'FERMI' - number of k-points inconsistent when reading kgen

'FERMI' - check IN1 and KGEN files!

the steps that i followed: x lapw0 (worked) x lapw1 -band (worked) x lapw2 -almd -band (FERMI ERROR!) but ...

x lapw2 -band -qtl (worked)

Any suggestion?? please let me know if any file need to be shared.

pseth commented 9 years ago

I had this problem some time ago -- my solution is as follows:

1) x lapw1 -band 2) edit in2 file: replace 'TOT' with 'QTL', 'TETRA' with 'ROOT' 3) x lapw2 -almd -band 4) dmftproj -band (add the fermi energy to file, it can be found by running grep :FER *.scf)

Let me know if that works.

Soumeniisc commented 9 years ago

thanks, it worked but

1>

when i did "dmftproj -band" WARNING : An eigenvalue ( 1) of the overlap matrix is almost zero. The result of the calculation may thus be wrong.

At line 208 of file /home/soumen/recent_triqs/23_03_15/dft_tools-master/fortran/dmftproj/orthogonal.f Fortran runtime error: End of file


2> for band calculation i need to add one more line if mpi.is_master_node(): Converter = Wien2kConverter(filename=dft_filename, repacking=True) Converter.convert_dft_input() Converter.convert_bands_input() is it correct??

Soumeniisc commented 9 years ago

Hi,

I have attaced plots for Dos of SRVO3 , Where U = 3.5 and J = 0.68 case1: with out sigma dos_with_out_sigma case2: with sigma dos_with_sigma

It clearly shows that lower and upper hubbard band is apeared. In the quasiparticle region band width is decreased(from 3 to 2). 1> Will it be considered as band narrowing??? 2> I have no idea why DOS is coming to be negative?? 3> according to R. SAKUMA, PH. WERNER, AND F. ARYASETIAWAN PHYSICAL REVIEW B 88, 235110 (2013) , dos need a little shift... arwistewin_paper

Can anyone please help????

Thanks ,

mzingl commented 9 years ago

Do you use the newest version of dft_tools? I think the wrong sign was a bug, which should be corrected since a while.

Soumeniisc commented 9 years ago

Thanks ,

it worked