xi.py
def compute_full_sij(fproj):
    """
    Given the final proj_class, calculate the full S_ij matrix
    for each kind of atom

    ground-state atom: sij is just qij
    excited sij stored under proj of fscf
    """
    fproj.full_sij = []
    for kind in range(fproj.nspecies):
        full_sij = sp.matrix(sp.zeros([fproj.nprojs[kind], fproj.nprojs[kind]]))
        # Extract sij for this kind of atom
        if fproj.xs == kind:
            # if it is an excited atom
            sij = fproj.sij
        else:
            sij = fproj.qij[kind]
        # fproj.para.print(sij) # debug
        l_offset1 = il1 = 0
        for l1 in fproj.l[kind]:
            l_offset2 = il2 = 0
            for l2 in fproj.l[kind]:
                if l2 == l1:
                    full_sij[l_offset1 : l_offset1 + 2 * l1 + 1, l_offset2 : l_offset2 + 2 * l2 + 1] = sp.identity(2 * l1 + 1) * sij[il1][il2]
                l_offset2 += 2 * l2 + 1
                il2 += 1
            l_offset1 += 2 * l1 + 1
            il1 += 1
        # fproj.para.print(full_sij) # debug
        fproj.full_sij.append(full_sij)

    Given the final proj_class, calculate the full S_ij matrix
    for each kind of atom

    ground-state atom: sij is just qij
    excited sij stored under proj of fscf
    
Given the final proj_class, calculate the full S_ij matrix
for each kind of atom

ground-state atom: sij is just qij
excited sij stored under proj of fscf
Given the final proj_class calculate the full S_ij matrix for each kind of atom ground - state atom : sij is just qij excited sij stored under proj of fscf
def compute_full_sij(fproj):
    fproj.full_sij = []
    for kind in range(fproj.nspecies):
        full_sij = sp.matrix(sp.zeros([fproj.nprojs[kind], fproj.nprojs[kind]]))
        if fproj.xs == kind:
            sij = fproj.sij
        else:
            sij = fproj.qij[kind]
        l_offset1 = il1 = 0
        for l1 in fproj.l[kind]:
            l_offset2 = il2 = 0
            for l2 in fproj.l[kind]:
                if l2 == l1:
                    full_sij[l_offset1 : l_offset1 + 2 * l1 + 1, l_offset2 : l_offset2 + 2 * l2 + 1] = sp.identity(2 * l1 + 1) * sij[il1][il2]
                l_offset2 += 2 * l2 + 1
                il2 += 1
            l_offset1 += 2 * l1 + 1
            il1 += 1
        fproj.full_sij.append(full_sij)
def compute_full_sij ( fproj ) : fproj . full_sij = [ ] for kind in range ( fproj . nspecies ) : full_sij = sp . matrix ( sp . zeros ( [ fproj . nprojs [ kind ] , fproj . nprojs [ kind ] ] ) ) if fproj . xs == kind : sij = fproj . sij else : sij = fproj . qij [ kind ] l_offset1 = il1 = 0 for l1 in fproj . l [ kind ] : l_offset2 = il2 = 0 for l2 in fproj . l [ kind ] : if l2 == l1 : full_sij [ l_offset1 : l_offset1 + 2 * l1 + 1 , l_offset2 : l_offset2 + 2 * l2 + 1 ] = sp . identity ( 2 * l1 + 1 ) * sij [ il1 ] [ il2 ] l_offset2 += 2 * l2 + 1 il2 += 1 l_offset1 += 2 * l1 + 1 il1 += 1 fproj . full_sij . append ( full_sij )
Given the final proj_class, calculate the full S_ij matrix
for each kind of atom
Given the final proj_class calculate the full S_ij matrix for each kind of atom
"""
    Given the final proj_class, calculate the full S_ij matrix
    for each kind of atom

    ground-state atom: sij is just qij
    excited sij stored under proj of fscf
    """ # Extract sij for this kind of atom # if it is an excited atom # fproj.para.print(sij) # debug # fproj.para.print(full_sij) # debug
fproj