rosswhitfield/javelin

Fourier example throws 'tuple index out of range'

Opened this issue · 0 comments

Installed javelin using conda in python 2.7 environment and try to run it in a notebook.

Code:

structure = read_stru("javelin/tests/data/pzn2.stru")
fourier = Fourier()  
fourier.structure = structure  
fourier.grid.r1 = -2, 2  
fourier.grid.r2 = -2, 2  
fourier.grid.bins = 201, 201  
print(fourier) 

Error:

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-5-6453aea7abb3> in <module>()
      4 fourier.grid.r2 = -2, 2
      5 fourier.grid.bins = 201, 201
----> 6 print(fourier)

/home/cades/miniconda3/envs/py27/lib/python2.7/site-packages/javelin-0.1.0-py2.7-linux-x86_64.egg/javelin/fourier.pyc in __str__(self)
    107              .format(self.number_of_lots, *self.lots),
    108              self.average,
--> 109              self.grid)
    110 
    111     @property

/home/cades/miniconda3/envs/py27/lib/python2.7/site-packages/javelin-0.1.0-py2.7-linux-x86_64.egg/javelin/structure.pyc in __str__(self)
    116         return "{}({}, {})".format(self.__class__.__name__,
    117                                    self.get_chemical_formula(),
--> 118                                    self.unitcell)
    119 
    120     def __len__(self):

/home/cades/miniconda3/envs/py27/lib/python2.7/site-packages/javelin-0.1.0-py2.7-linux-x86_64.egg/javelin/unitcell.pyc in __repr__(self)
     66 
     67     def __repr__(self):
---> 68         return "a={}, b={}, c={}, alpha={}, beta={}, gamma={}".format(*self.cell)
     69 
     70     def cartesian(self, u):

IndexError: tuple index out of range