Wrong output Matrices in tddft calculation
Describe the bug
The output Matrices, H(R),S(R),S(k),are totally wrong if 'esolver_type=tddft'. It's a problem occurs only in versions later than 3.5.0. Since tddft didn't changed from 3.4.4 to 3.5.0, I guess the reason is that the output function has changed, yet tddft didn't change correspondly. Please fix this.
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).
Thanks for your report! We will fix it soon.
Sorry, I was wrong about the version. There are two different problems: The first is wrong output of Sk, it occurs after version 3.5.1 in tddft calculation. According to my result, I guess ABACUS just output Sk with data of Hk martix, since they are exactly the same. The second is wrong output of HR, it occurs after version 3.5.3, and I know its reason. It was due to the velocity gague code, in which a new HR was set up to store the complex correction term. To output the correct HR, these term should be included.
Sorry, I was wrong about the version. There are two different problems: The first is wrong output of Sk, it occurs after version 3.5.1 in tddft calculation. According to my result, I guess ABACUS just output Sk with data of Hk martix, since they are exactly the same. The second is wrong output of HR, it occurs after version 3.5.3, and I know its reason. It was due to the velocity gague code, in which a new HR was set up to store the complex correction term. To output the correct HR, these term should be included.
So can you fix the part related to $H(\boldsymbol{R})$ @ESROAMER (since I am not familiar with the velocity gauge code)? I'll try to fix the remaining problems with respect to $S(\boldsymbol{R})$ and $S(\boldsymbol{k})$.
Sorry, I was wrong about the version. There are two different problems: The first is wrong output of Sk, it occurs after version 3.5.1 in tddft calculation. According to my result, I guess ABACUS just output Sk with data of Hk martix, since they are exactly the same. The second is wrong output of HR, it occurs after version 3.5.3, and I know its reason. It was due to the velocity gague code, in which a new HR was set up to store the complex correction term. To output the correct HR, these term should be included.
So can you fix the part related to H(R) @ESROAMER (since I am not familiar with the velocity gauge code)? I'll try to fix the remaining problems with respect to S(R) and S(k).
Ok, I'll handle the problem of HR. The SR matrix is correct, you may just check the part of Sk. @AsTonyshment