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

#include <dftu_base.h>

Collaboration diagram for Plus_U_Base:

Public Types

enum class  UForm { lich_fll = 1 , lich_amf = 2 , dud_fll = 3 }

Public Member Functions

 Plus_U_Base ()
 ~Plus_U_Base ()
void init_base (UnitCell &cell, const int npol, const int nspin, const std::vector< int > &l_channel, const bool yukawa_potential, const double yukawa_lambda, const std::string &global_readin_dir, const std::string &global_out_dir, const std::string &init_chg, const std::string &device, const std::vector< double > &hubbard_u, const double uramping, const int init_occ_mat, const int mixing_dftu, const DFTU_BASE::OccmatSocLayout &soc_layout)
void uramping_update ()
bool u_converged ()
double get_u_current (int it) const
void set_u_current (int it, double val)
int get_num_u_types () const
int get_l_channel (int it) const
bool has_l_channel (int it) const
const std::vector< int > & get_l_channel_vec () const
double get_uramping () const
int get_init_occ_mat () const
UForm get_form () const
bool use_yukawa () const
 Yukawa screening object (non-null only when use_yukawa()).
YukawaScreening & yukawa ()
const YukawaScreening & yukawa () const
double get_energy () const
void set_energy (const double &e)
void set_double_energy ()
const std::complex< double > * get_uterm_mat_spin (const int nspin, const int isk) const
int get_size_uterm_mat_spin (const int nspin) const
int get_size_uterm_mat () const
bool is_occmat_ready () const
void set_occmat_ready ()
void set_occmat_stale ()
OccupationMatrix & occmat ()
 direct access to the occupation matrix object (new write path)
const OccupationMatrix & occmat () const
OccMatMixer & occ_mixer ()
 access the occupation-matrix mixer (non-null only when mixing enabled)
const OccMatMixer & occ_mixer () const
bool has_occ_mixer () const
const std::string & get_device () const
const std::vector< double > & get_u_current_vec () const
const std::vector< int > & get_uterm_mat_index () const
std::vector< std::complex< double > > & get_uterm_mat ()
const std::vector< std::complex< double > > & get_uterm_mat () const
double & energy_ref ()

Protected Attributes

std::vector< double > u_current
std::vector< double > u_target
std::vector< int > l_channel
double uramping = 0.0
int init_occ_mat = 0
OccupationMatrix occmat_
std::unique_ptr< OccMatMixer > occ_mixer_
double energy_u = 0.0
UForm form = UForm::dud_fll
std::string device
std::vector< std::complex< double > > uterm_mat
std::vector< int > uterm_mat_index
std::unique_ptr< YukawaScreening > yukawa_

Private Attributes

bool occmat_ready_ = false

Friends

class DFTUTest

Member Enumeration Documentation

◆ UForm

enum class Plus_U_Base::UForm
strong
Enumerator
lich_fll 
lich_amf 
dud_fll 

Constructor & Destructor Documentation

◆ Plus_U_Base()

Plus_U_Base::Plus_U_Base ( )

◆ ~Plus_U_Base()

Plus_U_Base::~Plus_U_Base ( )

Member Function Documentation

◆ energy_ref()

double & Plus_U_Base::energy_ref ( )
inline

◆ get_device()

const std::string & Plus_U_Base::get_device ( ) const
inline

◆ get_energy()

double Plus_U_Base::get_energy ( ) const
inline

◆ get_form()

UForm Plus_U_Base::get_form ( ) const
inline

◆ get_init_occ_mat()

int Plus_U_Base::get_init_occ_mat ( ) const
inline
Here is the caller graph for this function:

◆ get_l_channel()

int Plus_U_Base::get_l_channel ( int it) const
inline

◆ get_l_channel_vec()

const std::vector< int > & Plus_U_Base::get_l_channel_vec ( ) const
inline

◆ get_num_u_types()

int Plus_U_Base::get_num_u_types ( ) const
inline

◆ get_size_uterm_mat()

int Plus_U_Base::get_size_uterm_mat ( ) const
inline

◆ get_size_uterm_mat_spin()

int Plus_U_Base::get_size_uterm_mat_spin ( const int nspin) const
inline

get size of the U-term coefficient matrix for a single spin channel

nspin=1: full array size nspin=2: half of the total (one spin channel in split layout) nspin=4: full array size (all Pauli blocks are packed together)

◆ get_u_current()

double Plus_U_Base::get_u_current ( int it) const
inline

◆ get_u_current_vec()

const std::vector< double > & Plus_U_Base::get_u_current_vec ( ) const
inline

◆ get_uramping()

double Plus_U_Base::get_uramping ( ) const
inline

◆ get_uterm_mat() [1/2]

std::vector< std::complex< double > > & Plus_U_Base::get_uterm_mat ( )
inline

◆ get_uterm_mat() [2/2]

const std::vector< std::complex< double > > & Plus_U_Base::get_uterm_mat ( ) const
inline

