2
« on: December 22, 2012, 05:43 »
Thank you very much. my input and output files : g-oh.py, g-oh.log, g-oh.nc . how can I add your code that you give me in the follow code:
# read DOS object from file
dos = nlread('g-oh.nc', DensityOfStates)[0]
# make list of energies
energies = numpy.arange(-14,5,0.01)*eV
# calculate the DOS spectrum with two different methods
dos_t = dos.tetrahedronSpectrum(energies)
dos_g = dos.gaussianSpectrum(energies, broadening = 0.2*eV)
#plot the spectra using pylab
import pylab
pylab.figure()
pylab.plot(energies.inUnitsOf(eV), dos_t.inUnitsOf(eV**-1))
pylab.plot(energies.inUnitsOf(eV), dos_g.inUnitsOf(eV**-1))
pylab.xlabel("Energy (eV)")
pylab.ylabel("DOS (1/eV)")
pylab.show()
In the script file, the Hydrogen and Oxygen atoms number: 33 and 32. I just want to get the PDOS of Hydrogen and Oxygen atoms by using the Gaussian and tetrahedron spectrum ways. I am very looking forward to your reply,Thanks .