Dear Members, I hope you are doing well.
Below is my code: I got error
# Read DOS object from file
dos = nlread('/home/hartree/jem/wolf6252/N-P/With-hyd/Fe/DOS/DOS.hdf5', DensityOfStates)[0]
# Get the actual energy values from the DOS object
energies = dos.energies()
# Set the spectrum method to Gaussian broadening with a broadening width of 0.03 eV
spectrum_method=GaussianBroadening(broadening=0.03*eV)
# Calculate the DOS spectrum with spin up using Gaussian broadening
dos_Up = dos.evaluate(projection_list=ProjectionList(atoms=[144], elements=[Iron], angular_momenta=[2]), spin=Spin.Up)
# Calculate the DOS spectrum with spin down using Gaussian broadening
dos_Down = dos.evaluate(projection_list=ProjectionList(atoms=[144], elements=[Iron], angular_momenta=[2]), spin=Spin.Down)
# Plot the spectra using pylab
import pylab
pylab.figure(figsize=(5, 10))
pylab.plot(dos_Up.inUnitsOf(eV**-1), energies.inUnitsOf(eV), color='darkblue', label='Spin Up')
pylab.plot(dos_Down.inUnitsOf(eV**-1), energies.inUnitsOf(eV), color='darkblue', linestyle='--', label='Spin Down')
# Add a dotted line at E-EF=0
pylab.axhline(y=0, linestyle='dotted', color='gray')
pylab.xlim(0,10)
pylab.ylim(-3,3)
# Save the figure as a high-resolution PNG image
pylab.savefig('Fe-PDOS.png', dpi=300, bbox_inches='tight')
# Add the legend in the upper right corner
pylab.legend(loc='upper right')
pylab.xlabel("PDOS (1/eV)")
pylab.ylabel("E-E$_{f}$/eV")
pylab.legend()
pylab.show()
I want add broadening and I got the following error:
9 energies = dos.energies()
10
---> 11 spectrum_method=GaussianBroadening(broadening=0.03*eV)
12
13 # Calculate the DOS spectrum with spin up using Gaussian broadening
TypeError: 'PhysicalQuantity' object is not callable.
Any one please help me how to solve this issue - I have tired but couldn't got solve it.