Problem to import cif/xyz file for calculations

6 views
Skip to first unread message

Pikesh Pal

unread,
Jan 5, 2026, 8:26:08 AMJan 5
to OctaDist Forum
Hi, 
I am having following problem during import of cif file for calculations!
Please have a look!
>>> Program started
>>> OctaDist 3.1.0 2024
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\ProgramData\anaconda3\Lib\tkinter\__init__.py", line 2068, in __call__
    return self.func(*args)
           ~~~~~~~~~^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\octadist\main.py", line 483, in open_file
    self.search_coord()
    ~~~~~~~~~~~~~~~~~^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\octadist\main.py", line 508, in search_coord
    atom_full, coord_full = io.extract_coord(self.file_list[i])
                            ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\octadist\src\io.py", line 790, in extract_coord
    atom, coord = get_coord_cif(file)
                  ~~~~~~~~~~~~~^^^^^^
  File "C:\ProgramData\anaconda3\Lib\site-packages\octadist\src\io.py", line 131, in get_coord_cif
    structure = pymatgen.Structure.from_file(f)
                ^^^^^^^^^^^^^^^^^^
AttributeError: module 'pymatgen' has no attribute 'Structure'
Thank you in advance for support!
Regards,
Pikesh

Rangsiman Ketkaew

unread,
Jan 23, 2026, 5:12:12 AMJan 23
to OctaDist Forum
Hi Pikesh,

Have you solved the problem?

Best,
Rangsiman

Rangsiman Ketkaew

unread,
Jan 23, 2026, 6:30:24 AMJan 23
to OctaDist Forum
It seems that Pymatgen is outdated, and the Structure method has already been moved to be under the core module in a new version of Pymatgen. I have fixed the bug and updated it in the nightly-build branch of OctaDist. https://github.com/OctaDist/OctaDist/commit/b81709ab693b7501e4f50f8647f36375bba6ab2e

To make it work, please try uninstalling the current OctaDist and install a new one from the nightly-build branch using the following command:

> pip uninstall octadist
> pip3 uninstall octadist
> octadist

Once the program started, it should be able to load and read CIF structure.

Hope this helps and let me know if you're struggling with the problem.

Best,
Rangsiman

Reply all
Reply to author
Forward
0 new messages