# terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # TRIQS. If not, see <http://www.gnu.org/licenses/>. # ################################################################################ from pytriqs.base.archive import * from pytriqs.solvers.hubbard_I.solver import Solver import numpy S = Solver(beta=200, U_int=6.0, J_hund=0.6, l=2, use_spin_orbit=False) eal = {} eal["up"] = -1 * numpy.identity(5) eal["down"] = -1 * numpy.identity(5) S.set_atomic_levels(eal=eal) S.Solve() ar = HDFArchive("hubbard.output.h5") ar["G"] = S.G ar["Sigma"] = S.Sigma del ar
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=SumkLDA(hdf_file=LDAFilename+'.h5',use_lda_blocks=False) Norb = SK.corr_shells[0][3] l = SK.corr_shells[0][2] # Init the Solver: S = Solver(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 = HDFArchive(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):
mpi.barrier() previous_runs = mpi.bcast(previous_runs) previous_present = mpi.bcast(previous_present) # if previous runs are present, no need for recalculating the bloc structure # It has to be commented, if you run this script for the first time, starting # from a converted h5 archive. # Init the SumK class SK = SumkLDATools(hdf_file=LDAFilename+'.h5',use_lda_blocks=False) if (mpi.is_master_node()): print 'DC after reading SK: ',SK.dc_imp[SK.invshellmap[0]] N = SK.corr_shells[0][3] l = SK.corr_shells[0][2] # Init the Solver: S = Solver(Beta = Beta, Uint = Uint, JHund = JHund, l = l) S.Nmoments=10 # set atomic levels: eal = SK.eff_atomic_levels()[0] S.set_atomic_levels( eal = eal ) S.GF_realomega(ommin=ommin, ommax = ommax, N_om=N_om) S.Sigma.save('S.Sigma') SK.put_Sigma(Sigmaimp = [S.Sigma]) SK.dos_partial(broadening=broadening)