PAWpySeed
Parallel C/Python package for numerical analysis of PAW DFT wavefunctions
reader.h
Go to the documentation of this file.
1 
9 #ifndef READER_H
10 #define READER_H
11 #include "utils.h"
12 
13 typedef struct WAVECAR_FILE {
14  int type;
15  FILE* fp;
16  char* start;
17  char* curr;
18 } WAVECAR;
19 
20 WAVECAR* wcopen(char* f, int type);
21 
22 void wcseek(WAVECAR* wc, long loc);
23 
24 void wcread(void* ptr0, long size, long nmemb, WAVECAR* wc);
25 
26 void wcclose(WAVECAR* wc);
27 
31 void setup(int nrecl, int nprec, int nspin, int nwk, int nband,
32  double* nb1, double* nb2, double* nb3, double ecut,
33  double* lattice, double* reclattice);
34 
39 pswf_t* read_wavecar(WAVECAR* wc, double* kpt_weights);
40 
46 pswf_t* read_wavefunctions(char* filename, double* kpt_weights);
47 
52 pswf_t* read_wavefunctions_from_str(char* start, double* kpt_weights);
53 
57 kpoint_t** read_one_band(int* G_bounds, double* kpt_weights, int* ns, int* nk, int* nb, int BAND_NUM, char* filename);
58 
59 #endif
60 
struct WAVECAR_FILE WAVECAR
pswf_t * read_wavefunctions_from_str(char *start, double *kpt_weights)
WAVECAR * wcopen(char *f, int type)
FILE * fp
Definition: reader.h:15
void wcclose(WAVECAR *wc)
char * curr
Definition: reader.h:17
void wcseek(WAVECAR *wc, long loc)
Definition: utils.h:101
pswf_t * read_wavecar(WAVECAR *wc, double *kpt_weights)
f
Definition: gaunt.py:28
void setup(int nrecl, int nprec, int nspin, int nwk, int nband, double *nb1, double *nb2, double *nb3, double ecut, double *lattice, double *reclattice)
void wcread(void *ptr0, long size, long nmemb, WAVECAR *wc)
kpoint_t ** read_one_band(int *G_bounds, double *kpt_weights, int *ns, int *nk, int *nb, int BAND_NUM, char *filename)
char * start
Definition: reader.h:16
Definition: utils.h:112
int type
Definition: reader.h:14
Definition: reader.h:13
pswf_t * read_wavefunctions(char *filename, double *kpt_weights)