Skip to content

Conversation

@ESROAMER
Copy link
Collaborator

@ESROAMER ESROAMER commented Nov 2, 2024

The force calculations in rt-TDDFT for periodic systems are incorrect and inconsistent with the results of AIMD. This problem was first discovered by @dyzheng in PR #4879 .This issue is caused by the incorrect implementation of the cal_edm_tddft function, which does not update the HS matrix for each k-point and does not use the correct matrix indices. For ground state calculations, rt-TDDFT should yield results that are expected to be consistent with AIMD. Below is a display of the results before and after this fix.
AIMD:
屏幕截图 2024-11-02 115635
rt-TDDFT(before fix):
屏幕截图 2024-11-02 115654
The forces in this case is completely unreasonable.
rt-tddft(after fix):
屏幕截图 2024-11-02 115711
There is still a very small numerical error, but the results are good enough to demonstrate that the fix is correct.

Linked Issue

Fix #5333

@AsTonyshment
Copy link
Collaborator

So is this related to issue #5333? @ESROAMER

@ESROAMER
Copy link
Collaborator Author

ESROAMER commented Nov 4, 2024

So is this related to issue #5333? @ESROAMER

Yes, at least part of the reason. Without fixing cal_edm_tddft, the ionic dynamics of periodic systems is certainly incorrect. I'll link issue #5333 in this PR. Please test issue #5333 again with this PR to see if the problem is resolved. @AsTonyshment

@AsTonyshment
Copy link
Collaborator

So is this related to issue #5333? @ESROAMER

Yes, at least part of the reason. Without fixing cal_edm_tddft, the ionic dynamics of periodic systems is certainly incorrect. I'll link issue #5333 in this PR. Please test issue #5333 again with this PR to see if the problem is resolved. @AsTonyshment

Thanks a lot. This really has confused me for a long time.

@mohanchen mohanchen added the Bugs Bugs that only solvable with sufficient knowledge of DFT label Nov 4, 2024
@mohanchen mohanchen merged commit 628bdc6 into deepmodeling:develop Nov 4, 2024
14 checks passed
@mohanchen
Copy link
Collaborator

Excellent job.

Fisherd99 pushed a commit to Fisherd99/abacus-BSE that referenced this pull request Mar 31, 2025
* Add files via upload

* Update cal_edm_tddft.cpp

* Update result.ref

* Fix wrong parameters in integrate test

* Update result.ref

* Update result.ref

* Update result.ref

* Update result.ref

* Update result.ref

* Update result.ref

* Update result.ref

* Update result.ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugs Bugs that only solvable with sufficient knowledge of DFT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: TDDFT Ehrenfest MD energy not acting as expected

3 participants