aiida_vasp.parsers.content_parsers.chgcar#

The CHGCAR parser interface.

Module Contents#

Classes#

ChgcarParser

The parser interface that enables parsing of CHGCAR content.

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.BaseFileParser

The parser interface that enables parsing of CHGCAR content.

The parser is triggered by using the charge_density and/or magnetization_density quantity key.

Initialization

DEFAULT_SETTINGS = None#
PARSABLE_QUANTITIES = None#
_init_from_handler(handler)[source]#

Initialize a parsevasp object of Chgcar using a file like handler.

handlerobject

A file like object that provides the necessary CHGCAR content 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.