Closed WHUweiqingzhou closed 2 weeks ago
Good idea, maybe the local potential grid integration can also be moved into operator Veff
and finally ftable
can be deleted?
Another suggestion is that, the two common interfaces can be designed like cal_force_stress(const DensityMatrix<T>& dm)
and cal_force_stress(const double** rho)
declared in the base class OperatorLCAO
to be overridden , while other dependences are passed into the constructor of each operator. The inspiration comes from my need to call each term twice with everything the same except for the density (matrix) in #2460.
How to leave extra freedom for GPU implementation of force should be considerd.
Background
In the current code, the part related to the density matrix has already been substituted with the reconstructed HContainer module from version 3.4.0. However, other physical quantities are still utilizing the old data structures. This leads to:
Intended file deletion:
Intended data deletion:
Describe the solution you'd like
hamilt::EkineticNew<hamilt::OperatorLCAO<TK, TR>>::cal_force_stress
For specifics, refer toDFTU<OperatorLCAO<TK, TR>>::cal_force_stress
cal_foverlap
,cal_ftvnl_dphi
,cal_fvnl_dbeta
fromftable_gamma
andftable_k
, and directly callcal_force_stress
inForce_Stress_LCAO<T>::getForceStress()
to calculate the forces and stresses corresponding to each operatorftable_gamma
andftable_k
should only contain the contributions from the local potential grid integration.Task list only for developers
Notice Possible Changes of Behavior (Reminder only for developers)
No response
Notice any changes of core modules (Reminder only for developers)
No response
Notice Possible Changes of Core Modules (Reminder only for developers)
No response
Additional Context
No response
Task list for Issue attackers (only for developers)