Skip to content

Conversation

@mohanchen
Copy link
Collaborator

Delete update_pot() in ESolver

…update_pot, which is replaced by update_pot function in estate, the other is save2 function used in after_iter
@mohanchen mohanchen added Refactor Refactor ABACUS codes The Absolute Zero Reduce the "entropy" of the code to 0 labels Oct 17, 2025
Copy link
Collaborator

@AsTonyshment AsTonyshment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When update_pot() was replaced with the global elecstate::update_pot() function, this TDDFT-specific saving logic was lost, causing all RT-TDDFT tests to fail.

This is a little bit tricky because we needed to find a way to preserve the TDDFT-specific save2 functionality (which handles Hamiltonian storage). The challenge was that only TDDFT solvers require this additional saving step, but we need to call it from the common iter_finish method in the base ESolver_KS class.

I have (temporarily) completed the call to the save2 function through the following scheme, and I am currently unaware of whether there is a better solution:

Copy link
Collaborator

@AsTonyshment AsTonyshment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mohanchen mohanchen merged commit 1a49431 into deepmodeling:develop Oct 18, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Refactor ABACUS codes The Absolute Zero Reduce the "entropy" of the code to 0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants