hi, i have a script to calculate and print the transport spectrum for the non-spin-polarized system.
now, i have add a liitle in script for the spin-polarized system.but it errors.
Traceback (most recent call last):
File "two-my-own-tran.py", line 35, in ?
print '%17.3f %17.6f %17.6f' %(
TypeError: coefficients() takes exactly 1 argument (2 given)
Mon Jan 17 18:17:48 CST 2011
i can not find what is wrong?
from ATK.TwoProbe import *
from ATK.MPI import *
# Restoring the SCF from the previous calculation
scf = restoreSelfConsistentCalculation('GNR-four-C-GNR-opt-all-szp.nc')
# Specify the range of energies
energy_scan = [ i/200.0*Units.eV for i in range(-1601,601)]
# Calculate the Transmission Spectrum
bz_int_parm = brillouinZoneIntegrationParameters( (1,1,100) )
spectrum = calculateTransmissionSpectrum(
self_consistent_calculation=scf,
energies = energy_scan,
#energies = energy_list*electronVolt,
brillouin_zone_integration_parameters=bz_int_parm)
# Save the Transmission Spectrum to VNL file
if ( processIsMaster() ):
vnlfile = VNLFile("GNR-four-C-GNR-_trans.vnl")
vnlfile.addToSample(spectrum,'GNR-four-C-GNR-_trans')
print 'Transmission Spectrum'
print '-----------------------------------------------------------------------'
print 'Energies(eV) Coefficients'
for i in range(len(spectrum.energies())):
print '%17.3f %17.6f %17.6f' %(
spectrum.energies().inUnitsOf(Units.eV),
spectrum.coefficients(0),spectrum.coefficients(1))