pyprocar.io.vasp.VaspXML#

class pyprocar.io.vasp.VaspXML(filename='vasprun.xml', dos_interpolation_factor: float = 1.0)[source]#

A class to parse the vasprun xml file

Parameters:
  • filename (str, optional) – The vasprun.xml filename, by default “vasprun.xml”

  • dos_interpolation_factor (float, optional) – The interpolation factor, by default None

Raises:

ValueError – File not found

Methods

VaspXML.__init__([filename, ...])

VaspXML.conv(ele, _type)

This function converts the xml text to the type specified in the attrib of xml tree

VaspXML.get_general(xml_tree, ret)

This function will parse any element in calculatio other than the structures, scsteps

VaspXML.get_params(xml_tree, dest)

dest should be a dictionary This function is recurcive #check spelling

VaspXML.get_scstep(xml_tree)

This function extracts the self-consistent step information

VaspXML.get_set(xml_tree, ret)

This function will extract any element taged set recurcively

VaspXML.get_structure(xml_tree)

Returns a dictionary of the structure

VaspXML.get_varray(xml_tree)

Returns an array for each varray tag in vaspxml

VaspXML.parse_vasprun(vasprun)

VaspXML.read()

Read and parse vasprun.xml.

VaspXML.text_to_bool(text)

boolians in vaspxml are stores as T or F in str format, this function coverts them to python boolians

Attributes

VaspXML.bands

Parses the electronic bands

VaspXML.bands_projected

Parse the band projections

VaspXML.convergence

Returns a boolian representing if the the electronic self-consistent and ionic calculation converged

VaspXML.convergence_electronic

Returns a boolian representing if the last electronic self-consistent calculation converged

VaspXML.convergence_ionic

Returns a boolian representing if the ionic part of the calculation converged

VaspXML.dos

The pyprocar.core.DensityOfStates Object

VaspXML.dos_projected

Returns the projected DOS as a multi-dimentional array, to be used in the pyprocar.core.dos object

VaspXML.dos_to_dict

The complete density (total,projected) of states as a python dictionary

VaspXML.dos_total

Returns the total dos dict

VaspXML.energies

Returns a list of energies in each electronic and ionic step [ionic step,electronic step, energy]

VaspXML.energy

Returns the last calculated energy of the system

VaspXML.fermi

Returns the fermi energy

VaspXML.final_structure

Returns the final Structure as a pychemia structure

VaspXML.forces

Returns all the forces in ionic steps

VaspXML.incar

Returns the incar parameters used in the calculation as pychemia.code.vasp.VaspIncar object

VaspXML.initial_structure

Returns the initial Structure as a pychemia structure

VaspXML.is_finished

Always returns True, need to fix this according to reading the xml as if the calc is not finished we will have errors in xml parser

VaspXML.iteration_data

Returns a list of information in each electronic and ionic step of calculation

VaspXML.kpoints

Returns the kpoints used in the calculation in form of a pychemia.core.KPoints object

VaspXML.kpoints_list

Returns the dict of kpoints and weights used in the calculation in form of a pychemia.core.KPoints object

VaspXML.last_energy

Returns the last calculated energy of the system

VaspXML.potcar_info

Returns the information about pseudopotentials(POTCAR) used in this calculation

VaspXML.species

Returns the species in POSCAR

VaspXML.structure

crystal structure of the last step

VaspXML.structures

Returns a list of pychemia.core.Structure representing all the ionic step structures

VaspXML.vasp_parameters

Returns all of the parameters vasp has used in this calculation