ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Functions
PulayForceStress Namespace Reference

Functions

template<typename TK , typename TR >
void cal_pulay_fs (ModuleBase::matrix &f, ModuleBase::matrix &s, const elecstate::DensityMatrix< TK, TR > &dm, const UnitCell &ucell, const Parallel_Orbitals &pv, const double *(&dHSx)[3], const double *(&dHSxy)[6], const bool &isforce, const bool &isstress, Record_adj *ra=nullptr, const double &factor_force=1.0, const double &factor_stress=1.0)
 for 2-center-integration terms, provided force and stress derivatives
 
template<typename TK , typename TR >
void cal_pulay_fs (ModuleBase::matrix &f, ModuleBase::matrix &s, const elecstate::DensityMatrix< TK, TR > &dm, const UnitCell &ucell, const Parallel_Orbitals &pv, const double *(&dHSx)[3], const double *dtau, const bool &isforce, const bool &isstress, Record_adj *ra=nullptr, const double &factor_force=1.0, const double &factor_stress=1.0)
 for 2-center-integration terms, provided force derivatives and coordinate difference
 
template<typename TK , typename TR >
void cal_pulay_fs (ModuleBase::matrix &f, ModuleBase::matrix &s, const elecstate::DensityMatrix< TK, TR > &dm, const UnitCell &ucell, const elecstate::Potential *pot, typename TGint< TK >::type &gint, const bool &isforce, const bool &isstress, const bool &set_dmr_gint=true)
 for grid-integration terms
 
template<>
void cal_pulay_fs (ModuleBase::matrix &f, ModuleBase::matrix &s, const elecstate::DensityMatrix< double, double > &dm, const UnitCell &ucell, const Parallel_Orbitals &pv, const double *(&dHSx)[3], const double *(&dHSxy)[6], const bool &isforce, const bool &isstress, Record_adj *ra, const double &factor_force, const double &factor_stress)
 
template<>
void cal_pulay_fs (ModuleBase::matrix &f, ModuleBase::matrix &s, const elecstate::DensityMatrix< std::complex< double >, double > &dm, const UnitCell &ucell, const Parallel_Orbitals &pv, const double *(&dHSx)[3], const double *(&dHSxy)[6], const bool &isforce, const bool &isstress, Record_adj *ra, const double &factor_force, const double &factor_stress)
 
template<>
void cal_pulay_fs (ModuleBase::matrix &f, ModuleBase::matrix &s, const elecstate::DensityMatrix< std::complex< double >, double > &dm, const UnitCell &ucell, const Parallel_Orbitals &pv, const double *(&dHSx)[3], const double *dtau, const bool &isforce, const bool &isstress, Record_adj *ra, const double &factor_force, const double &factor_stress)
 
template<typename TK , typename TR , typename Tfunc >
void cal_pulay_fs (ModuleBase::matrix &f, ModuleBase::matrix &s, const elecstate::DensityMatrix< TK, TR > &dm, const UnitCell &ucell, const Parallel_Orbitals &pv, const double **dHSx, const double **dHSxy, const double *dtau, const bool &isforce, const bool &isstress, Record_adj *ra, const double &factor_force, const double &factor_stress, Tfunc &stress_func)
 

Detailed Description

calculate the abstract formulas: $Tr[D*dH/dx]$ (force) and $1/V Tr[D*(dH/dx_a*x_b)]$ (stress) where D can be any (energy) density matrix and H can be any operator

Function Documentation

◆ cal_pulay_fs() [1/7]

template<>
void PulayForceStress::cal_pulay_fs ( ModuleBase::matrix f,
ModuleBase::matrix s,
const elecstate::DensityMatrix< double, double > &  dm,
const UnitCell ucell,
const Parallel_Orbitals pv,
const double *(&)  dHSx[3],
const double *(&)  dHSxy[6],
const bool &  isforce,
const bool &  isstress,
Record_adj ra,
const double &  factor_force,
const double &  factor_stress 
)
Here is the call graph for this function:

◆ cal_pulay_fs() [2/7]

