Author Topic: Re: Error when run the ATK 10.8  (Read 2431 times)

0 Members and 1 Guest are viewing this topic.

Offline hung

  • Regular QuantumATK user
  • **
  • Posts: 17
  • Reputation: 0
    • View Profile
Re: Error when run the ATK 10.8
« on: September 30, 2010, 22:16 »
when I run this scrip:###############################################################
# TwoProbe configuration
###############################################################

###############################################################
# Left electrode
###############################################################

# Set up lattice
vector_a = [27.83146, 0.0, 0.0]*Angstrom
vector_b = [0.0, 10.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 4.92200342088]*Angstrom
left_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
left_electrode_elements = [Carbon, Carbon, Carbon, Carbon, Carbon, Carbon, Hydrogen,
                           Hydrogen, Carbon, Carbon, Carbon, Carbon, Carbon, Carbon,
                           Hydrogen, Hydrogen]

# Define coordinates
left_electrode_coordinates = [[ 21.46738062,   5.        ,   0.61525043],
                              [ 20.75695062,   5.        ,   1.84575128],
                              [ 19.33609062,   5.        ,   1.84575128],
                              [ 18.62566062,   5.        ,   0.61525043],
                              [ 17.20480062,   5.        ,   0.61525043],
                              [ 16.49437062,   5.        ,   1.84575128],
                              [ 22.56838062,   5.        ,   0.61525043],
                              [ 15.39337062,   5.        ,   1.84575128],
                              [ 21.46738062,   5.        ,   3.07625214],
                              [ 20.75695062,   5.        ,   4.30675299],
                              [ 19.33609062,   5.        ,   4.30675299],
                              [ 18.62566062,   5.        ,   3.07625214],
                              [ 17.20480062,   5.        ,   3.07625214],
                              [ 16.49437062,   5.        ,   4.30675299],
                              [ 22.56838062,   5.        ,   3.07625214],
                              [ 15.39337062,   5.        ,   4.30675299]]*Angstrom

# Set up configuration
left_electrode = BulkConfiguration(
    bravais_lattice=left_electrode_lattice,
    elements=left_electrode_elements,
    cartesian_coordinates=left_electrode_coordinates
    )

###############################################################
# Right electrode
###############################################################

# Set up lattice
vector_a = [27.83146, 0.0, 0.0]*Angstrom
vector_b = [0.0, 10.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 4.92200342088]*Angstrom
right_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
right_electrode_elements = [Carbon, Carbon, Carbon, Carbon, Carbon, Carbon, Hydrogen,
                            Hydrogen, Carbon, Carbon, Carbon, Carbon, Carbon, Carbon,
                            Hydrogen, Hydrogen]

# Define coordinates
right_electrode_coordinates = [[ 10.81093062,   5.        ,   1.84575128],
                               [ 10.10050062,   5.        ,   0.61525043],
                               [  8.67964062,   5.        ,   0.61525043],
                               [  7.96921062,   5.        ,   1.84575128],
                               [  6.54835062,   5.        ,   1.84575128],
                               [  5.83792062,   5.        ,   0.61525043],
                               [ 11.91193062,   5.        ,   1.84575128],
                               [  4.73692062,   5.        ,   0.61525043],
                               [ 10.81093062,   5.        ,   4.30675299],
                               [ 10.10050062,   5.        ,   3.07625214],
                               [  8.67964062,   5.        ,   3.07625214],
                               [  7.96921062,   5.        ,   4.30675299],
                               [  6.54835062,   5.        ,   4.30675299],
                               [  5.83792062,   5.        ,   3.07625214],
                               [ 11.91193062,   5.        ,   4.30675299],
                               [  4.73692062,   5.        ,   3.07625214]]*Angstrom

# Set up configuration
right_electrode = BulkConfiguration(
    bravais_lattice=right_electrode_lattice,
    elements=right_electrode_elements,
    cartesian_coordinates=right_electrode_coordinates
    )

###############################################################
# Central region
###############################################################

# Set up lattice
vector_a = [27.83146, 0.0, 0.0]*Angstrom
vector_b = [0.0, 10.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 29.5320205253]*Angstrom
central_region_lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
central_region_elements = [Carbon, Carbon, Carbon, Carbon, Carbon, Carbon, Hydrogen,
                           Hydrogen, Carbon, Carbon, Carbon, Carbon, Carbon, Carbon,
                           Hydrogen, Hydrogen, Carbon, Carbon, Carbon, Carbon, Carbon,
                           Hydrogen, Hydrogen, Carbon, Carbon, Carbon, Carbon, Carbon,
                           Carbon, Carbon, Carbon, Hydrogen, Hydrogen, Hydrogen, Hydrogen,
                           Carbon, Carbon, Carbon, Carbon, Carbon, Carbon, Carbon, Carbon,
                           Hydrogen, Hydrogen, Hydrogen, Hydrogen, Carbon, Carbon, Carbon,
                           Carbon, Carbon, Carbon, Carbon, Carbon, Hydrogen, Hydrogen,
                           Hydrogen, Hydrogen, Carbon, Carbon, Carbon, Carbon, Carbon,
                           Carbon, Carbon, Carbon, Hydrogen, Hydrogen, Hydrogen, Hydrogen,
                           Carbon, Carbon, Carbon, Carbon, Carbon, Carbon, Hydrogen,
                           Hydrogen, Hydrogen, Carbon, Carbon, Carbon, Carbon, Carbon,
                           Carbon, Hydrogen, Hydrogen, Carbon, Carbon, Carbon, Carbon,
                           Carbon, Carbon, Hydrogen, Hydrogen]

# Define coordinates
central_region_coordinates = [[ 21.46738062,   5.        ,   0.61525043],
                              [ 20.75695062,   5.        ,   1.84575128],
                              [ 19.33609062,   5.        ,   1.84575128],
                              [ 18.62566062,   5.        ,   0.61525043],
                              [ 17.20480062,   5.        ,   0.61525043],
                              [ 16.49437062,   5.        ,   1.84575128],
                              [ 22.56838062,   5.        ,   0.61525043],
                              [ 15.39337062,   5.        ,   1.84575128],
                              [ 21.46738062,   5.        ,   3.07625214],
                              [ 20.75695062,   5.        ,   4.30675299],
                              [ 19.33609062,   5.        ,   4.30675299],
                              [ 18.62566062,   5.        ,   3.07625214],
                              [ 17.20480062,   5.        ,   3.07625214],
                              [ 16.49437062,   5.        ,   4.30675299],
                              [ 22.56838062,   5.        ,   3.07625214],
                              [ 15.39337062,   5.        ,   4.30675299],
                              [ 21.46738062,   5.        ,   5.53725385],
                              [ 20.75695062,   5.        ,   6.7677547 ],
                              [ 19.33609062,   5.        ,   6.7677547 ],
                              [ 18.62566062,   5.        ,   5.53725385],
                              [ 17.20480062,   5.        ,   5.53725385],
                              [ 22.56838062,   5.        ,   5.53725385],
                              [ 21.30745062,   5.        ,   7.72124867],
                              [ 19.33609062,   5.        ,   9.22875641],
                              [ 18.62566062,   5.        ,  10.45925727],
                              [ 17.20480062,   5.        ,  10.45925727],
                              [ 18.62566062,   5.        ,   7.99825556],
                              [ 17.20480062,   5.        ,   7.99825556],
                              [ 16.49437062,   5.        ,   9.22875641],
                              [ 15.07351062,   5.        ,   9.22875641],
                              [ 16.49437062,   5.        ,   6.7677547 ],
                              [ 20.43709062,   5.        ,   9.22875641],
                              [ 19.17616062,   5.        ,  11.41275124],
                              [ 14.52301062,   5.        ,   8.27526244],
                              [ 15.39337062,   5.        ,   6.7677547 ],
                              [ 17.20480062,   5.        ,  12.92025898],
                              [ 16.49437062,   5.        ,  14.15075984],
                              [ 15.07351062,   5.        ,  14.15075984],
                              [ 16.49437062,   5.        ,  11.68975812],
                              [ 15.07351062,   5.        ,  11.68975812],
                              [ 14.36308062,   5.        ,  12.92025898],
                              [ 12.94222062,   5.        ,  12.92025898],
                              [ 14.36308062,   5.        ,  10.45925727],
                              [ 18.30580062,   5.        ,  12.92025898],
                              [ 17.04487062,   5.        ,  15.1042538 ],
                              [ 12.39172062,   5.        ,  11.96676501],
                              [ 13.26208062,   5.        ,  10.45925727],
                              [ 15.07351062,   5.        ,  16.61176155],
                              [ 14.36308062,   5.        ,  17.8422624 ],
                              [ 12.94222062,   5.        ,  17.8422624 ],
                              [ 14.36308062,   5.        ,  15.38126069],
                              [ 12.94222062,   5.        ,  15.38126069],
                              [ 12.23179062,   5.        ,  16.61176155],
                              [ 10.81093062,   5.        ,  16.61176155],
                              [ 12.23179062,   5.        ,  14.15075984],
                              [ 16.17451062,   5.        ,  16.61176155],
                              [ 14.91358062,   5.        ,  18.79575637],
                              [ 10.26043062,   5.        ,  15.65826758],
                              [ 11.13079062,   5.        ,  14.15075984],
                              [ 12.94222062,   5.        ,  20.30326411],
                              [ 12.23179062,   5.        ,  21.53376497],
                              [ 10.81093062,   5.        ,  21.53376497],
                              [ 12.23179062,   5.        ,  19.07276326],
                              [ 10.81093062,   5.        ,  19.07276326],
                              [ 10.10050062,   5.        ,  20.30326411],
                              [  8.67964062,   5.        ,  20.30326411],
                              [ 10.10050062,   5.        ,  17.8422624 ],
                              [ 14.04322062,   5.        ,  20.30326411],
                              [ 12.78229062,   5.        ,  22.48725894],
                              [  8.12914062,   5.        ,  19.34977014],
                              [  8.99950062,   5.        ,  17.8422624 ],
                              [ 10.81093062,   5.        ,  23.99476668],
                              [ 10.10050062,   5.        ,  22.76426582],
                              [  8.67964062,   5.        ,  22.76426582],
                              [  7.96921062,   5.        ,  23.99476668],
                              [  6.54835062,   5.        ,  23.99476668],
                              [  7.96921062,   5.        ,  21.53376497],
                              [ 11.91193062,   5.        ,  23.99476668],
                              [  5.99785062,   5.        ,  23.04127271],
                              [  6.86821062,   5.        ,  21.53376497],
                              [ 10.81093062,   5.        ,  26.45576839],
                              [ 10.10050062,   5.        ,  25.22526753],
                              [  8.67964062,   5.        ,  25.22526753],
                              [  7.96921062,   5.        ,  26.45576839],
                              [  6.54835062,   5.        ,  26.45576839],
                              [  5.83792062,   5.        ,  25.22526753],
                              [ 11.91193062,   5.        ,  26.45576839],
                              [  4.73692062,   5.        ,  25.22526753],
                              [ 10.81093062,   5.        ,  28.9167701 ],
                              [ 10.10050062,   5.        ,  27.68626924],
                              [  8.67964062,   5.        ,  27.68626924],
                              [  7.96921062,   5.        ,  28.9167701 ],
                              [  6.54835062,   5.        ,  28.9167701 ],
                              [  5.83792062,   5.        ,  27.68626924],
                              [ 11.91193062,   5.        ,  28.9167701 ],
                              [  4.73692062,   5.        ,  27.68626924]]*Angstrom

# Set up configuration
central_region = BulkConfiguration(
    bravais_lattice=central_region_lattice,
    elements=central_region_elements,
    cartesian_coordinates=central_region_coordinates
    )

