Package schrodinger :: Package application :: Package matsci :: Package espresso :: Module qeoutput :: Class Output
[hide private]
[frames] | no frames]

Class Output

object --+
         |
        Output

Class to deal with QE XML output parsing.

Instance Methods [hide private]
 
__init__(self, qegz_fn, struct=False, band=False, dos=False, pdos=False, esm=False, neb=False, tree=None)
Initialize Output object.
 
_convertTagToCoords(self, element, alat)
Convert text from element having such text: 'float float float' to list of floats.
 
_getVecsFromTree(self, root)
Parse and set alat (in self.alat), cell vectors (in self.vecs) and cell volume (in self.volume) in A^3 from XML tree.
dict
_getMagSpecies(self, root)
Get a dict with species (element name + a number) as keys and starting magnetizations as values.
structure.Structure
_getStructFromTree(self, root)
Parse and set a structure (in self.struct) from XML tree.
list of KPoint
_getInputKpoints(self, root)
Return k-points present in the input section of the output schema.
list of KPoint
_getInputKpointsMesh(self, root)
Return k-points present in the input section of the output schema.
 
_getBasicInfo(self, root)
Parse and set attributes several attributes.
 
_getBandFromTree(self, root)
Parse and set the BandStructure object in self.band from XML tree.
 
_getPDOS(self, proj, wfc_types)
Initialize PDOS object in self.pdos.
 
_getDOS(self)
Initialize DOS object in self.dos.
(numpy.array, OrderedDict())
_parsePDOSProj(self, proj_fh)
Parse and return data from .prowfc_* file.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, qegz_fn, struct=False, band=False, dos=False, pdos=False, esm=False, neb=False, tree=None)
(Constructor)

 

Initialize Output object.

Parameters:
  • qegz_fn (str) - Archive name of the compressed .save folder
  • struct (bool) - If True, parse and create structure in self.struct of type structure.Structure
  • band (bool) - If true, parse and store energies at different k-points in self.band of type BandStructure
  • dos (bool) - If true, compute density of states and store in self.dos of type DOS
  • pdos (bool) - If true, compute projected density of states and store in self.pdos of type PDOS
  • esm (bool) - If true, try to extract density/potential data and store it in self.esm
Overrides: object.__init__

_convertTagToCoords(self, element, alat)

 

Convert text from element having such text:
    'float float float'
to list of floats.

@type element: L{xml.etree.ElementTree.Element}
@param element: Element to parse

@type alat: float
@param alat: Lattice parameter, in Bohrs

@rtype: list of floats
@rparam: List of floats converted from the element's text

_getVecsFromTree(self, root)

 

Parse and set alat (in self.alat), cell vectors (in self.vecs) and cell volume (in self.volume) in A^3 from XML tree.

Parameters:
  • root (xml.etree.ElementTree.Element) - Element that contains required information

_getMagSpecies(self, root)

 

Get a dict with species (element name + a number) as keys and starting magnetizations as values.

Parameters:
  • root (xml.etree.ElementTree.Element) - Element that contains required information
Returns: dict
dict with species (element name + a number) as keys and starting magnetizations as values. If no magnetization is defined (or zero), key is not set

_getStructFromTree(self, root)

 

Parse and set a structure (in self.struct) from XML tree.

Parameters:
  • root (xml.etree.ElementTree.Element) - Element that contains required information
Returns: structure.Structure

_getInputKpoints(self, root)

 

Return k-points present in the input section of the output schema.

Parameters:
  • root (xml.etree.ElementTree.Element) - Element with required information
Returns: list of KPoint
list of KPoint objects

_getInputKpointsMesh(self, root)

 

Return k-points present in the input section of the output schema.

Parameters:
  • root (xml.etree.ElementTree.Element) - Element with required information
Returns: list of KPoint
list of KPoint objects

_getBasicInfo(self, root)

 

Parse and set attributes several attributes.

Parameters:
  • root (xml.etree.ElementTree.Element) - Element that contains required information

_getBandFromTree(self, root)

 

Parse and set the BandStructure object in self.band from XML tree.

Parameters:
  • root (xml.etree.ElementTree.Element) - Element that contains required information

_getPDOS(self, proj, wfc_types)

 

Initialize PDOS object in self.pdos.

Parameters:
  • proj (2D numpy.array) - 2D array containing index of projected atom wavefunction (WFC) and k-point as indexes and WFC projection as value
  • wfc_types (OrderedDict) - OrderedDict containing label of the projected WFC as key, and WFC index as value.

_parsePDOSProj(self, proj_fh)

 

Parse and return data from .prowfc_* file. This is generated by projwfc.x.

Parameters:
  • proj_fh (File handler object) - Handler to the .projwfc_* file
Returns: (numpy.array, OrderedDict())
3D array containing: index of projected atom wavefunction (WFC), index of k-point, index of band and WFC projection as value. OrderedDict containing label of the projected WFC as key, and WFC index as value.