QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: njuxyh on January 17, 2011, 13:40

Title: how to write correctly a script to output SPIN-POLARIZED transport spectrum
Post by: njuxyh on January 17, 2011, 13:40
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))
                                                                     

  
 
Title: Re: how to write correctly a script to output SPIN-POLARIZED transport spectrum
Post by: Anders Blom on January 17, 2011, 14:50
See the manual http://quantumwise.com/documents/manuals/ATK-2008.10/ref.calculatetransmissionspectrum.html

You need coefficients()[i,0] and coefficients()[i,1]
Title: Re: how to write correctly a script to output SPIN-POLARIZED transport spectrum
Post by: njuxyh on January 17, 2011, 14:55
thank you very  much. Anders Blom