# # ALPS Project: Algorithms and Libraries for Physics Simulations # # ALPS Libraries # # Copyright (C) 2010 by Brigitte Surer # 2012-2013 by Jakub Imriska # # ALPS Project: https://alps.comp-phys.org/ # SPDX-License-Identifier: MIT # # **************************************************************************** import pyalps import numpy as np import matplotlib.pyplot as plt import pyalps.plot #prepare the input parameters parms=[] for u in [4.,5.,6.,8.]: parms.append( { 'ANTIFERROMAGNET' : 0, 'CONVERGED' : 0.001, 'FLAVORS' : 2, 'H' : 0, 'H_INIT' : 0., 'MAX_IT' : 20, 'MAX_TIME' : 600, 'MU' : 0, 'N' : 500, 'NMATSUBARA' : 500, 'N_MEAS' : 1000, 'N_HISTOGRAM_ORDERS' : 50, 'OMEGA_LOOP' : 1, 'SEED' : 0, 'SITES' : 1, 'SOLVER' : 'hybridization', 'SC_WRITE_DELTA' : 1, 'SYMMETRIZATION' : 1, 't' : 1, 'SWEEPS' : 1500*u, 'BETA' : 20.0, 'THERMALIZATION' : 500, 'U' : u } ) # For more precise calculations change the parameters # enlarge SWEEPS, # CONVERGED (to 0.0002-0.001), # raise N and NMATSUBARA (to 1000) #write the input file and run the simulation for p in parms: input_file = pyalps.writeParameterFile('parm_u_'+str(p['U']),p) res = pyalps.runDMFT(input_file) listobs=['0'] # we look at only one flavor, as they are SYMMETRIZED data = pyalps.loadMeasurements(pyalps.getResultFiles(pattern='parm_u_*h5'), respath='/simulation/results/G_tau', what=listobs, verbose=True) for d in pyalps.flatten(data): d.x = d.x*d.props["BETA"]/float(d.props["N"]) d.y = -d.y d.props['label'] = r'$U=$'+str(d.props['U']) plt.figure() plt.yscale('log') plt.xlabel(r'$\tau$') plt.ylabel(r'$G_{flavor=0}(\tau)$') plt.title('DMFT-04: Mott-insulator transition for the Hubbard model on the Bethe lattice') pyalps.plot.plot(data) plt.legend() plt.show()