Exemplo n.º 1
0
def get_df_row(obdm,sigU,sigUp,e):
  #1-body terms
  orb1=np.array([0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,3,3,3,3,4,4,4,5,5,6])
  orb2=np.array([0,1,2,3,4,5,6,7,1,2,3,4,5,6,7,2,3,4,5,6,7,3,4,5,6,7,4,5,6,7,5,6,7,6,7,7])
  sigN=sum_onebody(obdm,orb1,orb2)
  sigN_labels=['sigN_'+str(orb1[i])+'_'+str(orb2[i]) for i in range(len(orb1))]
  #print("Mo Tr: "+str(sum(sigN)))

  data=np.array([e]+list(sigN)+[sigU,sigUp])
  d=pd.DataFrame(data[:,np.newaxis].T,columns=['energy']+sigN_labels+['sigU','sigUp'],index=[0])
  return d 
Exemplo n.º 2
0
    mo_to_unp=reduce(np.dot,(b.T, s, mo_coeff[spin]))
    
    mo_rdm[rem]=0
    mo_rdm[add]=1
    e+=(mo_energy[spin][add]-mo_energy[spin][rem])*27.2114
     
    obdm[spin]=reduce(np.dot,(mo_to_iao,np.diag(mo_rdm),mo_to_iao.T))
    obdm2[spin]=reduce(np.dot,(mo_to_unp,np.diag(mo_rdm),mo_to_unp.T))
  print(excit_list[run],e)
  tbdm,__=gen_slater_tbdm(obdm)

  #Hopping
  orb1=np.array([14,14,14,14,24,24,24,24,34,34,34,34,44,44,44,44])-1
  orb2=np.array([46,63,54,67,50,67,58,63,54,71,46,75,58,75,50,71])-1
  sign=np.array([-1,1,1,-1]*4)
  sigTdp=sum_onebody(obdm,orb1,orb2)
  sigTdp=2*np.dot(sign,sigTdp)

  orb1=np.array([ 6, 6, 6, 6,16,16,16,16,26,26,26,26,36,36,36,36])-1
  orb2=np.array([46,63,54,67,50,67,58,63,54,71,46,75,58,75,50,71])-1
  sign=np.array([-1,-1,1,1]*4)
  sigTps=sum_onebody(obdm,orb1,orb2)
  sigTps=2*np.dot(sign,sigTps)

  orb1=np.array([ 6,16,26,36])-1
  orb2=np.array([14,24,34,44])-1
  sign=np.array([1,1,1,1])
  sigTds=sum_onebody(obdm,orb1,orb2)
  sigTds=2*np.dot(sign,sigTds)

  orb1=np.array([14,14,24,24,34,34,44,44])-1