Beispiel #1
0
if size > 0 and rank == 0: print '\n[MPI init]'
comm.Barrier()
print ' Rank= %s of %s processes' % (rank, size)

mol = class_molinfo()
mol.comm = comm
fname = "mole.h5"
mol.loadHam(fname)
mol.isym = 0  #2 #WhetherUseSym
mol.symSz = 0  #1 #TargetSpin-2*Sz
mol.symS2 = 0.0  #Total Spin
# Tempory file will be put to this dir
mol.tmpdir = './'
mol.build()

dmrg2 = mpo_dmrg_class.mpo_dmrg()
dmrg2.nsite = mol.sbas / 2
dmrg2.sbas = mol.sbas
dmrg2.isym = 2
dmrg2.build()
dmrg2.comm = mol.comm
dmrg2.qsectors = {str([mol.nelec, sz]): 1}
#---------------------------
if ifs2proj:
    dmrg2.ifs2proj = True
    dmrg2.npts = 4
    dmrg2.s2quad(sval, sz)
#---------------------------
mol.build()
dmrg2.path = mol.path
dmrg2.ifQt = True
Beispiel #2
0
mol.loadHam(fname)

# To be changed.
mol.tmpdir ="/scratch/global/zhendong/spmps_oec1/"
mol.build()

# To be set manually
nelec = 10
sval = 4
sz = 4
conf = [1,1]+[1,0,]*8+[0,0]

################################
# 0. Initialize an MPS(N,Sz) 
################################
dmrg = mpo_dmrg_class.mpo_dmrg()
dmrg.occun = numpy.array(conf)
dmrg.const = mol.ecor
dmrg.path = mol.path
dmrg.nsite = mol.sbas/2
dmrg.sbas  = mol.sbas
dmrg.isym = 2
dmrg.build()
dmrg.comm = mol.comm
dmrg.qsectors = {str([nelec,sz]):1} 
sc = mpo_dmrg_schedule.schedule()
sc.fixed(maxM=1,maxiter=0)
sc.prt()
dmrg.partition()
dmrg.loadInts(mol)
dmrg.dumpMPO()