Force calculation for hybrid gauge rt-tddft#7474
Conversation
| Exx_NAO<T> &exx_nao, | ||
| ModuleSymmetry::Symmetry* symm) | ||
| ModuleSymmetry::Symmetry* symm, | ||
| hamilt::Hamilt<T>* p_hamilt) |
There was a problem hiding this comment.
the p_hamilt seems useless in this function?
There was a problem hiding this comment.
This p_hamilt is used in force_rt_overlap.cpp to obtain Hk.
| two_center_bundle.overlap_orb_beta.get()); | ||
| tmp_nonlocal.cal_force_stress(isforce, isstress, dmR, fvnl_dbeta, svnl_dbeta); | ||
|
|
||
| if(PARAM.inp.td_stype == 2) |
There was a problem hiding this comment.
avoid using PARAM directly, try to pass input as a parameter
| void TD_pot_hybrid<OperatorLCAO<std::complex<double>, std::complex<double>>>::cal_force_IJR(const int& iat1, | ||
| const int& iat2, | ||
| const Parallel_Orbitals* paraV, | ||
| const ModuleBase::Vector3<double>& dtau, | ||
| const ModuleBase::Vector3<double>& dR, | ||
| std::complex<double>* dmR_pointer, | ||
| double* force1, | ||
| double* force2) | ||
| { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Currently, the template specialization for OperatorLCAO<std::complex<double>, std::complex<double>> simply contains a return; statement. I wanted to double-check: is this early return the intended behavior here?
If it is correct/intentional (e.g., this term is physically zero, or does not require this specific force correction), it would be great to add a brief comment explaining why it's skipped.
If it is a placeholder for a feature that is yet to be implemented, I would strongly recommend adding an explicit abort (e.g., ModuleBase::WARNING_QUIT). This will prevent the code from silently failing if a user attempts a calculation before the feature is complete.
There was a problem hiding this comment.
That's a very good point. I will add a WARNING_QUIT.
What's changed?
td_dtis small, at least 0.01 fs).tend.Linked Issue
#6671