# Add metallic region
metallic_region_0 = BoxRegion(
    -1*Volt,
    xmin = 0*Angstrom, xmax = 27.8315*Angstrom,
    ymin = 0*Angstrom, ymax = 0.5*Angstrom,
    zmin = 4.922*Angstrom, zmax = 24.61*Angstrom
)

metallic_regions = [metallic_region_0]
central_region.setMetallicRegions(metallic_regions)

# Add dielectric region
dielectric_region_0 = BoxRegion(
    4,
    xmin = 0*Angstrom, xmax = 27.8315*Angstrom,
    ymin = 0.5*Angstrom, ymax = 3.57914*Angstrom,
    zmin = 4.922*Angstrom, zmax = 24.61*Angstrom
)

dielectric_regions = [dielectric_region_0]
central_region.setDielectricRegions(dielectric_regions)

device_configuration = DeviceConfiguration(
    central_region,
    [left_electrode, right_electrode]
    )

###############################################################
# Calculator
###############################################################
#----------------------------------------
# Numerical Accuracy Settings
#----------------------------------------
left_electrode_numerical_accuracy_parameters = NumericalAccuracyParameters(
    k_point_sampling=(1, 1, 100),
    )

right_electrode_numerical_accuracy_parameters = NumericalAccuracyParameters(
    k_point_sampling=(1, 1, 100),
    )

#----------------------------------------
# Electrode Calculators
#----------------------------------------
left_electrode_calculator = HuckelCalculator(
    numerical_accuracy_parameters=left_electrode_numerical_accuracy_parameters,
    )

right_electrode_calculator = HuckelCalculator(
    numerical_accuracy_parameters=right_electrode_numerical_accuracy_parameters,
    )

#----------------------------------------
# Device Calculator
#----------------------------------------
calculator = DeviceHuckelCalculator(
    electrode_calculators=
        [left_electrode_calculator, right_electrode_calculator],
    )

device_configuration.setCalculator(calculator)
nlprint(device_configuration)
device_configuration.update()
nlsave('analysis.nc', device_configuration)

transmission_spectrum = TransmissionSpectrum(
    configuration=device_configuration,
    energies=numpy.linspace(-2,2,100)*eV,
    kpoints=MonkhorstPackGrid(1,1,1),
    energy_zero_parameter=AverageFermiLevel,
    infinitesimal=1e-06*eV,
    self_energy_calculator=KrylovSelfEnergy(),
    )
nlsave('analysis.nc', transmission_spectrum)
nlprint(transmission_spectrum)

I receivered transmission spectrum
please check for me!

Offline zh

  • QuantumATK Support
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: Error when run the ATK 10.8
« Reply #1 on: October 1, 2010, 02:05 »
when I run this scrip:###############################################################
.........
I receivered transmission spectrum
please check for me!

Please clearly raise your question!!! What do you want us to check your calculated transmission spectrum?

Are this script file and the corresponding transmission spectrum related to the error message of "<ERROR: 'dict' object has no attribute 'len'>"? Since you can get the transmission spectrum by running the script file that you pasted, it means that the ATK can indeed work on your computer.

Offline hung

  • Regular QuantumATK user
  • **
  • Posts: 17
  • Reputation: 0
    • View Profile
Re: Error when run the ATK 10.8
« Reply #2 on: October 1, 2010, 09:40 »
I mean that transmission is right with its scrip which I posed.
thank you very much!

Offline zh

  • QuantumATK Support
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: Error when run the ATK 10.8
« Reply #3 on: October 1, 2010, 13:20 »
I mean that transmission is right with its scrip which I posed.
Then, what is the problem in your script file and the transmission spectrum?

When you raise a question, please don't just paste your input and output files to ask someone to check them.  Besides providing the related input and output files, you also need to point out your question clearly, e.g. the error message you have met,  the unreasonable behavior (or results) you thought in the output file, or others. Then, other people can easily understand your question to offer help.
« Last Edit: October 1, 2010, 13:27 by zh »