Example #1
0
def plot_band(alpha,Vz,Delta,t=1.,mu=0.,nsite=100):
    '''
    show the meanfield band.
    '''
    model=RashbaModel(U=0.,alpha=alpha,Vz=Vz,Delta=Delta,t=t,mu=mu,nsite=nsite,periodic=True,kspace=True)
    hgen=model.hgen
    kl=hgen.kspace.kmesh-pi
    hkmesh=hgen.gethkmesh(kl)
    hmesh=Hmesh(hkmesh)
    print hmesh.check_hermicity()
    ekmesh=hmesh.getemesh()

    LABELSIZE=14
    ion()
    fig=figure(figsize=(7,5))
    plot(kl[:,0],ekmesh)
    if True:#hgen.spaceconfig.nnambu==1:
        axhline(y=0,ls='--',color='k')
        text(1.8,-0.1,'$\mu=0$',ha='center',va='center',fontsize=14)
    if Vz==0 and alpha!=0:
        dy=alpha**2/2
        annotate('',xy=(-alpha,-2*dy),xycoords='data',xytext=(alpha,-2*dy),\
                arrowprops=dict(arrowstyle='<->',shrinkA=0,shrinkB=0))
        plot([-alpha,-alpha],[-dy-0.1,-dy+0.1],color='k',ls='-')
        plot([alpha,alpha],[-dy-0.1,-dy+0.1],color='k',ls='-')
        text(0,-2*dy-0.1,r'$2\alpha$',va='center',ha='center',fontsize=14)
    xlabel(r'$k$',fontsize=LABELSIZE)
    ylabel('Energy($t$)')
    xlim(-pi,pi)
    xticks([-pi,0,pi],[r'$-\pi/a$','0',r'$-\pi/a$'],fontsize=14)
    tight_layout()
    pdb.set_trace()
    savefig('data/band_%s.png'%model.get_str())
Example #2
0
def plot_band(delta=0.1,t=1.,mu=0.,nsite=100):
    '''
    show the meanfield band.
    '''
    model=SSHModel(t=t,mu=mu,delta=delta,nsite=nsite,periodic=True,kspace=True)
    hgen=model.hgen
    kl=hgen.kspace.kmesh-pi
    hkmesh=hgen.gethkmesh(kl)
    hmesh=Hmesh(hkmesh)
    print hmesh.check_hermicity()
    ekmesh=hmesh.getemesh()
    ion()
    plot(kl[:,0],ekmesh)
    pdb.set_trace()