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

Functions

template<typename TK>
ModuleBase::matrix cal_pulay_fs (const module_dm::DensityMatrix< TK, double > &dm, const UnitCell &ucell, const std::vector< hamilt::HContainer< double > > &dHS, const double &factor_force=1.0)
 for 2-center-integration terms, provided HS derivatives
template<typename TK>
ModuleBase::matrix cal_pulay_fs (const module_dm::DensityMatrix< TK, double > &dm, const UnitCell &ucell, const LR::PotLRBase *pot)
 for grid-integration terms
template<typename TK>
ModuleBase::matrix cal_pulay_fs_openshell (const module_dm::DensityMatrix< TK, double > &dm, const UnitCell &ucell, const LR::PotLRBase *pot)
 Open-shell (spin-unrestricted) counterpart of the grid cal_pulay_fs above.
template<typename TK, typename TR>
void cal_pulay_fs (ModuleBase::matrix &f, ModuleBase::matrix &s, const module_dm::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 module_dm::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 (const int nspin, ModuleBase::matrix &f, ModuleBase::matrix &s, const module_dm::DensityMatrix< TK, TR > &dm, const UnitCell &ucell, const elecstate::Potential *pot, const bool &isforce, const bool &isstress, const bool &set_dmr_gint=true)
 for grid-integration terms
template<typename TK, typename TR, typename Tfunc>
void cal_pulay_fs (ModuleBase::matrix &f, ModuleBase::matrix &s, const module_dm::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/6]

template<typename TK, typename TR>
void PulayForceStress::cal_pulay_fs ( const int nspin,
ModuleBase::matrix & f,
ModuleBase::matrix & s,
const module_dm::DensityMatrix< TK, TR > & dm,
const UnitCell & ucell,
const elecstate::Potential * pot,
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
Here is the call graph for this function:

◆ cal_pulay_fs() [2/6]

template<typename TK>
ModuleBase::matrix PulayForceStress::cal_pulay_fs ( const module_dm::DensityMatrix< TK, double > & dm,
const UnitCell & ucell,
const LR::PotLRBase * pot )

for grid-integration terms

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

◆ cal_pulay_fs() [3/6]

template<typename TK>
ModuleBase::matrix PulayForceStress::cal_pulay_fs ( const module_dm::DensityMatrix< TK, double > & dm,
const UnitCell & ucell,
const std::vector< hamilt::HContainer< double > > & dHS,
const double & factor_force = 1.0 )

for 2-center-integration terms, provided HS derivatives

Parameters
[in]dmdensity matrix or energy density matrix
[in]ucellunit cell
[in]dHSdHS x, y, z, for force
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_pulay_fs() [4/6]

template<typename TK, typename TR>
void PulayForceStress::cal_pulay_fs ( ModuleBase::matrix & f,
ModuleBase::matrix & s,
const module_dm::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

◆ cal_pulay_fs() [5/6]

template<typename TK, typename TR>
void PulayForceStress::cal_pulay_fs ( ModuleBase::matrix & f,
ModuleBase::matrix & s,
const module_dm::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() [6/6]

template<typename TK, typename TR, typename Tfunc>
void PulayForceStress::cal_pulay_fs ( ModuleBase::matrix & f,
ModuleBase::matrix & s,
const module_dm::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:

◆ cal_pulay_fs_openshell()

template<typename TK>
ModuleBase::matrix PulayForceStress::cal_pulay_fs_openshell ( const module_dm::DensityMatrix< TK, double > & dm,
const UnitCell & ucell,
const LR::PotLRBase * pot )

Open-shell (spin-unrestricted) counterpart of the grid cal_pulay_fs above.

The LR kernel mixes the two channels, $v_\sigma=\sum_{\sigma'}f^{\sigma\sigma'}\rho^1_{\sigma'}$ (+ the full Hartree), so the density has to be built per channel, the potential accumulated over the inner spin, and only then contracted with the density matrix of the outer spin. PotHxcLR with SpinType::S2_updown selects the $(\sigma,\sigma')$ component via ispin_op.

Parameters
[in]dm2-channel density matrix
Here is the call graph for this function:
Here is the caller graph for this function: