Esempio n. 1
0
nRow = len(ls.selectedTimeStep)/nCol
fig, ax = plt.subplots(1,1,sharex=False,sharey=True,figsize=(8,6))
SaveName = __file__.split('/')[-1].split('.')[0] 

kpath = ls.kpath
cut = ls.cut
print kpath
specialKPoints = ls.specialKPoints

x = ls.x

h**o = dP.getHomo()
evolvingBands = range(0, h**o + 7)

time, exe = dP.getProjectedPartition()
time, eigen = dP.getAdiabaticEigenvalue()
colors = ma.getColors(5,cmap='gnuplot') 

#for index, step in enumerate(ls.selectedTimeStep):
excited = np.abs(exe[0,kpath,:] - exe[0,kpath,:])
norm = ls.norm/np.max(exe[:,kpath,:] - exe[0,kpath,:])
eigenvalue = eigen[0,kpath,:]
line = [] 
scatter = []
for i in evolvingBands:
  if i < h**o:
    part = excited[:,i]
    if ls.drawfill:
      s = ax.fill_between(x, eigenvalue[:,i] - norm*part, 
                          eigenvalue[:,i] + norm*part,
#!/usr/bin/python
import numpy as np
import matplotlib.pyplot as plt
import pyramids.io.result as dP
import pyramids.plot.setting as ma
import pyramids.plot.PlotUtility as pu
#------------------------------------------------------------------------------
time, exe = dP.getProjectedPartition()
time, eigen = dP.getAdiabaticEigenvalue()

#print eigen[:,1,:]
#h**o = dP.getHomo()
#print h**o
print exe.shape, eigen.shape
c = ma.getColors(exe.shape[2], cmap='brg')

norm = 50.0  #/np.max(exe[:,:,:] -  exe[0,:,:])
#print norm
kpts = [0]
for kpt in kpts:
    fig, ax = plt.subplots(1, 1, sharex=True, sharey=False, figsize=(8, 6))
    SaveName = __file__.split('/')[-1].split('.')[0] + str(kpt)
    h**o = 0
    for i, band in enumerate(eigen[0, kpt, :]):
        #print band
        if band < 0:
            h**o = i

    evolvingBands = range(0, h**o + 40)
    X, Y = np.meshgrid(time, eigen[0, kpt, evolvingBands])
    Z = np.transpose(exe[0, kpt, evolvingBands] - exe[:, kpt, evolvingBands])
Esempio n. 3
0
#print reciprocal_vectors
points = np.array([
    (reciprocal_vectors[0, 0:2] * i + reciprocal_vectors[1, 0:2] * j +
     reciprocal_vectors[2, 0:2] * k) for i in range(-1, 2)
    for j in range(-1, 2) for k in range(0, 1)
])

#from ase.dft.kpoints import monkhorst_pack
#kpts = np.array([np.dot(k,atoms.cell) for k in monkhorst_pack((12,12,1))])

from scipy.spatial import Voronoi, voronoi_plot_2d
vor = Voronoi(points)
voronoi_plot_2d(vor, ax)

eigen = dp.readEigFile('siesta.EIG')
time, partAll = dp.getProjectedPartition()

xlimits = None
ylimits = None

if os.path.exists('localSetting.py'):
    import localSetting as ls
    conf = ls.nesting
    xlimits = conf.xlimits
    ylimits = conf.ylimits

import os
kargs = getPropertyFromPosition(
    xlabel=r'$k_x (\AA^{-1})$',
    ylabel=r"$k_y (\AA^{-1})$",
    title='',