예제 #1
0
def P_A1_o(shell):
    shell = list(shell)
    No = len(defns.shell_nnk_list(shell))

    one_mat = np.ones((No, No)) / No
    Pk = A1_little_group_sum(shell)

    U_block_list = []
    for p in defns.shell_nnk_list(shell):
        p = list(p)
        U_block_list.append(GT.Dmat(GT.Rvec(p, shell)))
    U = block_diag(*U_block_list)

    return U @ np.kron(one_mat, Pk) @ U.T
예제 #2
0
def P_irrep_o_l(shell, l, I, lblock=False):
    nnk_list = defns.shell_nnk_list(shell)
    Lk = GT.little_group(shell)
    d_I = GT.irrep_dim(I)

    P_shell = []
    for k2 in nnk_list:
        R20 = GT.Rvec(k2, shell)
        P_k2 = []
        for k1 in nnk_list:
            R01 = GT.Rvec(shell, k1)

            P_block = np.zeros((6, 6))
            for R in Lk:
                RRR = GT.R_prod(R20, R, R01)
                if l == 0:
                    P_block[0, 0] += GT.chi(RRR, I)
                elif l == 2:
                    P_block[1:, 1:] += GT.chi(RRR, I) * GT.Dmat(RRR)[1:, 1:]
                    P_block = defns.chop(P_block)

            P_k2.append(P_block)
        P_shell.append(P_k2)

    out = d_I / 48 * np.block(P_shell)
    if lblock == True:
        if l == 0:
            return l0_proj(out)
        elif l == 2:
            return l2_proj(out)
    else:
        return out
예제 #3
0
def P_A1_o_naive(shell):
    Nk = len(defns.shell_nnk_list(shell))
    P_shell = np.zeros((6 * Nk, 6 * Nk))
    for R in GT.Oh_list():
        P_shell += np.kron(GT.Smat(R, shell).T, GT.Dmat(R))
    P_shell = P_shell / 48

    return P_shell
예제 #4
0
def Fmat00(E,L,alpha):
  shells = shell_list(E,L)

  F_list = []
  for nnk in shells:
    F_list += [sums.F2KSS(E,L,nnk,0,0,0,0,alpha)] * len(shell_nnk_list(nnk))

  return np.diag(F_list)
예제 #5
0
def Gmat_div():
  out = np.zeros((42,42))
  nnk_list = [(0,0,0)]+defns.shell_nnk_list([0,0,1])
  for i in range(42):
    nnp = nnk_list[i//6]
    [l1,m1] = defns.lm_idx(i)
    for j in range(42):
      nnk = nnk_list[j//6]
      [l2,m2] = defns.lm_idx(j)
      out[i,j] = G_div(nnp,l1,m1,nnk,l2,m2)
  return out
예제 #6
0
def Fmat00(E, L, alpha, IPV=0):
    shells = shell_list(E, L)

    F_list = []
    for nnk in shells:
        nk = sums.norm(nnk)
        k = nk * 2 * math.pi / L
        hhk = sums.hh(E, k)
        omk = sqrt(1. + k**2)
        F_list += [(sums.F2KSS(E, L, nnk, 0, 0, 0, 0, alpha) + hhk * IPV /
                    (32 * math.pi * 2 * omk))] * len(shell_nnk_list(nnk))
#  print(F_list)
    return np.diag(F_list)
예제 #7
0
def Fmat_div():
  out = np.zeros((42,42))
  nnk_list = [(0,0,0)]+defns.shell_nnk_list([0,0,1])
  for n in range(len(nnk_list)):
    nnk = nnk_list[n]
    for i1 in range(6):
      i = 6*n+i1
      [l1,m1] = defns.lm_idx(i1)
      for i2 in range(6):
        j = 6*n+i2
        [l2,m2] = defns.lm_idx(i2)
        out[i,j] = F_div(nnk,l1,m1,nnk,l2,m2)
  return out
예제 #8
0
def Smat(R, shell):
    R = list(R)
    shell = list(shell)
    nnk_list = defns.shell_nnk_list(shell)
    nnk_list = [list(nnk) for nnk in nnk_list]
    Nk = len(nnk_list)

    S = np.zeros((Nk, Nk))
    for i in range(Nk):
        k = nnk_list[i]
        kR = [np.sign(R[j]) * k[abs(R[j]) - 1] for j in range(3)]
        j = nnk_list.index(kR)

        S[i][j] = 1
    return S