◆ get_uterm_mat_index()

const std::vector< int > & Plus_U_Base::get_uterm_mat_index ( ) const
inline

◆ get_uterm_mat_spin()

const std::complex< double > * Plus_U_Base::get_uterm_mat_spin ( const int nspin,
const int isk ) const
inline

get the U-term coefficient matrix pointer for the given spin channel (small (2l+1)^2 per-atom matrix, projector coefficient)

nspin=1: isk is ignored, returns &uterm_mat[0] nspin=2: isk selects spin-up (0) or spin-down (1) half of the split layout [all_up | all_dn] nspin=4: isk is ignored, returns &uterm_mat[0] (all Pauli blocks)

◆ has_l_channel()

bool Plus_U_Base::has_l_channel ( int it) const
inline
Here is the caller graph for this function:

◆ has_occ_mixer()

bool Plus_U_Base::has_occ_mixer ( ) const
inline
Here is the caller graph for this function:

◆ init_base()

void Plus_U_Base::init_base ( UnitCell & cell,
const int npol,
const int nspin,
const std::vector< int > & l_channel,
const bool yukawa_potential,
const double yukawa_lambda,
const std::string & global_readin_dir,
const std::string & global_out_dir,
const std::string & init_chg,
const std::string & device,
const std::vector< double > & hubbard_u,
const double uramping,
const int init_occ_mat,
const int mixing_dftu,
const DFTU_BASE::OccmatSocLayout & soc_layout )

Initialize the run-lifetime DFT+U state (base part, no LCAO types).

Call this exactly once on a freshly constructed object for each solver run, before entering the electronic or ionic loops. A new calculation configuration requires a new Plus_U_Base object.

Here is the call graph for this function:

◆ is_occmat_ready()

bool Plus_U_Base::is_occmat_ready ( ) const
inline
Here is the caller graph for this function:

◆ occ_mixer() [1/2]

OccMatMixer & Plus_U_Base::occ_mixer ( )
inline

access the occupation-matrix mixer (non-null only when mixing enabled)

Here is the caller graph for this function:

◆ occ_mixer() [2/2]

const OccMatMixer & Plus_U_Base::occ_mixer ( ) const
inline

◆ occmat() [1/2]

OccupationMatrix & Plus_U_Base::occmat ( )
inline

direct access to the occupation matrix object (new write path)

Here is the caller graph for this function:

◆ occmat() [2/2]

const OccupationMatrix & Plus_U_Base::occmat ( ) const
inline

◆ set_double_energy()

void Plus_U_Base::set_double_energy ( )
inline

◆ set_energy()

void Plus_U_Base::set_energy ( const double & e)
inline

◆ set_occmat_ready()

void Plus_U_Base::set_occmat_ready ( )
inline
Here is the caller graph for this function:

◆ set_occmat_stale()

void Plus_U_Base::set_occmat_stale ( )
inline

◆ set_u_current()

void Plus_U_Base::set_u_current ( int it,
double val )
inline
Here is the caller graph for this function:

◆ u_converged()

bool Plus_U_Base::u_converged ( )

◆ uramping_update()

void Plus_U_Base::uramping_update ( )

◆ use_yukawa()

bool Plus_U_Base::use_yukawa ( ) const
inline

Yukawa screening object (non-null only when use_yukawa()).

Here is the caller graph for this function:

◆ yukawa() [1/2]

YukawaScreening & Plus_U_Base::yukawa ( )
inline
Here is the caller graph for this function:

◆ yukawa() [2/2]

const YukawaScreening & Plus_U_Base::yukawa ( ) const
inline

◆ DFTUTest

friend class DFTUTest
friend

Member Data Documentation

◆ device

std::string Plus_U_Base::device
protected

◆ energy_u

double Plus_U_Base::energy_u = 0.0
protected

◆ form

UForm Plus_U_Base::form = UForm::dud_fll
protected

◆ init_occ_mat

int Plus_U_Base::init_occ_mat = 0
protected

◆ l_channel

std::vector<int> Plus_U_Base::l_channel
protected

◆ occ_mixer_

std::unique_ptr<OccMatMixer> Plus_U_Base::occ_mixer_
protected

◆ occmat_

OccupationMatrix Plus_U_Base::occmat_
protected

◆ occmat_ready_

bool Plus_U_Base::occmat_ready_ = false
private

◆ u_current

std::vector<double> Plus_U_Base::u_current
protected

◆ u_target

std::vector<double> Plus_U_Base::u_target
protected

◆ uramping

double Plus_U_Base::uramping = 0.0
protected

◆ uterm_mat

std::vector<std::complex<double> > Plus_U_Base::uterm_mat
protected

◆ uterm_mat_index

std::vector<int> Plus_U_Base::uterm_mat_index
protected

◆ yukawa_

std::unique_ptr<YukawaScreening> Plus_U_Base::yukawa_
protected

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