template<>
void PulayForceStress::cal_pulay_fs ( ModuleBase::matrix f,
ModuleBase::matrix s,
const elecstate::DensityMatrix< std::complex< double >, double > &  dm,
const UnitCell ucell,
const Parallel_Orbitals pv,
const double *(&)  dHSx[3],
const double *(&)  dHSxy[6],
const bool &  isforce,
const bool &  isstress,
Record_adj ra,
const double &  factor_force,
const double &  factor_stress 
)
Here is the call graph for this function:

◆ cal_pulay_fs() [3/7]

template<>
void PulayForceStress::cal_pulay_fs ( ModuleBase::matrix f,
ModuleBase::matrix s,
const elecstate::DensityMatrix< std::complex< double >, double > &  dm,
const UnitCell ucell,
const Parallel_Orbitals pv,
const double *(&)  dHSx[3],
const double *  dtau,
const bool &  isforce,
const bool &  isstress,
Record_adj ra,
const double &  factor_force,
const double &  factor_stress 
)
Here is the call graph for this function:

◆ cal_pulay_fs() [4/7]

template<typename TK , typename TR >
void PulayForceStress::cal_pulay_fs ( ModuleBase::matrix f,
ModuleBase::matrix s,
const elecstate::DensityMatrix< TK, TR > &  dm,
const UnitCell ucell,
const elecstate::Potential pot,
typename TGint< TK >::type &  gint,
const bool &  isforce,
const bool &  isstress,
const bool &  set_dmr_gint = true 
)

for grid-integration terms

Parameters
[out]fforce
[out]sstress
[in]dmdensity matrix or energy density matrix
[in]ucellunit cell
[in]potpotential on grid
[in]gintGint object
Here is the call graph for this function:

◆ cal_pulay_fs() [5/7]

template<typename TK , typename TR >
void PulayForceStress::cal_pulay_fs ( ModuleBase::matrix f,
ModuleBase::matrix s,
const elecstate::DensityMatrix< TK, TR > &  dm,
const UnitCell ucell,
const Parallel_Orbitals pv,
const double *(&)  dHSx[3],
const double *(&)  dHSxy[6],
const bool &  isforce,
const bool &  isstress,
Record_adj ra = nullptr,
const double &  factor_force = 1.0,
const double &  factor_stress = 1.0 
)

for 2-center-integration terms, provided force and stress derivatives

Parameters
[out]fforce
[out]sstress
[in]dmdensity matrix or energy density matrix
[in]ucellunit cell
[in]pvparallel orbitals
[in]dHSxdHSx x, y, z, for force
[in]dHSxydHSxy 11, 12, 13, 22, 23, 33, for stress
Here is the caller graph for this function:

◆ cal_pulay_fs() [6/7]

template<typename TK , typename TR >
void PulayForceStress::cal_pulay_fs ( ModuleBase::matrix f,
ModuleBase::matrix s,
const elecstate::DensityMatrix< TK, TR > &  dm,
const UnitCell ucell,
const Parallel_Orbitals pv,
const double *(&)  dHSx[3],
const double *  dtau,
const bool &  isforce,
const bool &  isstress,
Record_adj ra = nullptr,
const double &  factor_force = 1.0,
const double &  factor_stress = 1.0 
)

for 2-center-integration terms, provided force derivatives and coordinate difference

Parameters
[out]fforce
[out]sstress
[in]dmdensity matrix or energy density matrix
[in]ucellunit cell
[in]pvparallel orbitals
[in]dHSxdHSx x, y, z, for force and stress
[in]dtaudr x, y, z, for stress

◆ cal_pulay_fs() [7/7]

template<typename TK , typename TR , typename Tfunc >
void PulayForceStress::cal_pulay_fs ( ModuleBase::matrix f,
ModuleBase::matrix s,
const elecstate::DensityMatrix< TK, TR > &  dm,
const UnitCell ucell,
const Parallel_Orbitals pv,
const double **  dHSx,
const double **  dHSxy,
const double *  dtau,
const bool &  isforce,
const bool &  isstress,
Record_adj ra,
const double &  factor_force,
const double &  factor_stress,
Tfunc &  stress_func 
)
inline
Here is the call graph for this function: