PAWpySeed: pawpyseed.core.wavefunction.Wavefunction Class Reference

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

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
pawpyseed.core.wavefunction.Wavefunction Class Reference
Inheritance diagram for pawpyseed.core.wavefunction.Wavefunction:
[legend]

## Public Member Functions
def | __init__ (self, struct, pwf, cr, outcar, setup_projectors=False)
def | get_c_projectors_from_pps (self, pps)
def | make_c_projectors (self)
def | check_c_projectors (self)
def | get_state_realspace (self, b, k, s, dim=None)
def | write_state_realspace (self, b, k, s, fileprefix="", dim=None, return_wf=False)
def | write_density_realspace (self, filename="PYAECCAR", dim=None, return_wf=False)
def | get_symmops (self, symprec)
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)
def | kpts (self)
def | kws (self)
def | free_all (self)

## Static Public Member Functions
def | from_files (struct="CONTCAR", pwf="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
| structure
| pwf
| cr
| dim
| projector_owner
| projector_list
| nums
| coords
| nband
| nwk
| nspin
| encut
| num_proj_els
| freed
| nosym_kpts
| orig_kptnums
| op_nums
| symmops

## Detailed Description

    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
        pwf (PseudoWavefunction): Pseudowavefunction componenet
        cr (CoreRegion): Contains the pseudopotentials, with projectors and
            partials waves, for the structure
        projector: ctypes object for interfacing with C code
        wf_ptr (C pointer): pointer to the pswf_t C object for this wavefunction
        dim (np.ndarray, length 3): dimension of the FFT grid used by VASP
            and therefore for FFTs in this code

## Constructor & Destructor Documentation

def pawpyseed.core.wavefunction.Wavefunction.__init__ | ( |  | self,
|  |  | struct,
|  |  | pwf,
|  |  | cr,
|  |  | outcar,
|  |  | setup_projectors = `False`
| ) |  |

    Arguments:
        struct (pymatgen.core.Structure): structure that the wavefunction describes
        pwf (PseudoWavefunction): Pseudowavefunction component
        cr (CoreRegion): Contains the pseudopotentials, with projectors and
    partials waves, for the structure
        outcar (pymatgen.io.vasp.outputs.Outcar): Outcar object for reading ngf
        setup_projectors (bool, False): Whether to set up the core region
    components of the wavefunctions (leave as False if passing this
    object to Projector, which will do the setup automatically)
    Returns:
        Wavefunction object

## Member Function Documentation

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.free_all | ( |  | self | ) |

    Frees all of the C structures associated with the Wavefunction object.
    After being called, this object is not usable.

def pawpyseed.core.wavefunction.Wavefunction.from_atomate_directory | ( |  | path,
|  |  | setup_projectors = `False`
| ) |  |
| 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 (leave as False if passing this
    object to Projector, which will do the setup automatically)

    Returns:
        Wavefunction object

def pawpyseed.core.wavefunction.Wavefunction.from_directory | ( |  | path,
|  |  | setup_projectors = `False`
| ) |  |
| 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 (leave as False if passing this
    object to Projector, which will do the setup automatically)

    Returns:
        Wavefunction object

def pawpyseed.core.wavefunction.Wavefunction.from_files | ( |  | struct = `"CONTCAR"`,
|  |  | pwf = `"WAVECAR"`,
|  |  | cr = `"POTCAR"`,
|  |  | vr = `"vasprun.xml"`,
|  |  | outcar = `"OUTCAR"`,
|  |  | setup_projectors = `False`
| ) |  |
| static

    Construct a Wavefunction object from file paths.

    Arguments:
        struct (str): VASP POSCAR or CONTCAR file path
        pwf (str): VASP WAVECAR file path
        cr (str): VASP POTCAR file path
        vr (str): VASP vasprun file path
        outcar (str): VASP OUTCAR file path

    Returns:
        Wavefunction object

def pawpyseed.core.wavefunction.Wavefunction.get_c_projectors_from_pps | ( |  | self,
|  |  | pps
| ) |  |

    Returns a point to a list of ppot_t objects in C,
    to be used for high performance parts of the code

    Args:
        pps (dict of Pseudopotential objects): keys are integers,
    values of Pseudopotential objects

    Returns:
        c_void_p object pointing to ppot_t list with each Pseudopotential,
        ordered in the list by their numerical keys

def pawpyseed.core.wavefunction.Wavefunction.get_kpt_mapping | ( |  | self,
|  |  | allkpts,
|  |  | symprec = `1e-5`,
|  |  | gen_trsym = `True`
| ) |  |

def pawpyseed.core.wavefunction.Wavefunction.get_nosym_kpoints | ( |  | self,
|  |  | init_kpts = `None`,
|  |  | symprec = `1e-5`,
|  |  | gen_trsym = `True`,
|  |  | fil_trsym = `True`
| ) |  |

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:
        An array (x slow-indexed) where the first half of the values
    are the real part and second half of the values are the
    imaginary part

def pawpyseed.core.wavefunction.Wavefunction.get_symmops | ( |  | self,
|  |  | symprec
| ) |  |

def pawpyseed.core.wavefunction.Wavefunction.kpts | ( |  | self | ) |

def pawpyseed.core.wavefunction.Wavefunction.kws | ( |  | self | ) |

def pawpyseed.core.wavefunction.Wavefunction.make_c_projectors | ( |  | self | ) |

    Uses the CoreRegion objects in self and basis (if not None)
    to construct C representations of the projectors and partial waves
    for a structure. Also assigns numerical labels for each element and
    returns a list of indices and positions which can be easily converted
    to C lists for projection functions.

    Arguments:
        basis (None or Wavefunction): an additional structure from which
    to include pseudopotentials. E.g. can be useful if a basis contains
    some different elements than self.
    Returns:
        projector_list (C pointer): describes the pseudopotential data in C
        selfnums (int32 numpy array): numerical element label for each site in
    the structure
        selfcoords (float64 numpy array): flattened list of coordinates of each site
    in self
        basisnums (if basis != None): same as selfnums, but for basis
        basiscoords (if basis != None): same as selfcoords, but for basis

def pawpyseed.core.wavefunction.Wavefunction.write_density_realspace | ( |  | self,
|  |  | filename = `"PYAECCAR"`,
|  |  | dim = `None`,
|  |  | return_wf = `False`
| ) |  |

    Writes the AE charge density to a file. Returns it if desired.

    Args:
        b (int): band number
        k (int): kpoint number
        s (int): spin number
        dim (numpy array of 3 ints): dimensions of the FFT grid
        filename (string, "PYAECCAR"): charge density filename
        return_wf (bool): whether to return the wavefunction
    Returns:
        (if return_wf==True) An array (x slow-indexed, as in VASP)
    with the charge densities
        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`,
|  |  | return_wf = `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!)
        dim (numpy array of 3 ints): dimensions of the FFT grid
        fileprefix (string, optional): first part of the file name
        return_wf (bool): whether to return the wavefunction
    Returns:
        (if return_wf==True) An array (x slow-indexed) where the first half of the values
    are the real part and second half of the values are the
    imaginary part
        The wavefunction is written with z the slow index.

