PAWpySeed Parallel C/Python package for numerical analysis of PAW DFT wavefunctions

- Main Page
- Classes
- Files

- File List
- File Members

Classes | Typedefs | Functions
reader.h File Reference
`#include "utils.h"`
Include dependency graph for reader.h:

Go to the source code of this file.

## Classes
struct | WAVECAR_FILE

## Typedefs
typedef struct WAVECAR_FILE | WAVECAR

## Functions
WAVECAR * | wcopen (char *f, int type)
void | wcseek (WAVECAR *wc, long loc)
void | wcread (void *ptr0, long size, long nmemb, WAVECAR *wc)
void | wcclose (WAVECAR *wc)
void | setup (int nspin, int nwk, int nband, double *nb1, double *nb2, double *nb3, int *np, double ecut, double *lattice, double *reclattice)
pswf_t * | read_wavecar (WAVECAR *wc, double *kpt_weights)
pswf_t * | read_wavefunctions (char *filename, double *kpt_weights)
pswf_t * | read_wavefunctions_from_str (char *start, double *kpt_weights)
kpoint_t ** | read_one_band (int *G_bounds, double *kpt_weights, int *ns, int *nk, int *nb, int BAND_NUM, char *filename)

## Detailed Description

Functions used to read pswf_t structs from WAVECAR files (VASP output). This code is based upon the Fortran program, WaveTrans, written by R. M. Feenstra and M. Widom from the Dept. of Physics at Carnegie Mellon University. To see the original work, please visit: https://www.andrew.cmu.edu/user/feenstra/wavetrans/

## Typedef Documentation

typedef struct WAVECAR_FILE WAVECAR

## Function Documentation

kpoint_t** read_one_band | ( | int * | G_bounds,
|  | double * | kpt_weights,
|  | int * | ns,
|  | int * | nk,
|  | int * | nb,
|  | int | BAND_NUM,
|  | char * | filename
| ) |  |

DEPRECATED, DO NOT USE: function to read a single band from a WAVECAR

pswf_t* read_wavecar | ( | WAVECAR * | wc,
|  | double * | kpt_weights
| ) |  |

Handles reading WAVECAR objects, called by read_wavefunctions and read_wavefunctions_from_str

pswf_t* read_wavefunctions | ( | char * | filename,
|  | double * | kpt_weights
| ) |  |

Given char* filename pointing to a WAVECAR file (VASP output), constructs a pswf_t* containing the plane-wave coefficients and energies for each band at each kpoint for each spin.

pswf_t* read_wavefunctions_from_str | ( | char * | start,
|  | double * | kpt_weights
| ) |  |

Read wavefunctions from a string. This is useful if the binary WAVECAR object is opened from a .gz or .bz2 format by monty

void setup | ( | int | nspin,
|  | int | nwk,
|  | int | nband,
|  | double * | nb1,
|  | double * | nb2,
|  | double * | nb3,
|  | int * | np,
|  | double | ecut,
|  | double * | lattice,
|  | double * | reclattice
| ) |  |

Sets up variables to be used to read the pseudowavefunctions from WAVECAR

void wcclose | ( | WAVECAR * | wc | ) |

WAVECAR* wcopen | ( | char * | f,
|  | int | type
| ) |  |

void wcread | ( | void * | ptr0,
|  | long | size,
|  | long | nmemb,
|  | WAVECAR * | wc
| ) |  |

void wcseek | ( | WAVECAR * | wc,
|  | long | loc
| ) |  |