|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Endpoint magnetism with reusable device workspaces and position-aware caches. More...
#include <td_spin_pw.h>
Public Member Functions | |
| void | initialize (const UnitCell &cell, const ModulePW::PW_Basis &grid, const ModulePW::PW_Basis_K &basis, const K_Vectors &kv, Structure_Factor &sf, pseudopot_cell_vnl &pp, const std::string &mag_partition, const std::string &orbital_dir, double onsite_radius, bool calc_torque) |
| Bind once; dependencies outlive this object and retain their cell and layout. The caller must refresh structure factors and electronic data before sampling moved ions. | |
| TDSpinResultPW | calculate (const psi::Psi< Complex, Device > &psi, const elecstate::ElecState &state, const ModuleBase::Vector3< double > &a) |
| Sample all ranks and restore the k cursor; coordinate changes invalidate geometric caches. | |
Private Types | |
| using | Complex = std::complex<Real> |
Private Member Functions | |
| void | sync_positions () |
| void | density (const elecstate::ElecState &state, TDSpinResultPW *result) |
| void | soc (const psi::Psi< Complex, Device > &psi, const ModuleBase::matrix &weights, const ModuleBase::Vector3< double > &a, TDSpinResultPW *result) |
| void | onsite (const psi::Psi< Complex, Device > &psi, const elecstate::ElecState &state, const ModuleBase::Vector3< double > &a, TDSpinResultPW *result) |
Private Attributes | |
| const UnitCell * | cell_ = nullptr |
| const ModulePW::PW_Basis * | grid_ = nullptr |
| const ModulePW::PW_Basis_K * | basis_ = nullptr |
| const K_Vectors * | kv_ = nullptr |
| Structure_Factor * | sf_ = nullptr |
| pseudopot_cell_vnl * | pp_ = nullptr |
| std::string | mag_partition_ |
| std::string | orbital_dir_ |
| double | onsite_radius_ = 0.0 |
| bool | calc_torque_ = false |
| std::vector< ModuleBase::Vector3< double > > | pos_cache_ |
| std::vector< int > | labels_ |
| hamilt::NonlocalWorkspace< Complex, Device > | nonlocal_ |
| ct::Tensor | beta_ |
| std::vector< Complex > | projections_ |
| std::vector< Complex > | contracted_ |
| std::unique_ptr< psi::Psi< std::complex< double >, Device > > | onsite_psi_ |
| std::unique_ptr< projectors::OnsiteProjector< double, Device > > | onsite_projector_ |
| double | q_bound_ = 0.0 |
Endpoint magnetism with reusable device workspaces and position-aware caches.
|
private |
| TDSpinResultPW pw::TDSpinPW< Real, Device >::calculate | ( | const psi::Psi< Complex, Device > & | psi, |
| const elecstate::ElecState & | state, | ||
| const ModuleBase::Vector3< double > & | a ) |
Sample all ranks and restore the k cursor; coordinate changes invalidate geometric caches.
|
private |
| void pw::TDSpinPW< Real, Device >::initialize | ( | const UnitCell & | cell, |
| const ModulePW::PW_Basis & | grid, | ||
| const ModulePW::PW_Basis_K & | basis, | ||
| const K_Vectors & | kv, | ||
| Structure_Factor & | sf, | ||
| pseudopot_cell_vnl & | pp, | ||
| const std::string & | mag_partition, | ||
| const std::string & | orbital_dir, | ||
| double | onsite_radius, | ||
| bool | calc_torque ) |
Bind once; dependencies outlive this object and retain their cell and layout. The caller must refresh structure factors and electronic data before sampling moved ions.
| mag_partition | Atomic moment partition: none, voronoi, or onsite. |
| orbital_dir | Directory containing the onsite projector orbitals. |
| onsite_radius | Onsite projector cutoff in Bohr. |
| calc_torque | Whether to calculate XC and SOC spin torques. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |