QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: jianjin dong on May 28, 2010, 05:23

Title: IndexError: index out of bounds
Post by: jianjin dong on May 28, 2010, 05:23
Hello,everyone!I meet a problem at present.
I want to design a two-probe system made of Au. I make it in the Bulk Builder at first. When I drop it to the Device From Bulk. An error comes out:

Traceback (most recent call last):
  File ".\zipdir\NL\GUI\Core\Runner.py", line 232, in run
  File ".\zipdir\NL\GUI\Tools\CustomBuilder\Builders\DeviceFromBulk.py", line 149, in configuration
  File ".\zipdir\NL\CommonConcepts\PhysicalQuantity.py", line 751, in __mul__
IndexError: index out of bounds

Info: Script generator function does not generate a valid configuration.

I don't know how to correct my system according to the errror. Could you give me some advice?
Thanks for your time! 
Title: Re: IndexError: index out of bounds
Post by: youngjfly on May 28, 2010, 16:11
it may help if you construct the bulk in crystal cupboard.
Title: Re: IndexError: index out of bounds
Post by: jianjin dong on May 28, 2010, 16:54
Thanks for your suggestions. I am still confused that I found Crystal Cupboard of Database is data bank. Could you tell me how to use it to design Au probes? Thanks a lot!
Title: Re: IndexError: index out of bounds
Post by: Anders Blom on May 28, 2010, 16:59
In general, the 2010.02 is a beta version with limited support. A new release (also a beta, but dramatically improved) is scheduled within a few weeks, pending a final joint upgrade of both 2010.02 and 2008.10 later this summer.

It might be that this is a bug, hopefully it's fixed in the new release then. We can test it with our internal code, if you give us some more details... In general, when asking for support, please provide relevant details how to reproduce the error, step by step (in detail!), otherwise we cannot help. Also, attach any relevant scripts - in this case, the one produced by the Bulk Builder and dropped on Device From Bulk.

Title: Re: IndexError: index out of bounds
Post by: jianjin dong on May 29, 2010, 09:59
Thank you for your advice and I will explain my question in detail. I want to use ATK to set up a two-probe system and the probes are made of Au atoms.

At first, I set up the probes in Bulk Builder according to the radium of Au atoms.  The following is the script of produced by the Bulk Builder:

###############################################################
# NL Module imports
###############################################################
from NanoLanguage import *

# Set up lattice
vector_a = [24.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 10.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 21.95]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold,
            Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold,
            Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold,
            Gold, Gold, Gold, Gold, Gold, Gold]

# Define coordinates
cartesian_coordinates = [[  8.1 ,   5.  ,  12.95],
                         [ 10.7 ,   5.  ,  12.95],
                         [ 13.3 ,   5.  ,  12.95],
                         [ 15.9 ,   5.  ,  12.95],
                         [  9.4 ,   5.  ,  15.2 ],
                         [ 12.  ,   5.  ,  15.2 ],
                         [ 14.6 ,   5.  ,  15.2 ],
                         [  8.1 ,   5.  ,  17.45],
                         [ 10.7 ,   5.  ,  17.45],
                         [ 13.3 ,   5.  ,  17.45],
                         [ 15.9 ,   5.  ,  17.45],
                         [  9.4 ,   5.  ,  19.7 ],
                         [ 12.  ,   5.  ,  19.7 ],
                         [ 14.6 ,   5.  ,  19.7 ],
                         [  6.8 ,   5.  ,  15.2 ],
                         [ 17.2 ,   5.  ,  15.2 ],
                         [  6.8 ,   5.  ,  19.7 ],
                         [ 17.2 ,   5.  ,  19.7 ],
                         [  8.1 ,   5.  ,   9.  ],
                         [ 10.7 ,   5.  ,   9.  ],
                         [ 13.3 ,   5.  ,   9.  ],
                         [ 15.9 ,   5.  ,   9.  ],
                         [  9.4 ,   5.  ,   6.75],
                         [ 12.  ,   5.  ,   6.75],
                         [ 14.6 ,   5.  ,   6.75],
                         [  8.1 ,   5.  ,   4.5 ],
                         [ 10.7 ,   5.  ,   4.5 ],
                         [ 13.3 ,   5.  ,   4.5 ],
                         [ 15.9 ,   5.  ,   4.5 ],
                         [  9.4 ,   5.  ,   2.25],
                         [ 12.  ,   5.  ,   2.25],
                         [ 14.6 ,   5.  ,   2.25],
                         [  6.8 ,   5.  ,   6.75],
                         [ 17.2 ,   5.  ,   6.75],
                         [  6.8 ,   5.  ,   2.25],
                         [ 17.2 ,   5.  ,   2.25]]*Angstrom

# Set up configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    cartesian_coordinates=cartesian_coordinates
    )

Then I want to drop it to the Device From Bulk but it is not successful. An error comes our in the Log of Device From Bulk. It says that index out of bounds.

I am not sure whether I explain my question clearly, if not, please tell me because this is my first time to use this forum. So what can I do for solving this problem?

Thank you very much!
Title: Re: IndexError: index out of bounds
Post by: Anders Blom on May 31, 2010, 10:59
2010.02 isn't quite ready yet. This example is a good one that we can use to improve the functionality!

Try removing the tickmark for "Fine tune" and set the electrodes manually to the period length you want, i.e. N*2.25 Å. You may have to set it to slightly above or below, like 4.500001. In that case you can easily adjust this in the script afterwards.
Title: Re: IndexError: index out of bounds
Post by: jianjin dong on June 3, 2010, 16:38
Thank you, Anders Blom!
I will follow your advice to modify my probes.
Thanks again.
Jianjin Dong