Ejemplo n.º 1
0
#        try :
#            A0 = get_A0(i, c)
#        except:
#            break
#
#        full, = plt.plot(fabs(A0), 0.5, 'ko', fillstyle='none', markersize=12, label='all')
#

print 'Eprimes'
Ds, As = [], []
for c, dimers in dimer_dict.items():
    s = ReadStruct('../crystal_files/INPUT_'+c) 
    for dimer in dimers:
        #at_x = s.atoms[dimer-1]

        nbs = neighbours_from_file(dimer, c)
        print c, dimer, len([n  for n in nbs if (n.length < 2.5 and n.atom_type=='Si')])
        nb2 = [n.length  for n in nbs if (n.length < 2.5 and n.atom_type=='Si')]
        print nb2
        #d = sum(nb2)/len(nb2)
        d = max(nb2)
        Ds.append(d)
        for nb in nbs:
            print '    ', nb.atom_type, nb.length

        A0 = get_A0(dimer, c)
        As.append(fabs(A0))
    
        #epr ,= plt.plot(fabs(A0), 0.5, 'yo', markersize=12, label="$E'$")

print Ds, As
Ejemplo n.º 2
0
for i, nm in enumerate(nms):
    s = ReadStruct('../../crystal_files/INPUT_'+nm)

    o = lambda k : k - offsets[nm]['VBM']
    fig[i].axvspan(-1, 0, facecolor='0.85', linewidth=0)
    fig[i].axvspan(offsets[nm]['CBM']-offsets[nm]['VBM'], 3, facecolor='0.85', linewidth=0)

    
    E, up, down = get_at_pdos(nm, 3, total=True)
    fig[i].plot(o(E),   up, '-', color='slateblue', linewidth=3)
    fig[i].plot(o(E), down, '-', color='slateblue', linewidth=3)

    p1, p2 = np.zeros(600), np.zeros(600)
    for ii, at in enumerate(s.atoms):
        nbs = neighbours_from_file(ii+1, nm) 
        nbs = [nb for nb in nbs if (nb.atom_type == 'Hf' and nb.length < 3.)]
        if at.species == 'Si' and nbs:
            print [(nb.atom_type, nb.length) for nb in nbs] 
            _, u, d =  get_at_pdos(nm, ii+1)
            p1 += u
            p2 += d

    fig[i].plot(o(E),   p1, '-', color='#66FFCC', linewidth=3)
    fig[i].plot(o(E),   p2, '-', color='#66FFCC', linewidth=3)


print 'Done plotting!'
plt.subplots_adjust(hspace=0)
plt.gcf().set_size_inches(20., 4*3.5)
plt.xlabel('Energy [eV]', fontweight='bold', fontsize=25)
Ejemplo n.º 3
0
#            A0 = get_A0(i, c)
#        except:
#            break
#
#        full, = plt.plot(fabs(A0), 0.5, 'ko', fillstyle='none', markersize=12, label='all')
#

print 'Eprimes'
Ds, As = [], []
for c, eprimes in eprime_dict.items():
    s = ReadStruct('../crystal_files/INPUT_'+c) 
    for eprime in eprimes:
        at_x = s.atoms[eprime-1]


        nbs = neighbours_from_file(eprime, c)
        print c, eprime
        Ds.append((nbs[0].length + nbs[1].length + nbs[2].length)/3)
        for nb in nbs:
            print '    ', nb.atom_type, nb.length

        A0 = get_A0(eprime, c)
        As.append(fabs(A0))
    
        #epr ,= plt.plot(fabs(A0), 0.5, 'yo', markersize=12, label="$E'$")

plt.scatter(Ds, As, edgecolor='0.1', linewidths=2, s=100, facecolor='none')

plt.gca().xaxis.set_minor_locator(MultipleLocator(5))
plt.gca().yaxis.set_tick_params(which='major', length=10, width=2)
Ejemplo n.º 4
0
#nms = ['hfo2si_c1']
nms = ['hfo2si_c1', 'hfo2si_c1ox', 'hfo2si_c2ox', 'hfo2si_c3ox']

a = np.zeros(12, dtype=int)

r=3.0

for nm in nms:
    s = ReadStruct('../../crystal_files/INPUT_'+nm)

    it = (i+1 for i in range(len(s)))

    for at in it:
        if s.atoms[at-1].species == 'Hf':
            nbs = neighbours_from_file(at, nm)
            #nbs = [nb for nb in nbs if (nb.length < 2.5 and nb.atom_type == 'O')]
            nbs = [nb for nb in nbs if (nb.length < r and nb.atom_type == 'O')]
            a[len(nbs)] +=1

print a
a = a*100/float(sum(a))
print a


# bulk amorphous
b = np.zeros(12, dtype=int)
s = ReadStruct('../../crystal_files/INPUT_aHfO2')

it = (i+1 for i in range(len(s)))