aiida_spirit package

Submodules

aiida_spirit.calculations module

Calculations provided by aiida_spirit.

Register calculations via the “aiida.calculations” entry point in setup.json.

class aiida_spirit.calculations.SpiritCalculation(*args: Any, **kwargs: Any)[source]

Bases: aiida.engine.processes.calcjobs.calcjob.CalcJob

Run Spirit calculation from user defined inputs.

__abstractmethods__ = frozenset({})
__module__ = 'aiida_spirit.calculations'
_abc_impl = <_abc_data object>
classmethod define(spec)[source]

Define inputs and outputs of the calculation.

get_defects_info()[source]

Get the defects info that is added to the config file

prepare_for_submission(folder)[source]

Create input files.

Parameters

folder – an aiida.common.folders.Folder where the plugin should temporarily place all files needed by the calculation.

Returns

aiida.common.datastructures.CalcInfo instance

write_couplings_file(folder)[source]

Write the couplings.txt file that contains the Jij’s

write_defects_file(folder)[source]

Create the defects.txt file from the defects input array

We write the defects.txt in this format:

### Atom types: type index 0..n or or vacancy (type < 0) ### Specify the number of defects and then the defects in terms of translations and type ### i da db dc itype n_defects 3 # this is skipped and all defects that are found in the file are used 0 0 0 0 -1 0 1 0 0 -1 0 0 1 0 -1

write_input_cfg(folder)[source]

Write the input.cfg file from the parameters input

write_pinning_file(folder)[source]

Create the pinning.txt file from the pinning input array

We write the pinning.txt in this format (i, da, db, dc, Sx, Sy, Sz):

0 0 0 0 1.0 0.0 0.0 0 1 0 0 0.0 1.0 0.0 0 0 1 0 0.0 0.0 1.0

write_run_spirit(folder)[source]

write the run_spirit.py script that controls the spirit python API.

aiida_spirit.calculations._get_geometry(structure)[source]

Get the geometry string from the structure

aiida_spirit.calculations._modify_line(my_string, new_value)[source]

Gets a line and the new parameter value as inputs and returns the line with the new parameter

aiida_spirit.calculations.validate_params(params, _)[source]

Validate the input parameters.

aiida_spirit.cli module

aiida_spirit.parsers module

Parsers provided by aiida_spirit.

Register parsers via the “aiida.parsers” entry point in setup.json.

class aiida_spirit.parsers.SpiritParser(node)[source]

Bases: aiida.parsers.parser.Parser

Parser class for parsing output of calculation.

__abstractmethods__ = frozenset({})
__init__(node)[source]

Initialize Parser instance

Checks that the ProcessNode being passed was produced by a SpiritCalculation.

Parameters
__module__ = 'aiida_spirit.parsers'
_abc_impl = <_abc_data object>
parse(**kwargs)[source]

Parse outputs, store results in database.

Returns

an exit code, if parsing fails (or nothing if parsing succeeds)

parse_retrieved()[source]

Parse the output from the retrieved and create aiida nodes

aiida_spirit.parsers.parse_outfile(txt)[source]

parse the spirit output file

Module contents

aiida_spirit

AiiDA plugin for the spirit code