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


Public Member Functions | |
| def | __init__ (self, struct, pwf, cr, dim, symprec=1e-4, setup_projectors=False) |
| def | update_dim (self, dim) |
| def | desymmetrized_copy (self, allkpts=None, weights=None) |
| def | check_c_projectors (self) |
| def | get_state_realspace (self, b, k, s, dim=None, remove_phase=False) |
| def | get_state_realspace_density (self, b, k, s, dim=None) |
| def | get_realspace_density (self, dim=None, bands=None) |
| def | write_state_realspace (self, b, k, s, fileprefix="", dim=None, scale=1, remove_phase=False) |
| def | write_density_realspace (self, filename="PYAECCAR", dim=None, scale=1, bands=None) |
| def | get_nosym_kpoints (self, init_kpts=None, symprec=None, gen_trsym=True, fil_trsym=True) |
| def | get_kpt_mapping (self, allkpts, symprec=None, gen_trsym=True) |
Static Public Member Functions | |
| def | from_files (struct="CONTCAR", wavecar="WAVECAR", cr="POTCAR", vr="vasprun.xml", setup_projectors=False) |
| def | from_directory (path, setup_projectors=False) |
| def | from_atomate_directory (path, setup_projectors=False) |
Public Attributes | |
| band_props | |
| structure | |
| symprec | |
| cr | |
| dim | |
| num_sites | |
| num_elems | |
Class for storing and manipulating all electron wave functions in the PAW
formalism.
Attributes:
structure (pymatgen.core.structure.Structure): stucture of the material
that the wave function describes
cr (CoreRegion): Contains the pseudopotentials, with projectors and
partials waves, for the structure
dim (np.ndarray, length 3): dimension of the FFT grid used by VASP
and therefore for FFTs in this code
band_props (np.ndarray): 4-item array of containing the information
(band gap, cbm, vbm, is_band_gap_direct). This object contains the same
information as pymatgen.io.vasp.outputs.Vasprun.eigenvalue_band_properties
| def pawpyseed.core.wavefunction.Wavefunction.__init__ | ( | self, | |
| struct, | |||
| pwf, | |||
| cr, | |||
| dim, | |||
symprec = 1e-4, |
|||
setup_projectors = False |
|||
| ) |
Arguments:
struct (pymatgen.core.Structure): structure that the wavefunction describes
pwf (pawpyc.PWFPointer): holder class for pswf_t and k-points/k-point weights
cr (CoreRegion): Contains the pseudopotentials, with projectors and
partials waves, for the structure
dim (pymatgen.io.vasp.outputs.Outcar OR np.ndarry OR list of length 3):
Outcar object for reading ngf or the dimensions NG* of the FFT grid
symprec (float, 1e-4): precision tolerance for symmetry operations
setup_projectors (bool, False): Whether to set up the core region
components of the wavefunctions. Pawpyseed will set up the projectors
automatically when they are first needed, so this generally
can be left as False.
Returns:
Wavefunction object
| def pawpyseed.core.wavefunction.Wavefunction.check_c_projectors | ( | self | ) |
Check to see if the projector functions have been read in and set up. If not, do so.
| def pawpyseed.core.wavefunction.Wavefunction.desymmetrized_copy | ( | self, | |
allkpts = None, |
|||
weights = None |
|||
| ) |
Returns a copy of self with a k-point mesh that is not reduced
using crystal symmetry (time reversal symmetry is still used;
an option to not use time reversal symmetry will be added in
the future).
Arguments:
allkpts (optional, None): An optional k-point mesh to map
onto. Used by the Projector class for some cases
weights (optional, None): If allkpts is not None, weights
should contain the k-point weights of each k-point,
with the sum normalized to 1.
|
static |
Assumes VASP output has the default filenames and is located
in the directory specificed by path. Checks for
gzipped files created by atomate
Arguments:
path (str): VASP output directory
setup_projectors (bool, False): Whether to set up the core region
components of the wavefunctions. Pawpyseed will set up the projectors
automatically when they are first needed, so this generally
can be left as False.
Returns:
Wavefunction object
|
static |
Assumes VASP output has the default filenames and is located
in the directory specificed by path.
Arguments:
path (str): VASP output directory
setup_projectors (bool, False): Whether to set up the core region
components of the wavefunctions. Pawpyseed will set up the projectors
automatically when they are first needed, so this generally
can be left as False.
Returns:
Wavefunction object
|
static |
Construct a Wavefunction object from file paths.
Arguments:
struct (str): VASP POSCAR or CONTCAR file path
wavecar (str): VASP WAVECAR file path
cr (str): VASP POTCAR file path
vr (str): VASP vasprun file path
outcar (str): VASP OUTCAR file path
setup_projectors (bool, False): Whether to set up the core region
components of the wavefunctions. Pawpyseed will set up the projectors
automatically when they are first needed, so this generally
can be left as False.
Returns:
Wavefunction object
| def pawpyseed.core.wavefunction.Wavefunction.get_kpt_mapping | ( | self, | |
| allkpts, | |||
symprec = None, |
|||
gen_trsym = True |
|||
| ) |
Helper function to find the mappings from self.kpts to allkpts using the symmetry operations of self.structure
| def pawpyseed.core.wavefunction.Wavefunction.get_nosym_kpoints | ( | self, | |
init_kpts = None, |
|||
symprec = None, |
|||
gen_trsym = True, |
|||
fil_trsym = True |
|||
| ) |
Helper function to get a non-symmetry-reduced k-point mesh based on the symmetry-reduced mesh of self.
| def pawpyseed.core.wavefunction.Wavefunction.get_realspace_density | ( | self, | |
dim = None, |
|||
bands = None |
|||
| ) |
Returns the all electron charge density.
Args:
dim (numpy array of 3 ints, None): dimensions of the FFT grid
Returns:
A 3D array (indexed by x,y,z where x,y,z are fractional coordinates)
with real double values for the all electron charge density
| def pawpyseed.core.wavefunction.Wavefunction.get_state_realspace | ( | self, | |
| b, | |||
| k, | |||
| s, | |||
dim = None, |
|||
remove_phase = False |
|||
| ) |
Returns the real and imaginary parts of a given band.
Args:
b (int): band number
k (int): kpoint number
s (int): spin number
dim (numpy array of 3 ints): dimensions of the FFT grid
Returns:
A 3D array (indexed by x,y,z where x,y,z are fractional coordinates)
with complex double values for the realspace wavefunction
| def pawpyseed.core.wavefunction.Wavefunction.get_state_realspace_density | ( | self, | |
| b, | |||
| k, | |||
| s, | |||
dim = None |
|||
| ) |
Returns the real and imaginary parts of a given band.
Args:
b (int): band number
k (int): kpoint number
s (int): spin number
dim (numpy array of 3 ints): dimensions of the FFT grid
Returns:
A 3D array (indexed by x,y,z where x,y,z are fractional coordinates)
with complex double values for the realspace wavefunction
| def pawpyseed.core.wavefunction.Wavefunction.update_dim | ( | self, | |
| dim | |||
| ) |
| def pawpyseed.core.wavefunction.Wavefunction.write_density_realspace | ( | self, | |
filename = "PYAECCAR", |
|||
dim = None, |
|||
scale = 1, |
|||
bands = None |
|||
| ) |
Writes the real and imaginary parts of a given band to two files,
prefixed by fileprefix
Args:
b (int): band number (0-indexed!)
k (int): kpoint number (0-indexed!)
s (int): spin number (0-indexed!)
fileprefix (string, ""): first part of the file name
dim (numpy array of 3 ints, None): dimensions of the FFT grid
scale (scalar, 1): number to multiply the realspace wavefunction by.
For example, VASP multiplies charge density by the volume
of the structure.
bands (int or [int], None): Only calculate the density for a specific
band or set of bands
Returns:
A 3D array (indexed by x,y,z where x,y,z are fractional coordinates)
with complex double values for the realspace wavefunction
The charge density is written with z the slow index.
| def pawpyseed.core.wavefunction.Wavefunction.write_state_realspace | ( | self, | |
| b, | |||
| k, | |||
| s, | |||
fileprefix = "", |
|||
dim = None, |
|||
scale = 1, |
|||
remove_phase = False |
|||
| ) |
Writes the real and imaginary parts of a given band to two files,
prefixed by fileprefix
Args:
b (int): band number (0-indexed!)
k (int): kpoint number (0-indexed!)
s (int): spin number (0-indexed!)
fileprefix (string, ""): first part of the file name
dim (numpy array of 3 ints, None): dimensions of the FFT grid
scale (scalar, 1): number to multiply the realspace wavefunction by.
For example, VASP multiplies charge density by the volume
of the structure.
remove_phase (False): If True, removes the e^(ikr) phase
from the wavefunction (this does not necessarily mean
the wavefunction is real). This is useful if you want
to visualize the wavefunction because the e^(ikr) phase
makes the wavefunction non-periodic
Returns:
A 3D array (indexed by x,y,z where x,y,z are fractional coordinates)
with complex double values for the realspace wavefunction
The wavefunction is written in two files with z the slow index.
| pawpyseed.core.wavefunction.Wavefunction.band_props |
| pawpyseed.core.wavefunction.Wavefunction.cr |
| pawpyseed.core.wavefunction.Wavefunction.dim |
| pawpyseed.core.wavefunction.Wavefunction.num_elems |
| pawpyseed.core.wavefunction.Wavefunction.num_sites |
| pawpyseed.core.wavefunction.Wavefunction.structure |
| pawpyseed.core.wavefunction.Wavefunction.symprec |
1.8.11