Author Topic: DOS values  (Read 6069 times)

0 Members and 1 Guest are viewing this topic.

Offline jdgayles16

  • QuantumATK Guru
  • ****
  • Posts: 108
  • Reputation: 0
    • View Profile
DOS values
« 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() ?

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: DOS values
« Reply #1 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
The DOS value can be obtained by the method of "evaluate()".

Offline jdgayles16

  • QuantumATK Guru
  • ****
  • Posts: 108
  • Reputation: 0
    • View Profile
Re: DOS values
« Reply #2 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])

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: DOS values
« Reply #3 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()

Offline jdgayles16

  • QuantumATK Guru
  • ****
  • Posts: 108
  • Reputation: 0
    • View Profile
Re: DOS values
« Reply #4 on: September 9, 2010, 19:31 »
Thanks  alot  :)

Offline jdgayles16

  • QuantumATK Guru
  • ****
  • Posts: 108
  • Reputation: 0
    • View Profile
Re: DOS values
« Reply #5 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

Offline jdgayles16

  • QuantumATK Guru
  • ****
  • Posts: 108
  • Reputation: 0
    • View Profile
Re: DOS values
« Reply #6 on: September 9, 2010, 20:26 »
I attached the script

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: DOS values
« Reply #7 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]))

Offline jdgayles16

  • QuantumATK Guru
  • ****
  • Posts: 108
  • Reputation: 0
    • View Profile
Re: DOS values
« Reply #8 on: September 11, 2010, 16:03 »
Thanks this worked  :)