QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: kaypu 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?
-
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?
-
thank you professor Anders, yes you're right, something wrong with the nc