abacus-develop icon indicating copy to clipboard operation
abacus-develop copied to clipboard

[Bug] There is no convergence information while using `bfgs_trad`

Open QuantumMisaka opened this issue 3 months ago • 1 comments

Describe the bug

Bug Issue from QQ group:

When using bfgs_trad as relax_method, there is no Relaxation is converged information in running_relax.log, leading to failure when using ASE-ABACUS to read running_relax.log in ATST-Tools:

File "/home/cc/miniconda3/envs/abacus-ase/lib/python3.13/site-packages/ase/io/abacus.py", line 1997, in _get_abacus_chunks
    if not non_convergence_ok and not final_chunk.converged:
                                      ^^^^^^^^^^^^^^^^^^^^^
  File "/home/cc/miniconda3/envs/abacus-ase/lib/python3.13/functools.py", line 1026, in __get__
    val = self.func(instance)
  File "/home/cc/miniconda3/envs/abacus-ase/lib/python3.13/site-packages/ase/io/abacus.py", line 1834, in converged
    return self.relaxation_convergency
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cc/miniconda3/envs/abacus-ase/lib/python3.13/functools.py", line 1026, in __get__
    val = self.func(instance)
  File "/home/cc/miniconda3/envs/abacus-ase/lib/python3.13/site-packages/ase/io/abacus.py", line 1733, in relaxation_convergency
    return self._relaxation_convergency[self.index]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
IndexError: index -1 is out of bounds for axis 0 with size 0

When using default cg, this message can be throw out normally and ASE-ABACUS read fine.

Expected behavior

bfgs_trad should throw correct convergence information after relax converged

To Reproduce

  • find any structure
  • do relax with bfgs_trad
  • use ASE-ABACUS to read the running_relax.log

Environment

ABACUS LTS 3.10.0 ASE-ABACUS latest ATST-Tools 1.5.0

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).

QuantumMisaka avatar Sep 29 '25 02:09 QuantumMisaka

@19hello Do you have and idea ?

QuantumMisaka avatar Sep 29 '25 02:09 QuantumMisaka