aiida_vasp.parsers.content_parsers.chgcar#
The CHGCAR parser interface.
Module Contents#
Classes#
The parser interface that enables parsing of |
API#
- class aiida_vasp.parsers.content_parsers.chgcar.ChgcarParser(*, handler=None, data=None, settings=None, options=None)[source]#
Bases:
aiida_vasp.parsers.content_parsers.base.BaseFileParserThe parser interface that enables parsing of
CHGCARcontent.The parser is triggered by using the
charge_densityand/ormagnetization_densityquantity key.Initialization
- DEFAULT_SETTINGS = None#
- PARSABLE_QUANTITIES = None#
- _init_from_handler(handler)[source]#
Initialize a
parsevaspobject ofChgcarusing a file like handler.- handlerobject
A file like object that provides the necessary
CHGCARcontent to be parsed.
- property charge_density#
Return the charge density.
- charge_densityndarray
A NumPy array containing the charge density in the unit cell in C order.
- property magnetization_density#
Return the magnetization density.
- magnetization_densitydict or ndarray
If collinear spin calculations have been performed, a NumPy array containing the magnetization density in the unit cell in C order is returned. If however a non-collinear spin calculation have been performed, a dictionary is returned with keys x, y and z, each containing the same NumPy array, but for each direction.