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() ?
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...
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])
Yes I think so. However the in your snippet you have not defined dos_projectionr.
I would do the following:
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:
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:
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()
Try removing the [ ] around the dos.evaluate
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
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]))