SIRIUS 7.5.0
Electronic structure library and applications
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sirius::Force Class Reference

Compute atomic forces. More...

#include <force.hpp>

Public Member Functions

 Force (Simulation_context &ctx__, Density &density__, Potential &potential__, K_point_set &kset__)
 
sddk::mdarray< double, 2 > const & calc_forces_vloc ()
 
sddk::mdarray< double, 2 > const & forces_vloc () const
 
template<typename T >
void calc_forces_nonloc_aux ()
 
sddk::mdarray< double, 2 > const & calc_forces_nonloc ()
 
sddk::mdarray< double, 2 > const & forces_nonloc () const
 
sddk::mdarray< double, 2 > const & calc_forces_core ()
 
sddk::mdarray< double, 2 > const & forces_core () const
 
sddk::mdarray< double, 2 > const & calc_forces_scf_corr ()
 Calculate SCF correction to the forces. More...
 
sddk::mdarray< double, 2 > const & forces_scf_corr () const
 
sddk::mdarray< double, 2 > const & calc_forces_us ()
 
sddk::mdarray< double, 2 > const & forces_us () const
 
sddk::mdarray< double, 2 > const & calc_forces_ewald ()
 
sddk::mdarray< double, 2 > const & forces_ewald () const
 
sddk::mdarray< double, 2 > const & calc_forces_hubbard ()
 
sddk::mdarray< double, 2 > const & forces_hubbard () const
 
sddk::mdarray< double, 2 > const & calc_forces_usnl ()
 
sddk::mdarray< double, 2 > const & calc_forces_hf ()
 
sddk::mdarray< double, 2 > const & forces_hf () const
 
sddk::mdarray< double, 2 > const & calc_forces_rho ()
 
sddk::mdarray< double, 2 > const & forces_rho () const
 
sddk::mdarray< double, 2 > const & calc_forces_ibs ()
 
sddk::mdarray< double, 2 > const & forces_ibs () const
 
sddk::mdarray< double, 2 > const & calc_forces_total ()
 
sddk::mdarray< double, 2 > const & forces_total () const
 
void print_info (std::ostream &out__, int verbosity__)
 

Private Member Functions

template<typename T , typename F >
void add_k_point_contribution (K_point< T > &kp__, sddk::mdarray< double, 2 > &forces__) const
 
void compute_dmat (K_point< double > *kp__, la::dmatrix< std::complex< double > > &dm__) const
 
void hubbard_force_add_k_contribution_collinear (K_point< double > &kp__, Q_operator< double > &q_op__, sddk::mdarray< double, 2 > &forceh_)
 
void add_ibs_force (K_point< double > *kp__, Hamiltonian_k< double > &Hk__, sddk::mdarray< double, 2 > &ffac__, sddk::mdarray< double, 2 > &forcek__) const
 

Private Attributes

Simulation_contextctx_
 
const Densitydensity_
 
Potentialpotential_
 
K_point_setkset_
 
sddk::mdarray< double, 2 > forces_vloc_
 
sddk::mdarray< double, 2 > forces_us_
 
sddk::mdarray< double, 2 > forces_nonloc_
 
sddk::mdarray< double, 2 > forces_usnl_
 
sddk::mdarray< double, 2 > forces_core_
 
sddk::mdarray< double, 2 > forces_ewald_
 
sddk::mdarray< double, 2 > forces_scf_corr_
 
sddk::mdarray< double, 2 > forces_hubbard_
 
sddk::mdarray< double, 2 > forces_hf_
 
sddk::mdarray< double, 2 > forces_rho_
 
sddk::mdarray< double, 2 > forces_ibs_
 
sddk::mdarray< double, 2 > forces_total_
 

Detailed Description

Compute atomic forces.

Definition at line 43 of file force.hpp.

Constructor & Destructor Documentation

◆ Force()

sirius::Force::Force ( Simulation_context ctx__,
Density density__,
Potential potential__,
K_point_set kset__ 
)

Definition at line 40 of file force.cpp.

Member Function Documentation

◆ add_k_point_contribution()

template<typename T , typename F >
void sirius::Force::add_k_point_contribution ( K_point< T > &  kp__,
sddk::mdarray< double, 2 > &  forces__ 
) const
private

