Example #1
0
def rho1mH(e, L, nk):
    k = nk * 2 * math.pi / L
    hhk = sums.hh(e, k)
    #    print(1-sums.E2a2(e,k))

    if hhk < 1:
        return np.sqrt(1 - sums.E2a2(e, k)) * (1 - hhk)
    else:
        return 0.
Example #2
0
def A22(e, L, a2):

    nklist = list_nnk(e, L)
    #    q = np.sqrt(1-sums.E2a2(e,k))
    #    nklist = list_nnk(e,L)
    #    matrixa =  np.diag(np.ones(len(nklist)*5)*(-1/(a2**5*q**4)))
    res = []

    for i in range(5):
        for nnk in nklist:
            q4 = (1 - sums.E2a2(e, 2 * math.pi * sums.norm(nnk) / L))**4
            res.append(-1 / (a2**5 * q4))

#   print(res)
    return np.diag(res)