QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: jdgayles16 on September 9, 2010, 00:35

Title: DOS values
Post by: jdgayles16 on September 9, 2010, 00:35
Code
trans = nlread('ATsupergap.nc',TransmissionSpectrum,object_id="gID015")[0]
dos = nlread('ATsupergap.nc',DeviceDensityOfStates,object_id="gID016")[0]

e=dos.energies()
t=trans.transmission()

to get the transmission values i use the .transmission(), for DOS would i use .DensityOfStates() ?
Title: Re: DOS values
Post by: zh on September 9, 2010, 03:42
Some examples can be found in the manual:
http://quantumwise.com/documents/manuals/latest/ReferenceManual/XHTML/ref.devicedensityofstates.html (http://quantumwise.com/documents/manuals/latest/ReferenceManual/XHTML/ref.devicedensityofstates.html)
The DOS value can be obtained by the method of "evaluate()".
Title: Re: DOS values
Post by: jdgayles16 on September 9, 2010, 05:31
I wanted to get just the TOTAL STATES alone so i could print next to the transmission, to a file. i have almost 400 atoms and i didnt want to have to project onto all of them.
Should this work...
Code
e=dos.energies()
t=trans.transmission()
D=dos.evaluate()
file= open('./results/CGZerobias.log','w')
for i in range(len(e)):
print >>file, "%g\t%g\t%g" %(e[i].inUnitsOf(eV),dos_projectionr[0][i].inUnitsOf(eV**-1), t[0][i], [b]D[0][i].inUnitsOf(eV**-1)[/b])
Title: Re: DOS values
Post by: Nordland on September 9, 2010, 08:43
Yes I think so. However the in your snippet you have not defined dos_projectionr.

I would do the following:
Code: python
energies=dos.energies()
transmission =trans.transmission()[0]
density_of_states =dos.evaluate()[0]


for e, t, d in zip(energies, transmission, density_of_states):
    print e, t, d

If you want to get rid of the units fast you can also do it like:
Code: python
energies=dos.energies().inUnitsOf(eV)
transmission =trans.transmission()[0]
density_of_states =dos.evaluate()[0].inUnitsOf(eV**-1)


for e, t, d in zip(energies, transmission, density_of_states):
    print e, t, d

If I would write to a file, I would do it like this:
Code: python
energies=dos.energies().inUnitsOf(eV)
transmission =trans.transmission()[0]
density_of_states =dos.evaluate()[0].inUnitsOf(eV**-1)

file = open('./results/CGZerobias.log','w')

for e, t, d in zip(energies, transmission, density_of_states):
    file.write("%g\t%g\t%g" %(e,t,d))

file.close()
Title: Re: DOS values
Post by: jdgayles16 on September 9, 2010, 19:31
Thanks  alot  :)
Title: Re: DOS values
Post by: jdgayles16 on September 9, 2010, 20:25
I used

density_of_states =dos.evaluate()[0] 

and I get one value for all energies, but my pdos looks correct and so does my transmission, any suggestions
Title: Re: DOS values
Post by: jdgayles16 on September 9, 2010, 20:26
I attached the script
Title: Re: DOS values
Post by: Anders Blom on September 10, 2010, 14:36
Try removing the [ ] around the dos.evaluate

Code
dos_projectionA = [dos.evaluate(projection_list = ProjectionList([202,204,206,207,208,213,214,220,222,227,230,231,234,239,244,245,248,249]))]

should be

Code
dos_projectionA = dos.evaluate(projection_list = ProjectionList([202,204,206,207,208,213,214,220,222,227,230,231,234,239,244,245,248,249]))
Title: Re: DOS values
Post by: jdgayles16 on September 11, 2010, 16:03
Thanks this worked  :)