Definition at line 87 of file force.cpp.

◆ compute_dmat()

void sirius::Force::compute_dmat ( K_point< double > *  kp__,
la::dmatrix< std::complex< double > > &  dm__ 
) const
private

In the second-variational approach we need to compute the following expression for the k-dependent contribution to the forces:

\[ {\bf F}_{\rm IBS}^{\alpha}=\sum_{\bf k}w_{\bf k}\sum_{l\sigma}n_{l{\bf k}} \sum_{ij}c_{\sigma i}^{l{\bf k}*}c_{\sigma j}^{l{\bf k}} {\bf F}_{ij}^{\alpha{\bf k}} \]

This function sums over band and spin indices to get the "density matrix":

\[ q_{ij} = \sum_{l\sigma}n_{l{\bf k}} c_{\sigma i}^{l{\bf k}*}c_{\sigma j}^{l{\bf k}} \]

Definition at line 111 of file force.cpp.

◆ hubbard_force_add_k_contribution_collinear()

void sirius::Force::hubbard_force_add_k_contribution_collinear ( K_point< double > &  kp__,
Q_operator< double > &  q_op__,
sddk::mdarray< double, 2 > &  forceh_ 
)
private

Compute the forces for the simplex LDA+U method not the fully rotationally invariant one. It can not be used for LDA+U+SO either.

It is based on this reference : PRB 84, 161102(R) (2011)

Definition at line 586 of file force.cpp.

◆ add_ibs_force()

void sirius::Force::add_ibs_force ( K_point< double > *  kp__,
Hamiltonian_k< double > &  Hk__,
sddk::mdarray< double, 2 > &  ffac__,
sddk::mdarray< double, 2 > &  forcek__ 
) const
private

Definition at line 721 of file force.cpp.

◆ calc_forces_vloc()

sddk::mdarray< double, 2 > const & sirius::Force::calc_forces_vloc ( )

Definition at line 650 of file force.cpp.

◆ forces_vloc()

sddk::mdarray< double, 2 > const & sirius::Force::forces_vloc ( ) const
inline

Definition at line 109 of file force.hpp.

◆ calc_forces_nonloc_aux()

template<typename T >
template void sirius::Force::calc_forces_nonloc_aux< double > ( )

Definition at line 49 of file force.cpp.

◆ calc_forces_nonloc()

sddk::mdarray< double, 2 > const & sirius::Force::calc_forces_nonloc ( )

Definition at line 71 of file force.cpp.

◆ forces_nonloc()

sddk::mdarray< double, 2 > const & sirius::Force::forces_nonloc ( ) const
inline

Definition at line 119 of file force.hpp.

◆ calc_forces_core()

sddk::mdarray< double, 2 > const & sirius::Force::calc_forces_core ( )

Definition at line 526 of file force.cpp.

◆ forces_core()

sddk::mdarray< double, 2 > const & sirius::Force::forces_core ( ) const
inline

Definition at line 126 of file force.hpp.

◆ calc_forces_scf_corr()

sddk::mdarray< double, 2 > const & sirius::Force::calc_forces_scf_corr ( )

Calculate SCF correction to the forces.

Based on the following paper: PhysRevB.47.4771

Definition at line 470 of file force.cpp.

◆ forces_scf_corr()

sddk::mdarray< double, 2 > const & sirius::Force::forces_scf_corr ( ) const
inline

Definition at line 135 of file force.hpp.

◆ calc_forces_us()

sddk::mdarray< double, 2 > const & sirius::Force::calc_forces_us ( )

Definition at line 376 of file force.cpp.

◆ forces_us()

sddk::mdarray< double, 2 > const & sirius::Force::forces_us ( ) const
inline

Definition at line 142 of file force.hpp.

◆ calc_forces_ewald()

sddk::mdarray< double, 2 > const & sirius::Force::calc_forces_ewald ( )

Definition at line 297 of file force.cpp.

◆ forces_ewald()

sddk::mdarray< double, 2 > const & sirius::Force::forces_ewald ( ) const
inline

Definition at line 149 of file force.hpp.

◆ calc_forces_hubbard()

sddk::mdarray< double, 2 > const & sirius::Force::calc_forces_hubbard ( )

Definition at line 261 of file force.cpp.

◆ forces_hubbard()

sddk::mdarray< double, 2 > const & sirius::Force::forces_hubbard ( ) const
inline

Definition at line 156 of file force.hpp.

◆ calc_forces_usnl()

sddk::mdarray< double, 2 > const & sirius::Force::calc_forces_usnl ( )

Definition at line 705 of file force.cpp.

◆ calc_forces_hf()

sddk::mdarray< double, 2 > const & sirius::Force::calc_forces_hf ( )

Definition at line 243 of file force.cpp.

◆ forces_hf()

sddk::mdarray< double, 2 > const & sirius::Force::forces_hf ( ) const
inline

Definition at line 165 of file force.hpp.

◆ calc_forces_rho()

sddk::mdarray< double, 2 > const & sirius::Force::calc_forces_rho ( )

Definition at line 225 of file force.cpp.

◆ forces_rho()

sddk::mdarray< double, 2 > const & sirius::Force::forces_rho ( ) const
inline

Definition at line 172 of file force.hpp.

◆ calc_forces_ibs()

sddk::mdarray< double, 2 > const & sirius::Force::calc_forces_ibs ( )

Definition at line 199 of file force.cpp.

◆ forces_ibs()

sddk::mdarray< double, 2 > const & sirius::Force::forces_ibs ( ) const
inline

Definition at line 179 of file force.hpp.

◆ calc_forces_total()

sddk::mdarray< double, 2 > const & sirius::Force::calc_forces_total ( )

Definition at line 165 of file force.cpp.

◆ forces_total()

sddk::mdarray< double, 2 > const & sirius::Force::forces_total ( ) const
inline

Definition at line 186 of file force.hpp.

◆ print_info()

void sirius::Force::print_info ( std::ostream &  out__,
int  verbosity__ 
)

Definition at line 880 of file force.cpp.

Member Data Documentation

◆ ctx_

Simulation_context& sirius::Force::ctx_
private

Definition at line 46 of file force.hpp.

◆ density_

const Density& sirius::Force::density_
private

Definition at line 48 of file force.hpp.

◆ potential_

Potential& sirius::Force::potential_
private

Definition at line 50 of file force.hpp.

◆ kset_

K_point_set& sirius::Force::kset_
private

Definition at line 52 of file force.hpp.

◆ forces_vloc_

sddk::mdarray<double, 2> sirius::Force::forces_vloc_
private

Definition at line 54 of file force.hpp.

◆ forces_us_

sddk::mdarray<double, 2> sirius::Force::forces_us_
private

Definition at line 56 of file force.hpp.

◆ forces_nonloc_

sddk::mdarray<double, 2> sirius::Force::forces_nonloc_
private

Definition at line 58 of file force.hpp.

◆ forces_usnl_

sddk::mdarray<double, 2> sirius::Force::forces_usnl_
private

Definition at line 60 of file force.hpp.

◆ forces_core_

sddk::mdarray<double, 2> sirius::Force::forces_core_
private

Definition at line 62 of file force.hpp.

◆ forces_ewald_

sddk::mdarray<double, 2> sirius::Force::forces_ewald_
private

Definition at line 64 of file force.hpp.

◆ forces_scf_corr_

sddk::mdarray<double, 2> sirius::Force::forces_scf_corr_
private

Definition at line 66 of file force.hpp.

◆ forces_hubbard_

sddk::mdarray<double, 2> sirius::Force::forces_hubbard_
private

Definition at line 68 of file force.hpp.

◆ forces_hf_

sddk::mdarray<double, 2> sirius::Force::forces_hf_
private

Definition at line 70 of file force.hpp.

◆ forces_rho_

sddk::mdarray<double, 2> sirius::Force::forces_rho_
private

Definition at line 72 of file force.hpp.

◆ forces_ibs_

sddk::mdarray<double, 2> sirius::Force::forces_ibs_
private

Definition at line 74 of file force.hpp.

◆ forces_total_

sddk::mdarray<double, 2> sirius::Force::forces_total_
private

Definition at line 76 of file force.hpp.


The documentation for this class was generated from the following files: