pygauss.cclib_patch.parser.data module

Classes and tools for storing and handling parsed data

class pygauss.cclib_patch.parser.data.ccData(attributes={})[source]

Bases: object

Initialize the cclibData object.

Normally called in the parse() method of a Logfile subclass.

Inputs:
attributes - optional dictionary of attributes to load as data
arrayify()[source]

Converts appropriate attributes to arrays or lists/dicts of arrays.

getattributes(tolists=False)[source]

Returns a dictionary of existing data attributes.

Inputs:
tolists - flag to convert attributes to lists where applicable
listify()[source]

Converts all attributes that are arrays or lists/dicts of arrays to lists.

setattributes(attributes)[source]

Sets data attributes given in a dictionary.

Inputs:
attributes - dictionary of attributes to set
Outputs:
invalid - list of attributes names that were not set, which
means they are not specified in self._attrlist
typecheck()[source]

Check the types of all attributes.

If an attribute does not match the expected type, then attempt to convert; if that fails, only then raise a TypeError.

class pygauss.cclib_patch.parser.data.ccData_optdone_bool(*args, **kwargs)[source]

Bases: pygauss.cclib_patch.parser.data.ccData

This is the version of ccData where optdone is a Boolean.

setattributes(*args, **kwargs)[source]