예제 #1
0
파일: dmft.py 프로젝트: kirkzzm/iqist
def do_dmft_loop(mfreq, norbs, grnf):
    """ implement the DMFT self-consistent condition for bethe lattice
    """
    size_t = mfreq * norbs * norbs
    grnf_t = numpy.reshape(grnf, (mfreq, norbs, norbs), order='F')
    part = 0.25
    hybf_t = grnf_t * part * part
    return numpy.reshape(hybf_t, size_t, order='F')


# get mpi communicator
comm = MPI.COMM_WORLD

# check the status of ctqmc impurity solver
if ctqmc.cat_solver_id() == 102:
    if comm.rank == 0:
        print "Hello world! This is the GARDENIA code."
else:
    if comm.rank == 0:
        print "Where is the GARDENIA code?"
    sys.exit(-1)
if ctqmc.cat_solver_status() != 1:
    print "I am sorry. This ctqmc impurity solver is not ready."
    sys.exit(-1)

# mpi barrier
comm.Barrier()

# setup parameters
mfreq = 8193  # number of matsubara frequency points
예제 #2
0
    grnf_t = numpy.reshape(grnf, (mfreq, norbs, norbs), order='F')
    hybf_t = grnf_t * 0.0
    part_1 = 1.0
    part_2 = 2.0
    hybf_t[:, 0, 0] = grnf_t[:, 0, 0] * part_1 * part_1  # band 1, spin up
    hybf_t[:, 1, 1] = grnf_t[:, 1, 1] * part_2 * part_2  # band 2, spin up
    hybf_t[:, 2, 2] = grnf_t[:, 2, 2] * part_1 * part_1  # band 1, spin dn
    hybf_t[:, 3, 3] = grnf_t[:, 3, 3] * part_2 * part_2  # band 2, spin dn
    return numpy.reshape(hybf_t, size_t, order='F')


# get mpi communicator
comm = MPI.COMM_WORLD

# check the status of ctqmc impurity solver
if ctqmc.cat_solver_id() == 201:
    if comm.rank == 0:
        print "Hello world! This is the BEGONIA code."
else:
    if comm.rank == 0:
        print "Where is the BEGONIA code?"
    sys.exit(-1)
if ctqmc.cat_solver_status() != 1:
    print "I am sorry. This ctqmc impurity solver is not ready."
    sys.exit(-1)

# mpi barrier
comm.Barrier()

# prepare the input file
if comm.rank == 0:
예제 #3
0
파일: dmft.py 프로젝트: pistonly/iqist
import pyiqist as ctqmc

def do_dmft_loop(mfreq, norbs, grnf):
    """ implement the DMFT self-consistent condition for bethe lattice
    """
    size_t = mfreq * norbs * norbs
    grnf_t = numpy.reshape(grnf, (mfreq, norbs, norbs), order = 'F')
    part = 0.25
    hybf_t = grnf_t * part * part
    return numpy.reshape(hybf_t, size_t, order = 'F')

# get mpi communicator
comm = MPI.COMM_WORLD

# check the status of ctqmc impurity solver
if ctqmc.cat_solver_id() == 102:
    if comm.rank == 0 :
        print "Hello world! This is the GARDENIA code."
else:
    if comm.rank == 0 :
        print "Where is the GARDENIA code?"
    sys.exit(-1)
if ctqmc.cat_solver_status() != 1 :
    print "I am sorry. This ctqmc impurity solver is not ready."
    sys.exit(-1)

# mpi barrier
comm.Barrier()

# setup parameters
mfreq = 8193 # number of matsubara frequency points
예제 #4
0
파일: dmft.py 프로젝트: pistonly/iqist
    size_t = mfreq * norbs * norbs
    grnf_t = numpy.reshape(grnf, (mfreq, norbs, norbs), order = 'F')
    hybf_t = grnf_t * 0.0
    part_1 = 1.0
    part_2 = 2.0
    hybf_t[:,0,0] = grnf_t[:,0,0] * part_1 * part_1 # band 1, spin up
    hybf_t[:,1,1] = grnf_t[:,1,1] * part_2 * part_2 # band 2, spin up
    hybf_t[:,2,2] = grnf_t[:,2,2] * part_1 * part_1 # band 1, spin dn
    hybf_t[:,3,3] = grnf_t[:,3,3] * part_2 * part_2 # band 2, spin dn
    return numpy.reshape(hybf_t, size_t, order = 'F')

# get mpi communicator
comm = MPI.COMM_WORLD

# check the status of ctqmc impurity solver
if ctqmc.cat_solver_id() == 201:
    if comm.rank == 0 :
        print "Hello world! This is the BEGONIA code."
else:
    if comm.rank == 0 :
        print "Where is the BEGONIA code?"
    sys.exit(-1)
if ctqmc.cat_solver_status() != 1 :
    print "I am sorry. This ctqmc impurity solver is not ready."
    sys.exit(-1)

# mpi barrier
comm.Barrier()

# prepare the input file
if comm.rank == 0: