ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
exx_abfs-construct_orbs.h
Go to the documentation of this file.
1#ifndef EXX_ABFS_CONSTRUCT_ORBS_H
2#define EXX_ABFS_CONSTRUCT_ORBS_H
3
4#include "exx_abfs.h"
5
6#include <limits>
7#include <algorithm>
9#include "../../source_basis/module_ao/ORB_atomic_lm.h"
10
11class LCAO_Orbitals;
12
14{
15public:
16 static std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> change_orbs(
17 const LCAO_Orbitals &orb_in,
18 const double kmesh_times );
19 static std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> change_orbs(
20 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &orb_in,
21 const double kmesh_times );
22
23 static std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> abfs_same_atom(
24 const UnitCell &ucell,
25 const LCAO_Orbitals& orb,
26 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &lcaos,
27 const double kmesh_times_mot,
28 const double times_threshold=0);
29
30 static void print_orbs_size(
31 const UnitCell& ucell,
32 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &orbs,
33 std::ostream &os);
34
35 // get the max number of orbitals among all elements
36 // static int get_nmax_total(const
37 // std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &orb_in); get
38 // number of orbitals for each element static std::map<int, int>
39 // get_nw(const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>>
40 // &orb_in);
41
42 // get multipole of orbitals for each element and angular moment
43 static std::vector<std::vector<std::vector<double>>> get_multipole(
44 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &orb_in);
45
46 static std::vector<double> get_Rcut(
47 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &orb_in);
48 static inline double get_Rmax(const std::vector<double>& rcut)
49 {
50 return *std::max_element(rcut.begin(), rcut.end());
51 }
52 static inline double get_Rmax(
53 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &orb_in)
54 {
55 std::vector<double> rcut = get_Rcut(orb_in);
56 return get_Rmax(rcut);
57 }
58 template<typename T>
59 static int get_Lmax(const std::vector<std::vector<T>> &orb)
60 {
61 return max_element(orb.begin(), orb.end(),
62 [](const std::vector<T> &orb_A, const std::vector<T> &orb_B){ return orb_A.size() < orb_B.size(); })
63 ->size() - 1;
64 }
65
66 static void filter_empty_orbs(
67 std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &orbs);
68
69 private:
70 static std::vector<std::vector<std::vector<std::vector<double>>>> psi_mult_psi(
71 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &lcaos );
72
73 static std::vector<std::vector<std::vector<std::vector<double>>>> psir_mult_psir(
74 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &lcaos );
75
76 static std::vector<std::vector<std::vector<std::vector<double>>>> orth(
77 const std::vector<std::vector<std::vector<std::vector<double>>>> &psis,
78 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &lcaos,
79 const double norm_threshold = std::numeric_limits<double>::min() );
80
81 static std::vector<std::vector<std::vector<std::vector<double>>>> pca(
82 const UnitCell &ucell,
83 const LCAO_Orbitals& orb,
84 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &abfs,
85 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &orbs,
86 const double kmesh_times_mot,
87 const double times_threshold );
88
89 static std::vector<std::vector<std::vector<std::vector<double>>>> div_r(
90 const std::vector<std::vector<std::vector<std::vector<double>>>> &psirs,
91 const std::vector<double> &r_radial );
92
93 static std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> orbital(
94 const std::vector<std::vector<std::vector<std::vector<double>>>> &psis,
95 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &orbs_info,
96 const double kmesh_times);
97
98 static std::vector<std::vector<std::vector<std::vector<double>>>> get_psi(
99 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> &orbs );
100};
101
102#endif // EXX_ABFS_IO_ASA_H
Definition exx_abfs-construct_orbs.h:14
static std::vector< std::vector< std::vector< std::vector< double > > > > psi_mult_psi(const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &lcaos)
Definition exx_abfs-construct_orbs.cpp:158
static void print_orbs_size(const UnitCell &ucell, const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &orbs, std::ostream &os)
Definition exx_abfs-construct_orbs.cpp:476
static std::vector< std::vector< std::vector< std::vector< double > > > > pca(const UnitCell &ucell, const LCAO_Orbitals &orb, const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &abfs, const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &orbs, const double kmesh_times_mot, const double times_threshold)
Definition exx_abfs-construct_orbs.cpp:263
static double get_Rmax(const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &orb_in)
Definition exx_abfs-construct_orbs.h:52
static std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > orbital(const std::vector< std::vector< std::vector< std::vector< double > > > > &psis, const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &orbs_info, const double kmesh_times)
Definition exx_abfs-construct_orbs.cpp:398
static double get_Rmax(const std::vector< double > &rcut)
Definition exx_abfs-construct_orbs.h:48
static int get_Lmax(const std::vector< std::vector< T > > &orb)
Definition exx_abfs-construct_orbs.h:59
static void filter_empty_orbs(std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &orbs)
Definition exx_abfs-construct_orbs.cpp:546
static std::vector< std::vector< std::vector< std::vector< double > > > > orth(const std::vector< std::vector< std::vector< std::vector< double > > > > &psis, const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &lcaos, const double norm_threshold=std::numeric_limits< double >::min())
Definition exx_abfs-construct_orbs.cpp:332
static std::vector< std::vector< std::vector< std::vector< double > > > > div_r(const std::vector< std::vector< std::vector< std::vector< double > > > > &psirs, const std::vector< double > &r_radial)
Definition exx_abfs-construct_orbs.cpp:354
static std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > abfs_same_atom(const UnitCell &ucell, const LCAO_Orbitals &orb, const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &lcaos, const double kmesh_times_mot, const double times_threshold=0)
Definition exx_abfs-construct_orbs.cpp:81
static std::vector< std::vector< std::vector< std::vector< double > > > > psir_mult_psir(const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &lcaos)
Definition exx_abfs-construct_orbs.cpp:229
static std::vector< std::vector< std::vector< double > > > get_multipole(const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &orb_in)
Definition exx_abfs-construct_orbs.cpp:498
static std::vector< std::vector< std::vector< std::vector< double > > > > get_psi(const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &orbs)
Definition exx_abfs-construct_orbs.cpp:379
static std::vector< double > get_Rcut(const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &orb_in)
Definition exx_abfs-construct_orbs.cpp:525
static std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > change_orbs(const LCAO_Orbitals &orb_in, const double kmesh_times)
Definition exx_abfs-construct_orbs.cpp:11
int kmesh_times
Definition exx_abfs.h:24
Definition ORB_read.h:19
Definition unitcell.h:17