Skip to content

Commit

Permalink
Eigenval docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
mturiansky committed Oct 9, 2019
1 parent 5969542 commit eb9428d
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions pymatgen/io/vasp/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4502,8 +4502,59 @@ def get_parchg(self, poscar, kpoint, band, spin=None, phase=False,
class Eigenval:
"""
Object for reading EIGENVAL file.
.. attribute:: filename
string containing input filename
.. attribute:: occu_tol
tolerance for determining occupation in band properties
.. attribute:: ispin
spin polarization tag (int)
.. attribute:: nelect
number of electrons
.. attribute:: nkpt
number of kpoints
.. attribute:: nbands
number of bands
.. attribute:: kpoints
list of kpoints
.. attribute:: kpoints_weights
weights of each kpoint in the BZ, should sum to 1.
.. attribute:: eigenvalues
Eigenvalues as a dict of {(spin): np.ndarray(shape=(nkpt, nbands, 2))}.
This representation is based on actual ordering in VASP and is meant as
an intermediate representation to be converted into proper objects. The
kpoint index is 0-based (unlike the 1-based indexing in VASP).
"""

def __init__(self, filename, occu_tol=1e-8):
"""
Reads input from filename to construct Eigenval object
Args:
filename (str): filename of EIGENVAL to read in
occu_tol (float): tolerance for determining band gap
Returns:
a pymatgen.io.vasp.outputs.Eigenval object
"""

self.filename = filename
self.occu_tol = occu_tol

Expand Down Expand Up @@ -4551,6 +4602,7 @@ def eigenvalue_band_properties(self):
Band properties from the eigenvalues as a tuple,
(band gap, cbm, vbm, is_band_gap_direct).
"""

vbm = -float("inf")
vbm_kpoint = None
cbm = float("inf")
Expand Down

0 comments on commit eb9428d

Please sign in to comment.