Exemplo n.º 1
0
 def __init__(self,
              width=6,
              length=10,
              boundary="open",
              holes=[],
              ledge=1.,
              graphene=None,
              hopping=1.0,
              coulomb=1.3,
              spincoupling=0.1,
              Ed=1.0,
              vibration=40.0,
              ssh=3.5):
     if (graphene == None):
         self.__g = grap.graphene(width, length, boundary, holes, ledge)
     else:
         self.__g = graphene
     self.__t0 = hopping
     self.__U = coulomb
     self.__J = spincoupling
     self.__ed = Ed
     self.__omg = vibration
     self.__alp = ssh
     self.__osc = sum(
         map(lambda x: reduce(self.g.ddispm, x)**2, self.g.lslinks('1d')))
     self.__nd = self.g.ndanglingc()
     self.__nc = self.g.nvertex()
     self.__dim = self.__nc  # + self.__nd
     self.__lstij = array(
         map(lambda x: map(self.p2i, x), self.g.lslinks('1d')))
Exemplo n.º 2
0
   def __init__(self,width=6,length=10,boundary="open",holes=[],ledge=1.,
			graphene=None, hopping=1.0,coulomb=1.3,
			spincoupling=0.1, Ed=1.0, vibration=40.0, ssh=3.5 ):
      if(graphene==None):
	self.__g = grap.graphene(width,length,boundary,holes,ledge)
      else:
	self.__g = graphene
      self.__t0 = hopping
      self.__U = coulomb
      self.__J = spincoupling
      self.__ed = Ed
      self.__omg = vibration
      self.__alp = ssh
      self.__osc = sum(
			map(lambda x:reduce(self.g.ddispm,x)**2,
						self.g.lslinks('1d')))
      self.__nd = self.g.ndanglingc()
      self.__nc = self.g.nvertex()
      self.__dim = self.__nc# + self.__nd
      self.__lstij = array(map( lambda x:map(self.p2i,x), self.g.lslinks('1d') ))
Exemplo n.º 3
0
from os import listdir
from graphene import graphene
from datrendering import *

T = 0.1
g = graphene(width=4, length=5, boundary='o', holes=[11])

ddir = 'data/' + datname(T, g)

fl = listdir(ddir)
fl.sort()
dd = drender(ddir, fl)
i, d, n, en, a = dd.next()
totspin = sum(n[0] - n[1]) / 2.
print totspin
print en
Exemplo n.º 4
0
from graphene import graphene
from drawing import *
from edensity import *
#import graphene
#import drawing
#import pp
a = graphene(width=15,length=30,boundary='z',holes=[[7,12]])
print "size:",a.size(1)
print "holes:",a.holes('2d')
#print "lined hole-pairs:", a.linedholepairs(a.line)
print "dvertex:",a.dvertex('2d')
print "danglingc:",a.danglingc('2d')
print "ndvertex:",a.ndvertex()
print "pbn of hole:",a.pbneighb([0,5])
print "nlines:",a.nlines()
b = a.lslines()
print "len(lslines()):",len(b)
#drawhoneycomb(a,output="h.eps")
#drawgraphene(a,output="g.eps")
'''ppservers=()
ncpus=6
job_server = pp.Server(ncpus,ppservers=ppservers)
job = job_server.submit(drawhoneycomb,(a,'g-','a.eps'),(jmultp,jtwop,savefig),("graphene","drawing","pylab","numpy"))
print job()
job_server.print_stats()'''
a._displace(0,[0.1,0.1])
from hamiltonian import ham
print "h = ham(graphene=a)"
h = ham(graphene=a)
print "h.g.size(1)",h.g.size(1)
print "h.osc",h.osc
Exemplo n.º 5
0
from os import listdir
from graphene import graphene
from datrendering import *

T = 1.
g = graphene(width=10,length=21,boundary='o',holes=[115])

ddir = 'data/' + datname(T,g)

fl = listdir(ddir)
fl.sort()
dd = drender(ddir,fl)
for tmp in dd:
   if(tmp[0]==0):
      i, d, n, en, a = tmp
   else:
      i = tmp[0]
      d += tmp[1]
      n += tmp[2]
      en += tmp[3]
      a += tmp[4]

c = i + 1.0

d /= c
n /= c
en /= c
a /= c
totspin = sum(n[0]-n[1])/2.
print totspin
print en
Exemplo n.º 6
0
from os import listdir
from graphene import graphene
from datrendering import *

T = 1.
g = graphene(width=10, length=21, boundary='o', holes=[115])

ddir = 'data/' + datname(T, g)

fl = listdir(ddir)
fl.sort()
dd = drender(ddir, fl)
for tmp in dd:
    if (tmp[0] == 0):
        i, d, n, en, a = tmp
    else:
        i = tmp[0]
        d += tmp[1]
        n += tmp[2]
        en += tmp[3]
        a += tmp[4]

c = i + 1.0

d /= c
n /= c
en /= c
a /= c
totspin = sum(n[0] - n[1]) / 2.
print totspin
print en
Exemplo n.º 7
0
from os import listdir
from graphene import graphene
from datrendering import *

T = 0.1
g = graphene(width=4,length=5,boundary='o',holes=[11])

ddir = 'data/' + datname(T,g)

fl = listdir(ddir)
fl.sort()
dd = drender(ddir,fl)
i, d, n, en, a = dd.next()
totspin = sum(n[0]-n[1])/2.
print totspin
print en
Exemplo n.º 8
0
from graphene import graphene
from drawing import *
from edensity import *
#import graphene
#import drawing
#import pp
a = graphene(width=15, length=30, boundary='z', holes=[[7, 12]])
print "size:", a.size(1)
print "holes:", a.holes('2d')
#print "lined hole-pairs:", a.linedholepairs(a.line)
print "dvertex:", a.dvertex('2d')
print "danglingc:", a.danglingc('2d')
print "ndvertex:", a.ndvertex()
print "pbn of hole:", a.pbneighb([0, 5])
print "nlines:", a.nlines()
b = a.lslines()
print "len(lslines()):", len(b)
#drawhoneycomb(a,output="h.eps")
#drawgraphene(a,output="g.eps")
'''ppservers=()
ncpus=6
job_server = pp.Server(ncpus,ppservers=ppservers)
job = job_server.submit(drawhoneycomb,(a,'g-','a.eps'),(jmultp,jtwop,savefig),("graphene","drawing","pylab","numpy"))
print job()
job_server.print_stats()'''
a._displace(0, [0.1, 0.1])
from hamiltonian import ham
print "h = ham(graphene=a)"
h = ham(graphene=a)
print "h.g.size(1)", h.g.size(1)
print "h.osc", h.osc