Skip to content

Simulation crashes when loading .cif file #1

@DaanWielens

Description

@DaanWielens

I would like to try to use the software to simulate RHEED patterns of InP(111)A. To start, I have simply downloaded a InP .cif file (http://crystallography.net/cod/1010146.cif). From the main window, I selected 'Simulation', then 'Diffraction Pattern'. When loading the .cif file, the log shows:

Initialized!
CIF opened!
Adding sample 1
Sample 1 loaded!
Constructing sample 1
Finished construction of sample 1

Then, Windows notifies me that Python has stopped working.

The console shows:

C:\Users\Daan\git\PyRHEED\Source>python Main.py
Shadows are not yet supported for OpenGL ES2
Traceback (most recent call last):
  File "C:\Program Files (x86)\Python\lib\site-packages\pandas\core\indexes\base.py", line 2657, in get_loc
    return self._engine.get_loc(key)
  File "pandas\_libs\index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\hashtable_class_helper.pxi", line 1601, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas\_libs\hashtable_class_helper.pxi", line 1608, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'P3-'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Daan\git\PyRHEED\Source\SimulateRHEED.py", line 581, in getCifPath
    self.addSampleData(self.structure_index)
  File "C:\Users\Daan\git\PyRHEED\Source\SimulateRHEED.py", line 677, in addSampleData
    colorPicker = IndexedColorPicker(str(name),self.colors[i],self.AR.loc[str(name)].at['Normalized Radius'],index)
  File "C:\Program Files (x86)\Python\lib\site-packages\pandas\core\indexing.py", line 1500, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
  File "C:\Program Files (x86)\Python\lib\site-packages\pandas\core\indexing.py", line 1913, in _getitem_axis
    return self._get_label(key, axis=axis)
  File "C:\Program Files (x86)\Python\lib\site-packages\pandas\core\indexing.py", line 141, in _get_label
    return self.obj._xs(label, axis=axis)
  File "C:\Program Files (x86)\Python\lib\site-packages\pandas\core\generic.py", line 3585, in xs
    loc = self.index.get_loc(key)
  File "C:\Program Files (x86)\Python\lib\site-packages\pandas\core\indexes\base.py", line 2659, in get_loc
    return self._engine.get_loc(self._maybe_cast_indexer(key))
  File "pandas\_libs\index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\hashtable_class_helper.pxi", line 1601, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas\_libs\hashtable_class_helper.pxi", line 1608, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'P3-'

It looks like the program has trouble in reading the .cif file, but since it is downloaded directly from the crystallographic database and is working fine in VESTA, I assume the file itself is fine...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions