else:
		print "No old file."
		print 
		Delt = 0.5 *1j*(oms_f_log-sqrt(oms_f_log**2+1)) #1/4*G
		Delta = ftn_to_array(oms_f_log,Delt)
	
###############self-consistent loop################
	p_ener = 0.0
	for itt in range(Nitt):
		savetxt("Delta.dat."+str(itt),Delta)
		if itt!=0:
			savetxt("Gloc.dat."+str(itt),Glocal)
		(Sigs,Sigs_regular, n_imp, TrSigmaG) = \
				ctqmc.Run(U, mu, oms_f, oms_ind, Delta,Mstep)
		ctqmc.copyfiles(itt)

		EU = TrSigmaG # = 1/2*Tr(Sigma*G)
		Ekin = Cmp_Ekin_Sigma(Sigs_regular)
		Etotal = Ekin+EU
		print 
		print "itt= ",itt
		print "Ekin= %2.4f" %Ekin
		print "EU= %2.4f" %EU
		print "Etotal= %2.4f" %Etotal
		print "nf= %2.4f" %(n_imp/2)
		print "U= %2.4f mu= %2.4f T= %2.4f Etotal= %2.4f" %(U,mu,1/beta,Etotal)
		
		#New Delta
		Delta,Glocal = Cmp_Gloc_Delta(Sigs)
            else:
                Sigs_site[isite] = Sig_ins  # half with insulating sols

        Delta_site = Cmp_Delta_site(Sigs_site)
        # savetxt('Delta_1.dat',Delta_site[0])
        # savetxt('Delta_2.dat',Delta_site[1])
        ##check point 8/10/2015##
        # sys.exit()

    ###############self-consistent loop################
    ctqmc = IMP(nom, Nsite, beta)
    p_ener = 0.0
    for itt in range(Nitt):
        for isite in range(Nsite):
            Delta = Delta_site[isite]

            (Sigs, Sigs_regular, n_imp, TrSigmaG) = ctqmc.Run(U, mu, oms_f, oms_ind, isite, Delta, Mstep)
            ctqmc.copyfiles(isite, itt)
            Sigs_site[isite] = Sigs

            EU = TrSigmaG  # = 1/2*Tr(Sigma*G)
            print
            print "index= ", itt, isite
            print "EU= %2.7f" % EU
            print "nf= %2.7f" % (n_imp / 2)
            print
            # print "U= %2.6f mu= %2.6f T= %2.6f Etotal= %2.6f" %(U,mu,1/beta,Etotal)

            # New Delta
        Delta_site = Cmp_Delta_site(Sigs_site, itt)