QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: ziand on February 10, 2012, 16:52

Title: Maybe a bug in BlochState
Post by: ziand on February 10, 2012, 16:52
It is not very serious but I still report it:

The following code
Code
cnt=NanoTube(6,0)
cnt.setCalculator(HuckelCalculator())
bloch=BlochState(cnt)
Does a Huckel calculation for the CNT and throws an error
Code
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...\<ipython console> in <module>()
...\atkpython\bin\python26.zip\NL\Analysis\BlochState.pyc in __init__(self, configuration, quantum_number, spin, k_point)
...\atkpython\bin\python26.zip\NL\Analysis\BlochState.pyc in calculateBlochState(self, analysis, quantum_number, configuration, spin, k_point)
...\atkpython\bin\python26.zip\NLEngine.pyc in extractColumn(self, *args)
TypeError: in method 'ComplexMatrix_extractColumn', argument 2 of type 'int'
the same happens for
Code
bloch=BlochState(cnt,k_point=[0,0,0])
but not for
Code
bloch=BlochState(cnt,quantum_number=0)
Title: Re: Maybe a bug in BlochState
Post by: Anders Blom on February 10, 2012, 20:32
Yes, it's kind of a bug (wrong class returned); we'll try to find time to fix it for 12.2. You can work around it in a simple way for now:

Code: python
cnt=NanoTube(6,0).repeat(1,1,1)