Attachment 'LDOS.py'
Download 1 #!/usr/bin/env python
2 from Dacapo import Dacapo
3 from ASE import Atom, ListOfAtoms
4 import Numeric as num
5
6 ########################################
7 #This script produces the projected density of states
8 ########################################
9 filename='Fe_nonmag.nc'
10 atoms=Dacapo.ReadAtoms(filename)
11 ##############################
12 #Set up the calculator
13 ##############################
14 calc = atoms.GetCalculator()
15
16
17 dos = calc.GetLDOS(atoms=[1],angularchannels=["s"])
18 data=num.array(dos.GetData())
19 efermi=dos.GetEFermi()
20
21
22 import Gnuplot as gp
23 plot = gp.Gnuplot()
24 plot.plot(gp.Data(data[:,0]-efermi,data[:,1], with='lines'))
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.