When I calculate density of states, I met the problem,
traceback (most recent call last):
File "dos.py", line 18, in ?
print energies.inUnitsOf(eV),'\t',dos[0,i],'\t',dos[1,i]
TypeError: float argument required
I use the file, such as ,
from ATK.TwoProbe import *
density_of_states = calculateDensityOfStates(
self_consistent_calculation = scf_calc,
energies = numpy.arange(-5,5,0.1)*electronVolt
)
energies = density_of_states.energies()
dos = density_of_states.densityOfStates()
if len(dos.shape)==2:
# spin-polarized
print ' Density of states'
print 'Energy (eV) Spin-up Spin-down'
print '------------------------------------------'
for i in range(len(energies)):
print "%g\t%g\t%g" % ( energies.inUnitsOf(eV),dos[0,i],dos[1,i] )
else:
print 'Energy (eV) Density of states'
print '-----------------------------------'
for i in range(len(energies)):
print "%g\t%g" % ( energies.inUnitsOf(eV),dos )
Do you tell me what mistakes I make when I calcualte the DOS? Thanks very much for your reolies!