Upload simplified hybrid gauge rt-tddft#7429
Open
ESROAMER wants to merge 9 commits into
Open
Conversation
AsTonyshment
approved these changes
Jun 5, 2026
Collaborator
AsTonyshment
left a comment
There was a problem hiding this comment.
LGTM! Just have a few minor questions I am curious about.
| double sinp = 0.0, cosp = 0.0; | ||
| ModuleBase::libm::sincos(arg, &sinp, &cosp); | ||
| std::complex<double> kphase = std::complex<double>(cosp, sinp); | ||
| kphase *= phase_hybrid.at(r_index); |
Collaborator
There was a problem hiding this comment.
Passing and accessing std::map phase_hybrid using .at(r_index) inside the loops in folding_HR_td and cal_DMR_td introduces an std::vector indexed by ir to ensure
| { | ||
| hr_mat_p[ipol * step_trace] += tmp_r * Et; | ||
| hr_mat_p[ipol * step_trace] -= ((dtau + tau1) * Et) * sr_p[ipol * step_trace] * this->ucell->lat0; | ||
| hr_mat_p[ipol * step_trace] -= (dR * Et) * sr_p[ipol * step_trace] * this->ucell->lat0; |
Collaborator
There was a problem hiding this comment.
I found that (dtau + tau1) was simplified to dR. Is this identical?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's changed?
1.Simplified the formulas and implementation for the hybrid gauge.
2.Replaced some functions for current calculation with the new density matrix tool.
3.class
TD_infono longer depends on or stores theucellpointer.