## Member Data Documentation

pawpyseed.core.wavefunction.Wavefunction.coords

pawpyseed.core.wavefunction.Wavefunction.cr

pawpyseed.core.wavefunction.Wavefunction.dim

pawpyseed.core.wavefunction.Wavefunction.encut

pawpyseed.core.wavefunction.Wavefunction.freed

pawpyseed.core.wavefunction.Wavefunction.nband

pawpyseed.core.wavefunction.Wavefunction.nosym_kpts

pawpyseed.core.wavefunction.Wavefunction.nspin

pawpyseed.core.wavefunction.Wavefunction.num_proj_els

pawpyseed.core.wavefunction.Wavefunction.nums

pawpyseed.core.wavefunction.Wavefunction.nwk

pawpyseed.core.wavefunction.Wavefunction.op_nums

pawpyseed.core.wavefunction.Wavefunction.orig_kptnums

pawpyseed.core.wavefunction.Wavefunction.projector_list

pawpyseed.core.wavefunction.Wavefunction.projector_owner

pawpyseed.core.wavefunction.Wavefunction.pwf

pawpyseed.core.wavefunction.Wavefunction.structure

pawpyseed.core.wavefunction.Wavefunction.symmops

The documentation for this class was generated from the following file:

- /home/kyle/Research/projects/pawpyseed/pawpyseed/core/wavefunction.py