33 #include "../global.h"
34 #include "../emd/spherical_expansion.h"
55 virtual void print()
const = 0;
61 virtual std::complex<double>
get(
double p)
const = 0;
79 std::complex<double>
c;
94 std::complex<double>
c;
103 void add_coupling_term(std::vector<total_coupl_t> & v,
total_coupl_t & t);
110 std::complex<double>
f;
129 std::vector< std::vector<coupl_coeff_t> >
cc;
139 std::vector< std::vector< std::complex<double> > >
YLM;
157 void get_coupling(
size_t ig,
size_t jg,
int l,
int lp, std::vector<total_coupl_t> & c)
const;
160 std::vector<radf_val_t>
get_radial(
size_t ig,
double p)
const;
163 void get_total_coupling(
size_t ig,
size_t jg,
double p, std::vector<total_coupl_t> & c, std::vector<total_coupl_t> & tmp)
const;
173 std::vector< std::vector<RadialFourier *> >
rad;
193 EMDEvaluator(
const std::vector< std::vector<size_t> > & idfuncsv,
const std::vector< std::vector<ylmcoeff_t> > & clm,
const std::vector<size_t> & locv,
const std::vector<coords_t> & coord,
const arma::cx_mat & Pv,
int lp=0,
int mp=0);
204 std::complex<double>
get(
double p)
const;
208 arma::mat bessel_array(
const std::vector<double> & args,
int lmax);
241 void add4(
size_t ind);
269 double eval(
double p)
const;
279 void optimize_moments(
const std::vector<int> & moms,
bool verbose=
true,
double tol=1e-8);
292 void fixed_fill(
bool verbose=
true,
double h0=1e-3,
double l0=3.0,
double hfac=2.0,
double lfac=2.0);
295 std::vector<emd_t>
get()
const;
298 void save(
const char * fname)
const;
303 void moments(
const char * fname)
const;
Functions for evaluating properties of the electron momentum density.
Definition: emd.h:237
std::vector< double > dist
The distances between the functions' origins (Nat x Nat)
Definition: emd.h:137
size_t i
first index
Definition: emd.h:116
void optimize_moments(const std::vector< int > &moms, bool verbose=true, double tol=1e-8)
Optimize given moments of EMD within tolerance.
Definition: emd.cpp:824
double d
Electron momentum density at p.
Definition: emd.h:216
int lp
l'
Definition: emd.h:69
double Nel
Number of electrons.
Definition: emd.h:250
int l
l
Definition: emd.h:67
size_t Nat
The number of centers.
Definition: emd.h:135
std::vector< size_t > loc
The locations of the functions on the atoms (Nbas)
Definition: emd.h:132
void find_electrons(bool verbose=true, double tol=1e-4)
Continue filling until number of electrons is reproduced within tolerance.
Definition: emd.cpp:744
const EMDEvaluator * poseval
Positive evaluator.
Definition: emd.h:253
std::vector< emd_t > dens
List of radial densities.
Definition: emd.h:239
std::complex< double > c
Coefficient.
Definition: emd.h:94
void add_coupling(size_t ig, size_t jg, coupl_coeff_t c)
Add coupling coefficient.
Definition: emd.cpp:329
void compute_coefficients(const std::vector< std::vector< ylmcoeff_t > > &clm, int lp, int mp)
Computes the coupling coefficients.
Definition: emd.cpp:197
size_t j
second index
Definition: emd.h:118
List of identical functions.
Definition: emd.h:114
std::complex< double > f
Value.
Definition: emd.h:110
std::vector< radf_val_t > get_radial(size_t ig, double p) const
Computes the ig:th radial function.
Definition: emd.cpp:315
std::vector< std::vector< RadialFourier * > > rad
Definition: emd.h:173
void check_norm() const
Check norms of radial functions.
Definition: emd.cpp:474
int L
L.
Definition: emd.h:74
Class for (basis set independent) normalized radial wfs.
Definition: emd.h:41
double eval(double p) const
Evaluate density at p.
Definition: emd.cpp:694
int l
l value
Definition: emd.h:244
int getl() const
Get l value.
Definition: emd.cpp:62
void save(const char *fname) const
Save values of momentum density.
Definition: emd.cpp:975
int M
M.
Definition: emd.h:92
Structure for holding radial EMD.
Definition: emd.h:212
EMD(const EMDEvaluator *poseval, const EMDEvaluator *negeval, double Nel, int l, int m)
Constructor.
Definition: emd.cpp:670
void get_total_coupling(size_t ig, size_t jg, double p, std::vector< total_coupl_t > &c, std::vector< total_coupl_t > &tmp) const
Get the total coupling (incl. radial function)
Definition: emd.cpp:416
arma::mat compton_profile() const
Calculate Compton profile.
Definition: emd.cpp:1037
void add4(size_t ind)
Add 4 points at ind.
Definition: emd.cpp:722
int M
M.
Definition: emd.h:76
const EMDEvaluator * negeval
Negative evaluator.
Definition: emd.h:258
Value of radial function.
Definition: emd.h:106
arma::cx_mat P
The density matrix.
Definition: emd.h:142
void initial_fill(bool verbose=true)
Initial filling of grid.
Definition: emd.cpp:708
void fixed_fill(bool verbose=true, double h0=1e-3, double l0=3.0, double hfac=2.0, double lfac=2.0)
Definition: emd.cpp:916
int l
l
Definition: emd.h:108
std::vector< std::vector< std::complex< double > > > YLM
Spherical harmonics values, complex conjugated [Nat x Nat] [(L,M)].
Definition: emd.h:139
std::vector< std::vector< size_t > > idfuncs
Definition: emd.h:127
void distance_table(const std::vector< coords_t > &coord)
Computes the distance table.
Definition: emd.cpp:147
void complete_fill()
Fill regions where density changes by huge amounts.
void print() const
Print the evaluator.
Definition: emd.cpp:463
std::vector< std::vector< coupl_coeff_t > > cc
The coupling coefficients of the nonequivalent functions.
Definition: emd.h:129
double p
Radial momentum.
Definition: emd.h:214
Coupling list.
Definition: emd.h:88
~EMDEvaluator()
Destructor.
Definition: emd.cpp:312
std::complex< double > c
The coupling coefficient.
Definition: emd.h:79
virtual ~RadialFourier()
Destructor.
Definition: emd.cpp:59
int m
m value
Definition: emd.h:246
int l
l value
Definition: emd.h:44
void compton_profile_interp(const char *interp) const
Save Compton profile in interpolated form.
Definition: emd.cpp:1083
void get_coupling(size_t ig, size_t jg, int l, int lp, std::vector< total_coupl_t > &c) const
Get the coupling constants for L=|l-lp|, ..., l+lp.
Definition: emd.cpp:361
RadialFourier(int l)
Constructor.
Definition: emd.cpp:55
Radial EMD evaluator.
Definition: emd.h:122
arma::mat moments() const
Calculate moments of momentum density.
Definition: emd.cpp:982
Coupling coefficient.
Definition: emd.h:65
~EMD()
Destructor.
Definition: emd.cpp:691
int Lmax
Maximum value of L.
Definition: emd.h:145
EMDEvaluator()
Dummy constructor.
Definition: emd.cpp:128
std::complex< double > poscoef
Coefficient.
Definition: emd.h:255
std::complex< double > negcoef
Coefficient.
Definition: emd.h:260
int L
L.
Definition: emd.h:90