예제 #1
0
def plot_z(axis='matsubara', du=0.05):
    fig = plt.figure()
    u_int = np.arange(0, 6.2, du)
    for beta in [6, 10, 20, 30, 50, 100, 1e3]:
        out_file = axis + '_halffill_b{}_dU{}'.format(beta, du)
        try:
            res = np.load(out_file + '.npy')
        except IOError:
            res = dmft_loop(u_int, axis, beta=beta, hop=1)
            np.save(out_file, res)

        plt.plot(res[:, 0] / 2,
                 res[:, 1],
                 '+-',
                 label='$\\beta = {}$'.format(beta))

    plt.legend(loc=0)
    plt.title('Quasiparticle weigth, estimated in {} frequencies'.format(axis))
    plt.ylabel('Z')
    plt.xlabel('U/D')
    fig.savefig(out_file + '_Z.png',
                format='png',
                transparent=False,
                bbox_inches='tight',
                pad_inches=0.05)
예제 #2
0
def test_mit(axis, atol):
    """Test the metal to insulator transition at very low temperature"""
    z_ref = np.array([1., 0.88889, 0.75, 0.55556, 0.30556, 0.06556, 0.])
    zet = dmft_loop(u_int=[0, 1, 1.5, 2, 2.5, 2.9, 3.05], axis=axis,
                    beta=1e5, hop=0.5)[:, 1]
    zet = np.array(zet, dtype=np.float)
    print(np.abs(zet - z_ref))
    assert np.allclose(zet, z_ref, atol=atol)
예제 #3
0
def test_mit(axis, atol):
    """Test the metal to insulator transition at very low temperature"""
    z_ref = np.array([1., 0.88889, 0.75, 0.55556, 0.30556, 0.06556, 0.])
    zet = dmft_loop(u_int=[0, 1, 1.5, 2, 2.5, 2.9, 3.05], axis=axis,
                    beta=1e5, hop=0.5)[:, 1]
    zet = np.array(zet, dtype=np.float)
    print(np.abs(zet-z_ref))
    assert np.allclose(zet, z_ref, atol=atol)
예제 #4
0
def plot_z(axis='matsubara', du=0.05):
    fig = plt.figure()
    u_int = np.arange(0, 6.2, du)
    for beta in [6, 10, 20, 30, 50, 100, 1e3]:
        out_file = axis+'_halffill_b{}_dU{}'.format(beta, du)
        try:
            res = np.load(out_file+'.npy')
        except IOError:
            res = dmft_loop(u_int, axis, beta=beta, hop=1)
            np.save(out_file, res)

        plt.plot(res[:, 0]/2, res[:, 1], '+-', label='$\\beta = {}$'.format(beta))

    plt.legend(loc=0)
    plt.title('Quasiparticle weigth, estimated in {} frequencies'.format(axis))
    plt.ylabel('Z')
    plt.xlabel('U/D')
    fig.savefig(out_file+'_Z.png', format='png',
                transparent=False, bbox_inches='tight', pad_inches=0.05)