PAWpySeed
Parallel C/Python package for numerical analysis of PAW DFT wavefunctions
|
Public Member Functions | |
def | __init__ (self, struct, pwf, cr, dim, 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) |
def | get_realspace_density (self, dim=None) |
def | write_state_realspace (self, b, k, s, fileprefix="", dim=None, scale=1) |
def | write_density_realspace (self, filename="PYAECCAR", dim=None, scale=1) |
def | get_nosym_kpoints (self, init_kpts=None, symprec=1e-5, gen_trsym=True, fil_trsym=True) |
def | get_kpt_mapping (self, allkpts, symprec=1e-5, gen_trsym=True) |
Static Public Member Functions | |
def | from_files (struct="CONTCAR", wavecar="WAVECAR", cr="POTCAR", vr="vasprun.xml", outcar="OUTCAR", setup_projectors=False) |
def | from_directory (path, setup_projectors=False) |
def | from_atomate_directory (path, setup_projectors=False) |
Public Attributes | |
band_props | |
structure | |
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, | |||
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 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 = 1e-5 , |
|||
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 = 1e-5 , |
|||
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 |
|||
) |
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 |
|||
) |
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 |
|||
) |
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. 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 |
|||
) |
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. 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 |