def plot_d(axis='real', beta=1e3, u_int=np.array([2., 4., 5.85, 6., 8., 10., 100.])): fig = plt.figure() for u in u_int: out_file = axis + '_dop_b{}_U{}'.format(beta, u) try: res = np.load(out_file + '.npy') except IOError: res = dmft_loop_dop(u) np.save(out_file, res) d = [sim.double_ocupation() for sim in res[:, 1]] plt.plot(res[:, 0], d, '+-', label='$U/t= {}$'.format(u)) plt.legend(loc=0) plt.title('Impurity double occupation at $\\beta={}$'.format(beta)) plt.ylabel('$\\langle n_\\uparrow n_\\downarrow \\rangle$') plt.xlabel('n') plt.xlim([0, 1]) fig.savefig(out_file + '_b.png', format='png', transparent=False, bbox_inches='tight', pad_inches=0.05)
def plot_z(axis='real', beta=1e3, u_int=[2., 4., 5.85, 6., 8., 10., 100.]): fig = plt.figure() for u in u_int: out_file = axis + '_dop_b{}_U{}'.format(beta, u) try: res = np.load(out_file + '.npy') except IOError: res = dmft_loop_dop(u) np.save(out_file, res) zet = [sim.imp_z() for sim in res[:, 1]] plt.plot(res[:, 0], zet, '+-', label='$U/t= {}$'.format(u)) plt.legend(loc=0) plt.title( 'Quasiparticle weigth, estimated in real freq at $\\beta={}$'.format( beta)) plt.ylabel('Z') plt.xlabel('n') plt.xlim([0, 1]) fig.savefig(out_file + '_Z.png', format='png', transparent=False, bbox_inches='tight', pad_inches=0.05)
def plot_doping_param(axis='real', beta=1e3, u_int=[4.]): for u in u_int: out_file = axis+'_dop_b{}_U{}'.format(beta, u) try: res = np.load(out_file+'.npy') except IOError: res = dmft_loop_dop(u) np.save(out_file, res) doping_config(res, u, out_file)
def plot_doping_param(axis='real', beta=1e3, u_int=[4.]): for u in u_int: out_file = axis + '_dop_b{}_U{}'.format(beta, u) try: res = np.load(out_file + '.npy') except IOError: res = dmft_loop_dop(u) np.save(out_file, res) doping_config(res, u, out_file)
def test_doping(): e_c_ref = np.array([-0.98093, -0.23627, 0.38745, 0.95069, 1.48207]) V_ref = np.array([0.96091, 0.92330, 0.87213, 0.81438, 0.76532]) n_ref = np.array([0.39486, 0.54847, 0.69036, 0.81363, 0.91498]) res = dmft_loop_dop(u_int=4, mu=[-.5, 0, 0.5, 1, 1.5]) e_c = [sim.e_c for sim in res[:, 1]] V = [sim.hyb_V() for sim in res[:, 1]] n = [sim.ocupations().sum() for sim in res[:, 1]] for ref, test in zip([e_c_ref, V_ref, n_ref], [e_c, V, n]): print(np.abs(ref - test)) assert np.allclose(ref, test, atol=5e-5)
def test_doping(): e_c_ref = np.array([-0.98093, -0.23627, 0.38745, 0.95069, 1.48207]) V_ref = np.array([0.96091, 0.92330, 0.87213, 0.81438, 0.76532]) n_ref = np.array([0.39486, 0.54847, 0.69036, 0.81363, 0.91498]) res = dmft_loop_dop(u_int=4, mu=[-.5, 0, 0.5, 1, 1.5]) e_c = [sim.e_c for sim in res[:, 1]] V = [sim.hyb_V() for sim in res[:, 1]] n = [sim.ocupations().sum() for sim in res[:, 1]] for ref, test in zip([e_c_ref, V_ref, n_ref], [e_c, V, n]): print(np.abs(ref-test)) assert np.allclose(ref, test, atol=5e-5)
def plot_z(axis='real', beta=1e3, u_int=[2., 4., 5.85, 6., 8., 10., 100.]): fig = plt.figure() for u in u_int: out_file = axis+'_dop_b{}_U{}'.format(beta, u) try: res = np.load(out_file+'.npy') except IOError: res = dmft_loop_dop(u) np.save(out_file, res) zet = [sim.imp_z() for sim in res[:, 1]] plt.plot(res[:, 0], zet, '+-', label='$U/t= {}$'.format(u)) plt.legend(loc=0) plt.title('Quasiparticle weigth, estimated in real freq at $\\beta={}$'.format(beta)) plt.ylabel('Z') plt.xlabel('n') plt.xlim([0, 1]) fig.savefig(out_file+'_Z.png', format='png', transparent=False, bbox_inches='tight', pad_inches=0.05)
def plot_d(axis='real', beta=1e3, u_int=np.array([2., 4., 5.85, 6., 8., 10., 100.])): fig = plt.figure() for u in u_int: out_file = axis+'_dop_b{}_U{}'.format(beta, u) try: res = np.load(out_file+'.npy') except IOError: res = dmft_loop_dop(u) np.save(out_file, res) d = [sim.double_ocupation() for sim in res[:, 1]] plt.plot(res[:, 0], d, '+-', label='$U/t= {}$'.format(u)) plt.legend(loc=0) plt.title('Impurity double occupation at $\\beta={}$'.format(beta)) plt.ylabel('$\\langle n_\\uparrow n_\\downarrow \\rangle$') plt.xlabel('n') plt.xlim([0, 1]) fig.savefig(out_file+'_b.png', format='png', transparent=False, bbox_inches='tight', pad_inches=0.05)