Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASE-ABACUS can't read from v3.7.1 #5200

Open
16 tasks
MoseyQAQ opened this issue Oct 1, 2024 · 3 comments
Open
16 tasks

ASE-ABACUS can't read from v3.7.1 #5200

MoseyQAQ opened this issue Oct 1, 2024 · 3 comments
Assignees
Labels
Bugs (Exclude input and output) Bugs that only solvable with sufficient knowledge of DFT

Comments

@MoseyQAQ
Copy link

MoseyQAQ commented Oct 1, 2024

Describe the bug

I am trying to read the results obtained from ABACUS-3.7.1 using the latest ASE-ABACUS interface:

from ase.io import read, write
atoms = read("running_relax.log", format='abacus-out')

It seems that the new version of the ASE-ABACUS interface doesn't support reading output files from the older version of ABACUS. This leads to an IndexError during the reading process.

   atoms = read("running_relax.log", format='abacus-out')
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\io\formats.py", line 806, in read
    return next(_iread(filename, slice(index, None), format, io,
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\parallel.py", line 302, in new_generator
    for result in generator(*args, **kwargs):
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\io\formats.py", line 872, in _iread
    for dct in io.read(fd, *args, **kwargs):
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\io\formats.py", line 630, in wrap_read_function
    yield from read(filename, index, **kwargs)
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\utils\__init__.py", line 577, in iofunc
    obj = func(fd, *args, **kwargs)
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\io\abacus.py", line 2040, in read_abacus_out
    chunks = _get_abacus_chunks(fd, index, non_convergence_ok)
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\utils\__init__.py", line 577, in iofunc
    obj = func(fd, *args, **kwargs)
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\io\abacus.py", line 2025, in _get_abacus_chunks
    final_chunk = AbacusOutCalcChunk(calc_contents, header_chunk, -1)
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\io\abacus.py", line 1263, in __init__
    self._header = header.header_summary
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\utils\__init__.py", line 678, in getter
    cache[name] = meth(self)
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\io\abacus.py", line 1230, in header_summary
    "initial_atoms": self.initial_atoms,
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\utils\__init__.py", line 678, in getter
    cache[name] = meth(self)
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\io\abacus.py", line 1095, in initial_atoms
    labels, positions, mag, vel = self.initial_site
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\utils\__init__.py", line 678, in getter
    cache[name] = meth(self)
  File "D:\Softwares\Anaconda3\lib\site-packages\ase\io\abacus.py", line 1089, in initial_site
    return parse_block(self._parse_site()[0])
IndexError: list index out of range

Is there any fast method to fix this? Or I can just use a newer version of ABACUS to perform SCF calculation, or use an older version of ASE-ABACUS.

I believe it would be more robust if ASE-ABACUS could read from a JSON file generated by RapidJSON.

Expected behavior

No response

To Reproduce

No response

Environment

No response

Additional Context

No response

Task list for Issue attackers (only for developers)

  • Verify the issue is not a duplicate.
  • Describe the bug.
  • Steps to reproduce.
  • Expected behavior.
  • Error message.
  • Environment details.
  • Additional context.
  • Assign a priority level (low, medium, high, urgent).
  • Assign the issue to a team member.
  • Label the issue with relevant tags.
  • Identify possible related issues.
  • Create a unit test or automated test to reproduce the bug (if applicable).
  • Fix the bug.
  • Test the fix.
  • Update documentation (if necessary).
  • Close the issue and inform the reporter (if applicable).
@mohanchen mohanchen added the Bugs (Exclude input and output) Bugs that only solvable with sufficient knowledge of DFT label Oct 2, 2024
@WHUweiqingzhou
Copy link
Collaborator

Please Try v3.7.3 or later version.

@WHUweiqingzhou
Copy link
Collaborator

We should polish our interface tests @pxlxingliang

@QuantumMisaka
Copy link
Collaborator

@MoseyQAQ ABACUS newer version like 3.8.0 is recommended

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugs (Exclude input and output) Bugs that only solvable with sufficient knowledge of DFT
Projects
None yet
Development

No branches or pull requests

5 participants