Author Topic: Questions on script of TE  (Read 2799 times)

0 Members and 1 Guest are viewing this topic.

Offline kaypu

  • QuantumATK Guru
  • ****
  • Posts: 135
  • Country: 00
  • Reputation: 1
    • View Profile
Questions on script of TE
« on: March 2, 2013, 14:41 »
Dear QuantumWise staff:
       i use the script to calculate TE, the script is as follow:
*****************************************************************
# Define input and output NetCDF files here 
scf_filename = "/home/zwk/New/SY12C/SY12C-scf%g.nc"
analysis_filename = "/home/zwk/New/SY12C/SY12C-TE.nc" 
 
biases = [0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2]
# Read configurations from NetCDF files
configurations = [ ]
for bias in biases:
   
    configurations.append(nlread(scf_filename % bias, DeviceConfiguration)[0])

biases = [float(conf.calculator().electrodeVoltages()[0]-conf.calculator().electrodeVoltages()[1]) for conf in configurations]
configurations = [configurations[j] for j in numpy.argsort(biases)]


for configuration in configurations:

    # For each one, extract the bias,
    calculator = configuration.calculator()
    bias = calculator.electrodeVoltages()[0]-calculator.electrodeVoltages()[1]

    # ... calculate and save the transmission spectrum,
    transmission_spectrum = TransmissionSpectrum(
        configuration=configuration,
        energies=numpy.linspace(-2,2,201)*eV,
        kpoints=MonkhorstPackGrid(1,1),
        energy_zero_parameter=AverageFermiLevel,
        infinitesimal=1e-06*eV,
        self_energy_calculator=KrylovSelfEnergy(),
        )
    nlsave(analysis_filename, transmission_spectrum, object_id="Transmission %s" % bias)
    nlprint(transmission_spectrum)
************************************************************************
but something wrong with it
*************************************************************
+------------------------------------------------------------------------------+
|                                                                              |
| Atomistix ToolKit 11.8.2 [Build 09819e5]                                     |
|                                                                              |
+------------------------------------------------------------------------------+
Traceback (most recent call last):
  File "SY12C-TE.py", line 10, in <module>
    configurations.append(nlread(scf_filename % bias, DeviceConfiguration)[0])
  File "./zipdir/NL/IO/NLSaveUtilities.py", line 256, in nlread
  File "./zipdir/NL/CommonConcepts/Configurations/ReadConfigurations.py", line 165, in nlreadDeviceConfiguration
  File "./zipdir/NL/NanoLanguage/ScopeExecuter.py", line 66, in execute
NL.ComputerScienceUtilities.Exceptions.NLScopeExecutionError: invalid syntax (<string>, line 2)
*********************************************************************************************************
how to modify the script?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Questions on script of TE
« Reply #1 on: March 4, 2013, 09:40 »
You should check that you can read the "scf" NC file at all, there seems to be something wrong with it... Does it open in VNL, can you extract the geometries from it there?

Offline kaypu

  • QuantumATK Guru
  • ****
  • Posts: 135
  • Country: 00
  • Reputation: 1
    • View Profile
Re: Questions on script of TE
« Reply #2 on: March 4, 2013, 12:53 »
thank you professor Anders, yes you're right, something wrong with the nc