aiida_quantumespresso.calculations.namelists#

Plugin to create a Quantum Espresso input file for a generic post-processing code.

These codes typically only require a few namelists (plus possibly some text afterwards).

Module Contents#

Classes#

NamelistsCalculation

CalcJob implementation to serve as base class for simple post-processing tools of Quantum ESPRESSO.

class aiida_quantumespresso.calculations.namelists.NamelistsCalculation(*args, **kwargs)[source]#

Bases: aiida_quantumespresso.calculations.base.CalcJob

CalcJob implementation to serve as base class for simple post-processing tools of Quantum ESPRESSO.

_INPUT_SUBFOLDER = './out/'[source]#
_default_parent_output_folder = './out/'[source]#
_OUTPUT_SUBFOLDER = './out/'[source]#
_PREFIX = 'aiida'[source]#
_default_namelists = ['INPUTPP'][source]#
_blocked_keywords = [][source]#
_internal_retrieve_list = [][source]#
_retrieve_singlefile_list = [][source]#
_retrieve_temporary_list = [][source]#
_DEFAULT_INPUT_FILE = 'aiida.in'[source]#
_DEFAULT_OUTPUT_FILE = 'aiida.out'[source]#
_default_parser[source]#
classmethod define(spec)[source]#

Define the process specification.

classmethod set_blocked_keywords(parameters)[source]#

Force default values for blocked keywords. NOTE: this is different from PW/CP.

static filter_namelists(parameters, namelists_toprint, check_remaining=True)[source]#

Select only the given namelists from a parameter dict.

Parameters:
  • parameters – ‘dict’ containing the fortran namelists and parameters to be used.

  • namelists_toprint – ‘list’ containing the namelists to be selected from ‘parameters’. If a given namelist is not present, an empty dict is used

  • check_remaining – ‘bool’, if True, raise an exception if more namelists other than the ones given in ‘namelist_toprint’ are present in ‘parameters’.

Returns:

‘dict’ of namelists.

Raise:

InputValidationError

static generate_input_file(parameters)[source]#

Generate namelist input_file content given a dict of parameters.

Parameters:

parameters – ‘dict’ containing the fortran namelists and parameters to be used. e.g.: {‘CONTROL’:{‘calculation’:’scf’}, ‘SYSTEM’:{‘ecutwfc’:30}}

Returns:

‘str’ containing the input file content a plain text.

prepare_for_submission(folder)[source]#

Prepare the calculation job for submission by transforming input nodes into input files.

In addition to the input files being written to the sandbox folder, a CalcInfo instance will be returned that contains lists of files that need to be copied to the remote machine before job submission, as well as file lists that are to be retrieved after job completion.

Parameters:

folder – a sandbox folder to temporarily write files on disk.

Returns:

CalcInfo instance.