Closed fatima2000 closed 10 years ago
I think this has already been discussed before, you may want to check the discussion here:
Dear Leonid,
Thanks for your previous helps,
As you said I deleted the old .h5 before restarting calculations with the new script but again I confronted another error.
The error is:
Solver has not yet converged
Mixing Sigma and G with factor 0.7
DC for shell 0 and block up = 2.991580
DC for shell 0 and block down = 2.991580
DC energy for shell 0 = 1.69139343302 Traceback (most recent call last):
File "SrVO3.py", line 122, in
correnerg = 0.5 * (S.G \
File
"/usr/local/codes/dmftproj/triqs_build/INSTALL_DIR/lib/python2.7/site-packages/pytriqs/Base/GF_Local/GF.py", line 356, in total_density
return sum([ g.total_density() for i,g in self ]).real
File
"/usr/local/codes/dmftproj/triqs_build/INSTALL_DIR/lib/python2.7/site-packages/pytriqs/Base/GF_Local/_GFBloc_concept_impl.py",
line 157, in total_density
return numpy.trace(self.density())
RuntimeError: Triqs runtime error at
/usr/local/codes/dmftproj/TRIQS-TRIQS-6f4c392/pytriqs/Base/GF_Local/C++/GF_Bloc_ImFreq.cpp : 47
Trace is:
/usr/local/codes/dmftproj/triqs_build/pytriqs/Base/GF_Local/libLocalGreenFunction_c.so GF_Bloc_ImFreq::density() const 0x19f8 [0x2b40642133b8] /usr/local/codes/dmftproj/triqs_build/INSTALL_DIR/lib/python2.7/site-packages/pytriqs/Base/GF_Local/_pytriqs_GF.so boost::python::objects::caller_py_function_implboost::python::detail::caller<PyArray<std::complex<double,
2> (GF_BlocImFreq::)() const, boost::python::default_call_policies, boost::mpl::vector2<PyArray<std::complex
/usr/local/codes/dmftproj/triqs_build/foreignlibs/boost/libboost_for_triqs.so boost::python::objects::function::call(object, object) const 0x1af [0x2b4061763edf] /usr/local/codes/dmftproj/triqs_build/foreignlibs/boost/libboost_for_triqs.so 0xe6138 [0x2b4061764138] /usr/local/codes/dmftproj/triqs_build/foreignlibs/boost/libboost_for_triqs.so boost::python::detail::exception_handler::operator()(boost::function0
what should I do now? Thank you for your help.
It seems your Green's function does not have a correct asymptotic behavior. If you still have the problem could you post here the actual script you have been using?
Thanks for your previous guidance, Note that, I've done LDA + DMFT calculation for the Ce-gamma with Hubbard-I solver, now want to do LDA + DMFT calculations for combination SrVO3 with CT-QMC solver but Unfortunately, the script is not correct for SrVO3.py And is not fully executed. Do I need to have another script or procedures of the Ce-gamma calculations with the Hubbard-I solver is done differently? and this is the script I used for SrVO3.py:
from pytriqs.Wien2k.SumK_LDA import from pytriqs.Wien2k.SumK_LDA_Wien2k_input import from pytriqs.Wien2k.Solver_MultiBand import from pytriqs.Base.GF_Local import from pytriqs.Base.Archive.HDF_Archive import * LDAFilename='srvo3' U = 2.7 J = 0.65 Beta = 40 Loops = 10 # Number of DMFT sc-loops Mix = 1.0 # Mixing factor of Sigma after solution of the AIM DeltaMix = 1.0 # Mixing factor of Delta as input for the AIM DC_type = 1 # DC type: 0 FLL, 1 Held, 2 AMF useBlocs = True # use bloc structure from LDA input useMatrix = False # True: Slater parameters, False: Kanamori parameters U+2J, U, U-J use_spinflip = False # use the full rotational invariant interaction? prec_mu = 0.0001 QMCcycles = 20000 Length_cycle = 200 Warming_iterations = 2000 Converter = SumK_LDA_Wien2k_input(Filename=LDAFilename,repacking=True) Converter.convert_DMFT_input() MPI.barrier() previous_runs = 0 previous_present = False if MPI.IS_MASTER_NODE(): ar = HDF_Archive(LDAFilename+'.h5','a') if 'iterations' in ar: previous_present = True previous_runs = ar['iterations'] del ar previous_runs = MPI.bcast(previous_runs) previous_present = MPI.bcast(previous_present)
calc_blocs = useBlocs and (not previous_present) SK=SumK_LDA(HDFfile=LDAFilename+'.h5',UseLDABlocs=calc_blocs)
Norb = SK.corr_shells[0][3] l = SK.corr_shells[0][2] S=Solver_MultiBand(Beta=Beta,U_interact=U,J_Hund=J,Norb=Norb,useMatrix=useMatrix, T=SK.T[0] ,GFStruct=SK.GFStruct_Solver[0],map=SK.map[0], l=l, deg_orbs=SK.deg_shells[0], use_spinflip=use_spinflip)
S.N_Cycles = QMCcycles S.Length_Cycle = Length_cycle S.N_Warmup_Cycles = Warming_iterations if (previous_present): if (MPI.IS_MASTER_NODE()): ar = HDF_Archive(LDAFilename+'.h5','a') S.Sigma <<= ar['SigmaF'] del ar S.Sigma = MPI.bcast(S.Sigma) for IterationNumber in range(1,Loops+1) :
SK.symm_deg_GF(S.Sigma,orb=0) # symmetrise Sigma
SK.put_Sigma(Sigmaimp = [ S.Sigma ]) # put Sigma into the SumK class:
Chemical_potential = SK.find_mu( precision = prec_mu ) # find the chemical potential
S.G <<= SK.extract_Gloc()[0] # calculation of the local Green function
MPI.report("Total charge of Gloc : %.6f"%S.G.total_density())
if ((IterationNumber==1)and(previous_present==False)):
# Init the DC term and the real part of Sigma, if no previous run was found:
dm = S.G.density()
SK.SetDoubleCounting( dm, U_interact = U, J_Hund = J, orb = 0, useDCformula = DC_type)
S.Sigma <<= GF_Initializers.Const(SK.dc_imp[0]['up'][0,0])
# now calculate new G0:
if (MPI.IS_MASTER_NODE()):
# We can do a mixing of Delta in order to stabilize the DMFT iterations:
S.G0 <<= S.Sigma + inverse(S.G)
ar = HDF_Archive(LDAFilename+'.h5','a')
if ((IterationNumber>1) or (previous_present)):
MPI.report("Mixing input Delta with factor %s"%DeltaMix)
Delta = (DeltaMix * S.G0.Delta()) + (1.0-DeltaMix) * ar['DeltaF']
S.G0 <<= S.G0 + S.G0.Delta() - Delta
ar['DeltaF'] = S.G0.Delta()
S.G0 <<= inverse(S.G0)
del ar
S.G0 = MPI.bcast(S.G0)
# Solve the impurity problem:
S.Solve()
# solution done, do the post-processing:
MPI.report("Total charge of impurity problem : %.6f"%S.G.total_density())
# Now mix Sigma and G with factor Mix, if wanted:
if ((IterationNumber>1) or (previous_present)):
if (MPI.IS_MASTER_NODE()):
ar = HDF_Archive(LDAFilename+'.h5','a')
MPI.report("Mixing Sigma and G with factor %s"%Mix)
S.Sigma <<= Mix * S.Sigma + (1.0-Mix) * ar['SigmaF']
S.G <<= Mix * S.G + (1.0-Mix) * ar['GF']
del ar
S.G = MPI.bcast(S.G)
S.Sigma = MPI.bcast(S.Sigma)
# Write the final Sigma and G to the hdf5 archive:
if (MPI.IS_MASTER_NODE()):
ar = HDF_Archive(LDAFilename+'.h5','a')
ar['iterations'] = previous_runs + IterationNumber
ar['SigmaF'] = S.Sigma
ar['GF'] = S.G
del ar
# Now set new double counting:
dm = S.G.density()
SK.SetDoubleCounting( dm, U_interact = U, J_Hund = J, orb = 0, useDCformula = DC_type)
#Save stuff:
SK.save()
Kind regards.
The script looks fine. What does it mean, 'is not correct' and 'is not fully executed'. Where is the problem?
No answer for 2 months. Closing.,
Hi, I would like to use the Hubbard-I solver on SrVO3 .I tried using Ce-gamma.py script.
this is the script I used for SrVO3.indmftpr
3 ! Nsort
1 1 I would like to use the Hubbard-I solver on SrVO3 .I tried using Ce-gamma.py script.3 !Mult(isrt)
3 ! lmax
complex
1 0 0 0 ! l included for each sort
0 0 0 0 ! l included for each sort
cubic
1 1 2 0 ! l included for each sort
0 0 2 0 ! l included for each sort
01 ! t2g Wannier function will be constructed
0 ! no spin-orbit
cubic
1 1 0 0 ! l included for each sort
0 0 0 0 ! l included for each sort
-0.075 0.14 ! Energy window relative to E_f
0.59953
and this is the script I used for SrVO3.py:
from pytriqs.Wien2k.SumK_LDA import from pytriqs.Wien2k.SumK_LDA_Wien2k_input import from pytriqs.Solvers.HubbardI.Solver_HubbardI import Solver_HubbardI
LDAFilename = 'SrVO3' Beta = 40 Uint = 2.70 JHund = 0.70 Loops = 3 # Number of DMFT sc-loops Mix = 0.7 # Mixing factor in QMC DC_type = 0 # 0...FLL, 1...Held, 2... AMF, 3...Lichtenstein DC_Mix = 1.0 # 1.0 ... all from imp; 0.0 ... all from Gloc
useBlocs = False # use bloc structure from LDA input useMatrix = True # use the U matrix calculated from Slater coefficients instead of (U+2J, U, U-J)
HDFfilename = LDAFilename+'.h5'
Convert DMFT input:
Can be commented after the first run
Converter = SumK_LDA_Wien2k_input(Filename=LDAFilename,repacking=False) Converter.convert_DMFT_input()
check if there are previous runs:
previous_runs = 0 previous_present = False
if MPI.IS_MASTER_NODE(): ar = HDF_Archive(HDFfilename,'a') if 'iterations' in ar: previous_present = True previous_runs = ar['iterations'] else: previous_runs = 0 previous_present = False del ar
MPI.barrier() previous_runs = MPI.bcast(previous_runs) previous_present = MPI.bcast(previous_present)
Init the SumK class
SK=SumK_LDA(HDFfile=LDAFilename+'.h5',UseLDABlocs=False)
Norb = SK.corr_shells[0][3] l = SK.corr_shells[0][2]
Init the Solver:
S = Solver_HubbardI(Beta = Beta, Uint = Uint, JHund = JHund, l = l, Verbosity=2) S.Nmoments=10
if (previous_present):
load previous data:
MPI.report("Using stored data for initialisation") if (MPI.IS_MASTER_NODE()): ar = HDF_Archive(HDFfilename,'a') S.Sigma <<= ar['SigmaF'] del ar S.Sigma = MPI.bcast(S.Sigma) SK.load()
DMFT loop:
for Iteration_Number in range(1,Loops+1): itn = Iteration_Number + previous_runs
SK.SetDoubleCounting( dm, U_interact = Uint, J_Hund = JHund, orb = 0, useDCformula = DC_type)
find exact chemical potential
if (SK.Density_Required): SK.Chemical_potential = SK.find_mu( precision = 0.000001 ) dN,d = SK.calc_DensityCorrection(Filename = LDAFilename+'.qdmft')
MPI.report("Trace of Density Matrix: %s"%d)
correlation energy:
if (MPI.IS_MASTER_NODE()): ar = HDF_Archive(HDFfilename) itn = ar['iterations'] correnerg = ar['correnerg%s'%itn] DCenerg = ar['DCenerg%s'%itn] del ar correnerg -= DCenerg[0] f=open(LDAFilename+'.qdmft','a') f.write("%.16f\n"%correnerg) f.close()
The error message I got is:
Starting on 1 Nodes at : 2013-05-14 06:10:38.033072
Reading input from SrVO3.ctqmcout...
Reading symmetry input from SrVO3.symqmc...
Traceback (most recent call last):
File "SrVO3.py", line 67, in
File
"/usr/local/codes/dmftproj/triqs_build/INSTALL_DIR/lib/python2.7/site-packages/pytriqs/Wien2k/SumK_LDA.py",
line 806, in put_Sigma
self.Sigmaimp[icrsh][self.mapinv[s][bl]][ind1,ind2] <<= Sigmaimp[s][bl][ind1,ind2]
File
"/usr/local/codes/dmftproj/triqs_build/INSTALL_DIR/lib/python2.7/site-packages/pytriqs/Base/GF_Local/GF.py",
line 227, in getitem
raise IndexError, "bloc index '" + repr(key) + "' incorrect. Possible indices are : "+
repr(self.__Indices)
IndexError: bloc index ''up0'' incorrect. Possible indices are : ['up', 'down']
can you help me?
thank you