Result mass extraction

Classes to manipulate job-folders.

class pylada.jobfolder.manipulator.JobParams(jobfolder=None, only_existing=True, **kwargs)[source]

Bases: pylada.jobfolder.extract.AbstractMassExtract

Get and sets job parameters for a job-folder.

only_existing

If True (default), then only existing parameters can be modified: non-existing parameters will not be added.

naked_end

If True, then if only one folder contains the requested (sub-)attribute, then it is returned as is, rather than wrapped within a ForwardingDict.

view

Current view into the jobfolder. Basically a filter.

addattr[source]

Returns manipulator with ability to add new attributes.

onoff[source]

Dictionary with calculations which will run.

Whereas other properties only report untagged jobs, this will report both. Effectively checks wether a folder is tagged or not. Calculations which

extractors[source]

Returns dictionary of extrators.

__iter__()

Iterates through all job names.

addattr[source]

Returns manipulator with ability to add new attributes.

avoid(excludes)

Returns a new object with further exclusions.

Parameters:excludes (str or list of str or None) – Pattern or patterns to exclude from output.

The goal of this function is to work as an anti operator [], i.e. by excluding from the output anything that matches the patterns, rather including only those which match the pattern. This is strickly equivalent to:

>>> other = massextract.copy(excludes=excludes)
>>> other.excludes.extend(massextract.excludes)

and then doing calculations with other. The advantage is that it can all be done on one line.

If the excludes argument is None or an empty list, then the returned object will not exlude anything.

concatenate(jobfolder)[source]

Updates content of current job-folder with that of another.

Parameters:jobfolderJobFolder instance, or JobParams instance with which to update the current job-folder.

Update means that jobs and jobparameters will be overwritten with those from the input. Jobs in the input which are not in the current job-folder will be overwritten. If jobfolder is a JobFolder instance, it is possible to use wildcards in order to select those jobs of interests.

excludes

Pattern or List of patterns to ignore. or None.

unix_re determines whether these are unix-command-line like patterns or true python regex.

extractors[source]

Returns dictionary of extrators.

items()

Iterates through all extraction objects and names.

iterfiles(**kwargs)

Iterates over output/input files.

This is rerouted to all extraction objects.

iteritems()

Iterates through all extraction objects and names.

iterkeys()

Iterates through all extraction objects.

itervalues()

Iterates through all extraction objects.

jobfolder[source]

Root of the job-folder this instance wraps.

keys()

Iterates through all extraction objects.

onoff[source]

Dictionary with calculations which will run.

Whereas other properties only report untagged jobs, this will report both. Effectively checks wether a folder is tagged or not. Calculations which

rootpath

Root of the directory-tree to trawl for OUTCARs.

shallow_copy(**kwargs)

Returns a shallow copy.

Parameters:kwargs – Any keyword attribute will modify the corresponding attribute of the copy.
uncache()

Uncache values.

values()

Iterates through all extraction objects.

Previous topic

Jobdict class

Next topic

Result mass extraction

This Page