PAWpySeed
Parallel C/Python package for numerical analysis of PAW DFT wavefunctions
momentum.h
Go to the documentation of this file.
1 
5 #ifndef MOMENTUM_H
6 #define MOMENTUM_H
7 #include <complex.h>
8 #include <math.h>
9 
10 typedef struct transform_spline {
11  double* transform;
12  double** spline;
14 
15 typedef struct density_ft {
16  int n1;
17  int l1;
18  int m1;
19  int n2;
20  int l2;
21  int m2;
22  int size;
23  double* ks;
24  transform_spline_t* transforms; // size: sum(l1,l2)-diff(l1,l2)
25 } density_ft_t;
26 
27 typedef struct density_ft_elem {
32 
33 void free_transform_spline_list(transform_spline_t* transforms, int num_transforms);
34 
35 void free_density_ft_list(density_ft_t* densities, int total_projs);
36 
37 void free_density_ft_elem_list(density_ft_elem_t* elems, int num_elems);
38 
39 float complex pseudo_momentum(int* GP, int* G_bounds, double* lattice,
40  int* G1s, float complex* C1s, int num_waves1,
41  int* G2s, float complex* C2s, int num_waves2, int* fftg);
42 
43 void mul_partial_waves(double* product, int size, double* r, double* f1, double* f2);
44 
45 void make_rho(double* rho, int size, double* grid, double* aewave1, double* pswave1, double* aewave2, double* pswave2);
46 
47 density_ft_t spher_transforms(int size, double* r, double* f, int l1, int m1, int l2, int m2, double encut);
48 
49 double complex spher_momentum(density_ft_t densities, double* G);
50 
51 density_ft_elem_t get_transforms(ppot_t pp, double encut);
52 
53 density_ft_elem_t* get_all_transforms(pswf_t* wf, double encut);
54 
55 double complex get_momentum_matrix_element(pswf_t* wf, int* labels, double* coords,
56  int b1, int k1, int s1,
57  int b2, int k2, int s2,
58  int* GP, density_ft_elem_t* elems);
59 
60 void get_momentum_matrix(double complex* matrix, int numg, int* igall,
61  pswf_t* wf, int* labels, double* coords,
62  int band1, int kpt1, int spin1,
63  int band2, int kpt2, int spin2,
64  density_ft_elem_t* transforms_list,
65  double encut);
66 
67 void momentum_grid_size(pswf_t* wf, double* nb1max, double* nb2max, double* nb3max,
68  int* npmax, double encut);
69 
70 int get_momentum_grid(int* igall, pswf_t* wf, double nb1max, double nb2max, double nb3max, double encut);
71 
72 void grid_bounds(int* G_bounds, int* gdim, int* igall, int num_waves);
73 
74 void list_to_grid_map(int* grid, int* G_bounds, int* gdim, int* igall, int num_waves);
75 
76 void fill_grid(float complex* x, int* Gs, float complex* Cs, int* fftg, int numg);
77 
78 void fullwf_reciprocal(double complex* Cs, int* igall, pswf_t* wf, int numg,
79  int band_num, int kpt_num, int* labels, double* coords);
80 
81 double complex kwave_value(double* x, double* wave, double** spline, int size,
82  int l, int m, double* pos);
83 
84 double complex quick_overlap(int* dG, double complex* C1s, double complex* C2s, int numg,
85  int* Gs, int* gmap, int* G_bounds, int* gdim);
86 
87 #endif
int total_projs
Definition: momentum.h:29
void fill_grid(float complex *x, int *Gs, float complex *Cs, int *fftg, int numg)
struct transform_spline transform_spline_t
grid
Definition: rayleigh.py:30
void momentum_grid_size(pswf_t *wf, double *nb1max, double *nb2max, double *nb3max, int *npmax, double encut)
void mul_partial_waves(double *product, int size, double *r, double *f1, double *f2)
Definition: momentum.h:10
density_ft_elem_t get_transforms(ppot_t pp, double encut)
void get_momentum_matrix(double complex *matrix, int numg, int *igall, pswf_t *wf, int *labels, double *coords, int band1, int kpt1, int spin1, int band2, int kpt2, int spin2, density_ft_elem_t *transforms_list, double encut)
void fullwf_reciprocal(double complex *Cs, int *igall, pswf_t *wf, int numg, int band_num, int kpt_num, int *labels, double *coords)
Definition: momentum.h:27
Definition: utils.h:48
void free_density_ft_elem_list(density_ft_elem_t *elems, int num_elems)
int n1
Definition: momentum.h:16
f
Definition: gaunt.py:29
transform_spline_t * transforms
Definition: momentum.h:24
void free_transform_spline_list(transform_spline_t *transforms, int num_transforms)
float complex pseudo_momentum(int *GP, int *G_bounds, double *lattice, int *G1s, float complex *C1s, int num_waves1, int *G2s, float complex *C2s, int num_waves2, int *fftg)
double ** spline
Definition: momentum.h:12
list x
Definition: quadrature.py:9
int m2
Definition: momentum.h:21
density_ft_elem_t * get_all_transforms(pswf_t *wf, double encut)
double complex get_momentum_matrix_element(pswf_t *wf, int *labels, double *coords, int b1, int k1, int s1, int b2, int k2, int s2, int *GP, density_ft_elem_t *elems)
void free_density_ft_list(density_ft_t *densities, int total_projs)
void grid_bounds(int *G_bounds, int *gdim, int *igall, int num_waves)
struct density_ft density_ft_t
struct density_ft_elem density_ft_elem_t
int size
Definition: momentum.h:22
density_ft_t * densities
Definition: momentum.h:30
Definition: utils.h:113
int n2
Definition: momentum.h:19
double * transform
Definition: momentum.h:11
double complex spher_momentum(density_ft_t densities, double *G)
Definition: momentum.h:15
int l2
Definition: momentum.h:20
r
Definition: rayleigh.py:38
int l1
Definition: momentum.h:17
void list_to_grid_map(int *grid, int *G_bounds, int *gdim, int *igall, int num_waves)
int m1
Definition: momentum.h:18
double * ks
Definition: momentum.h:23
density_ft_t spher_transforms(int size, double *r, double *f, int l1, int m1, int l2, int m2, double encut)
int num_densities
Definition: momentum.h:28
double complex quick_overlap(int *dG, double complex *C1s, double complex *C2s, int numg, int *Gs, int *gmap, int *G_bounds, int *gdim)
void make_rho(double *rho, int size, double *grid, double *aewave1, double *pswave1, double *aewave2, double *pswave2)
double complex kwave_value(double *x, double *wave, double **spline, int size, int l, int m, double *pos)
int get_momentum_grid(int *igall, pswf_t *wf, double nb1max, double nb2max, double nb3max, double encut)