Hi,
I want to calculate the spin dependent Projected Density of States.how can i modify the script of the Density Of States:
f = open('pdos.dat','w')
import numpy
projecte_density_of_states = calculateProjectedDensityOfStates(
self_consistent_calculation = scf,
projection_atoms =[11,18],
energies = numpy.arange(-1.0, 1.0+0.1, 0.01)*electronVolt,
brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters((1, 1)),
green_function_infinitesimal = 1.0e-5*electronVolt
)
energies = projecte_density_of_states.energies()
pdos = projecte_density_of_states.projectedensityofstates()
if len(pdos.shape)==2:
# spin-polarized
print ' Projected Density of states'
print 'Energy (eV) Spin-up Spin-down'
print '------------------------------------------'
for i in range(len(energies)):
print "%g\t%g\t%g\n" % ( energies.inUnitsOf(eV),
pdos[0,i].inUnitsOf(eV**(-1)),pdos[1,i].inUnitsOf(eV**(-1)) )
s = '%g\t%g\t%g\n' % ( energies.inUnitsOf(eV),
pdos[0,i].inUnitsOf(eV**(-1)),pdos[1,i] .inUnitsOf(eV**(-1)))
f.write(s)
else:
print 'Energy (eV) Projected Density of states'
print '-----------------------------------'
for i in range(len(energies)):
print "%g\t%g\n" % ( energies.inUnitsOf(eV**(-1)),pdos )
s = '%g\t%g\n' % ( energies.inUnitsOf(eV**(-1)),pdos )
f.write(s)
f.close()
i have replaced the Density Of States with Projected Density of States.but it does not worked.i want to know how can i deal with the red part i indicated in the script above.