aiida.cmdline.commands package¶
-
aiida.cmdline.commands.
click_subcmd_complete
(cmd_group)[source]¶ Create a subcommand completion function for a click command group.
Submodules¶
-
class
aiida.cmdline.commands.calculation.
Calculation
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
Query and interact with calculations
Different subcommands allow to list the running calculations, show the content of the input/output files, see the logs, etc.
-
__module__
= 'aiida.cmdline.commands.calculation'¶
-
_abstract
= False¶
-
calculation_cleanworkdir
(*args)[source]¶ Clean the working directory of calculations by removing all the content of the associated RemoteFolder node. Calculations can be identified by pk with the -k flag or by specifying limits on the modification times with -p/-o flags
-
calculation_gotocomputer
(*args)[source]¶ Open a shell to the calc folder on the cluster
This command opens a ssh connection to the scratch folder on the remote computer on which the calculation is being/has been executed.
-
calculation_inputcat
(*args)[source]¶ Show an input file of a calculation node.
It shows the files in the raw_input subdirectory. Use the -h option for more help on the command line options.
-
calculation_inputls
(*args)[source]¶ Show the list of input files of a calculation node.
It shows the files in the raw_input subdirectory. Use the -h option for more help on the command line options.
-
calculation_kill
(*args)[source]¶ Kill a calculation.
Pass a list of calculation PKs to kill them. If you also pass the -f option, no confirmation will be asked.
-
calculation_outputcat
(*args)[source]¶ Show an output file of a calculation node.
It shows the files in the ‘path’ subdirectory of the output node of files retrieved by the parser. Therefore, this will not work before files are retrieved by the daemon. Use the -h option for more help on the command line options.
-
calculation_outputls
(*args)[source]¶ Show the list of output files of a calculation node.
It lists the files in the ‘path’ subdirectory of the output node of files retrieved by the parser. Therefore, this will not work before files are retrieved by the daemon. Use the -h option for more help on the command line options.
-
This allows to setup and configure a code from command line.
TODO: think if we want to allow to change path and prepend/append text.
-
class
aiida.cmdline.commands.code.
Code
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
Setup and manage codes to be used
This command allows to list, add, modify, configure codes.
-
__module__
= 'aiida.cmdline.commands.code'¶
-
_abstract
= False¶
-
code_delete
(*args)[source]¶ Delete a code
Does not delete the code if there are calculations that are using it (i.e., if there are output links)
-
code_reveal
(*args)[source]¶ Reveal (if it was hidden before) one or more codes from the verdi show command
-
get_code
(code_id)[source]¶ Get a Computer object with given identifier, that can either be the numeric ID (pk), or the label (if unique).
Note
Since all command line arguments get converted to string types, we cannot assess the intended type (an integer pk or a string label) from the type of the variable code_id. If the code_id can be converted into an integer we will assume the value corresponds to a pk. This means, however, that if there would be another code, with a label directly equivalent to the string value of that pk, that this code can not be referenced by its label, as the other code, corresponding to the integer pk, will get matched first.
-
-
class
aiida.cmdline.commands.code.
CodeInputValidationClass
[source]¶ Bases:
object
A class with information for the validation of input text of Codes
-
__dict__
= dict_proxy({'_computer_validator': <function _computer_validator>, '__module__': 'aiida.cmdline.commands.code', '_conf_attributes_local': [('folder_with_code', 'Folder with the code', 'The folder on your local computer in which there are the files to be stored in the AiiDA repository and then copied over for every submitted calculation', False), ('local_rel_path', 'Relative path of the executable', 'The relative path of the executable file inside the folder entered in the previous step', False)], 'remote_abs_path': '', '_get_remote_abs_path_string': <function _get_remote_abs_path_string>, '_set_folder_with_code_string': <function _set_folder_with_code_string>, '_set_is_local_string': <function _set_is_local_string>, '_conf_attributes_start': [('label', 'Label', 'A label to refer to this code', False), ('description', 'Description', 'A human-readable description of this code', False), ('is_local', 'Local', 'True or False; if True, then you have to provide a folder with files that will be stored in AiiDA and copied to the remote computers for every calculation submission. If True, the code is just a link to a remote computer and an absolute path there', False), ('input_plugin', 'Default input plugin', "A string of the default input plugin to be used with this code that is recognized by the CalculationFactory. Use the 'verdi calculation plugins' command to get the list of existingplugins", False)], '_get_label_string': <function _get_label_string>, '_folder_with_code_validator': <function _folder_with_code_validator>, '_set_local_rel_path_string': <function _set_local_rel_path_string>, '__dict__': <attribute '__dict__' of 'CodeInputValidationClass' objects>, '__weakref__': <attribute '__weakref__' of 'CodeInputValidationClass' objects>, 'description': '', '_local_rel_path_validator': <function _local_rel_path_validator>, '_description_validator': <function _description_validator>, '_conf_attributes_end': [('prepend_text', 'Text to prepend to each command execution\nFOR INSTANCE, MODULES TO BE LOADED FOR THIS CODE', 'This is a multiline string, whose content will be prepended inside\nthe submission script before the real execution of the job. It is\nyour responsibility to write proper bash code!', True), ('append_text', 'Text to append to each command execution', 'This is a multiline string, whose content will be appended inside\nthe submission script after the real execution of the job. It is\nyour responsibility to write proper bash code!', True)], '_get_is_local_string': <function _get_is_local_string>, '_get_input_plugin_string': <function _get_input_plugin_string>, 'label': '', 'append_text': '', '_set_remote_abs_path_string': <function _set_remote_abs_path_string>, '_get_computer_string': <function _get_computer_string>, '_set_description_string': <function _set_description_string>, '_set_input_plugin_string': <function _set_input_plugin_string>, '_conf_attributes_relabel': [('label', 'Label', 'A label to refer to this code', False), ('description', 'Description', 'A human-readable description of this code', False)], 'create_code': <function create_code>, '_input_plugin_validator': <function _input_plugin_validator>, '_set_prepend_text_string': <function _set_prepend_text_string>, '_set_append_text_string': <function _set_append_text_string>, '_remote_abs_path_validator': <function _remote_abs_path_validator>, '_get_local_rel_path_string': <function _get_local_rel_path_string>, '_set_computer_string': <function _set_computer_string>, 'ask': <function ask>, '_get_description_string': <function _get_description_string>, '_get_prepend_text_string': <function _get_prepend_text_string>, 'input_plugin': None, '_conf_attributes_remote': [('computer', 'Remote computer name', 'The computer name as on which the code resides, as stored in the AiiDA database', False), ('remote_abs_path', 'Remote absolute path', 'The (full) absolute path on the remote machine', False)], 'is_local': False, 'folder_with_code': '', '_get_append_text_string': <function _get_append_text_string>, 'prepend_text': '', '_label_validator': <function _label_validator>, '__doc__': '\n A class with information for the validation of input text of Codes\n ', '_get_folder_with_code_string': <function _get_folder_with_code_string>, 'computer': None, '_append_text_validator': <function _append_text_validator>, '_is_local_validator': <function _is_local_validator>, 'set_and_validate_from_code': <function set_and_validate_from_code>, 'local_rel_path': '', '_prepend_text_validator': <function _prepend_text_validator>, '_set_label_string': <function _set_label_string>})¶
-
__module__
= 'aiida.cmdline.commands.code'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
_conf_attributes_end
= [('prepend_text', 'Text to prepend to each command execution\nFOR INSTANCE, MODULES TO BE LOADED FOR THIS CODE', 'This is a multiline string, whose content will be prepended inside\nthe submission script before the real execution of the job. It is\nyour responsibility to write proper bash code!', True), ('append_text', 'Text to append to each command execution', 'This is a multiline string, whose content will be appended inside\nthe submission script after the real execution of the job. It is\nyour responsibility to write proper bash code!', True)]¶
-
_conf_attributes_local
= [('folder_with_code', 'Folder with the code', 'The folder on your local computer in which there are the files to be stored in the AiiDA repository and then copied over for every submitted calculation', False), ('local_rel_path', 'Relative path of the executable', 'The relative path of the executable file inside the folder entered in the previous step', False)]¶
-
_conf_attributes_relabel
= [('label', 'Label', 'A label to refer to this code', False), ('description', 'Description', 'A human-readable description of this code', False)]¶
-
_conf_attributes_remote
= [('computer', 'Remote computer name', 'The computer name as on which the code resides, as stored in the AiiDA database', False), ('remote_abs_path', 'Remote absolute path', 'The (full) absolute path on the remote machine', False)]¶
-
_conf_attributes_start
= [('label', 'Label', 'A label to refer to this code', False), ('description', 'Description', 'A human-readable description of this code', False), ('is_local', 'Local', 'True or False; if True, then you have to provide a folder with files that will be stored in AiiDA and copied to the remote computers for every calculation submission. If True, the code is just a link to a remote computer and an absolute path there', False), ('input_plugin', 'Default input plugin', "A string of the default input plugin to be used with this code that is recognized by the CalculationFactory. Use the 'verdi calculation plugins' command to get the list of existingplugins", False)]¶
-
_input_plugin_validator
(input_plugin)[source]¶ Validates the input_plugin, checking it is in the list of existing plugins.
-
append_text
= ''¶
-
computer
= None¶
-
create_code
()[source]¶ Create a code with the information contained in this class, BUT DOES NOT STORE IT.
-
description
= ''¶
-
folder_with_code
= ''¶
-
input_plugin
= None¶
-
is_local
= False¶
-
label
= ''¶
-
local_rel_path
= ''¶
-
prepend_text
= ''¶
-
remote_abs_path
= ''¶
-
This allows to manage comments from command line.
-
class
aiida.cmdline.commands.comment.
Comment
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
Manage general properties of nodes in the database
-
__module__
= 'aiida.cmdline.commands.comment'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.computer.
Computer
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
Setup and manage computers to be used
This command allows to list, add, modify and configure computers.
-
__module__
= 'aiida.cmdline.commands.computer'¶
-
_abstract
= False¶
-
_computer_create_temp_file
(transport, scheduler, dbauthinfo)[source]¶ Internal test to check if it is possible to create a temporary file and then delete it in the work directory
Note: exceptions could be raised
Parameters: - transport – an open transport
- scheduler – the corresponding scheduler class
- dbauthinfo – the dbauthinfo object (from which one can get computer and aiidauser)
Returns: True if the test succeeds, False if it fails.
-
_computer_test_get_jobs
(transport, scheduler, dbauthinfo)[source]¶ Internal test to check if it is possible to check the queue state.
Note: exceptions could be raised
Parameters: - transport – an open transport
- scheduler – the corresponding scheduler class
- dbauthinfo – the dbauthinfo object (from which one can get computer and aiidauser)
Returns: True if the test succeeds, False if it fails.
-
computer_delete
(*args)[source]¶ Configure the authentication information for a given computer
Does not delete the computer if there are calculations that are using it.
-
computer_disable
(*args)[source]¶ Disable a computer.
If a computer is disabled, AiiDA does not try to connect to it to submit new calculations or check for the state of existing calculations. Useful, for instance, if you know that a computer is under maintenance.
-
-
class
aiida.cmdline.commands.daemon.
Daemon
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
Manage the AiiDA daemon
This command allows to interact with the AiiDA daemon. Valid subcommands are:
- start: start the daemon
- stop: restart the daemon
- restart: restart the aiida daemon, waiting for it to cleanly exit before restarting it.
- status: inquire the status of the Daemon.
- logshow: show the log in a continuous fashion, similar to the ‘tail -f’ command. Press CTRL+C to exit.
-
__init__
()[source]¶ A dictionary with valid commands and functions to be called: start, stop, status and restart.
-
__module__
= 'aiida.cmdline.commands.daemon'¶
-
_abstract
= False¶
-
_clean_pid_files
()[source]¶ Tries to remove the celery.pid files from the .aiida/daemon subfolder. This is typically needed when the computer is restarted with the daemon still on.
-
daemon_restart
(*args)[source]¶ Restart the daemon. Before restarting, wait for the daemon to really shut down.
-
daemon_stop
(*args, **kwargs)[source]¶ Stop the daemon.
Parameters: wait_for_death – If True, also verifies that the process was already killed. It attempts at most max_retries
times, withsleep_between_retries
seconds between one attempt and the following one (both variables are for the time being hardcoded in the function).Returns: None if wait_for_death
is False. True/False if the process was actually dead or after all the retries it was still alive.
-
aiida.cmdline.commands.daemon.
is_daemon_user
()[source]¶ Return True if the user is the current daemon user, False otherwise.
-
class
aiida.cmdline.commands.data.
Data
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandRouter
Setup and manage data specific types
There is a list of subcommands for managing specific types of data. For instance, ‘data upf’ manages pseudopotentials in the UPF format.
-
__module__
= 'aiida.cmdline.commands.data'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.data.
Depositable
[source]¶ Bases:
object
Provides shell completion for depositable data nodes.
Note
classes, inheriting Depositable, MUST NOT contain attributes, starting with
_deposit_
, which are not plugins for depositing.-
__dict__
= dict_proxy({'deposit_parameters_postfix': '_parameters', '__module__': 'aiida.cmdline.commands.data', 'get_deposit_plugins': <function get_deposit_plugins>, '__dict__': <attribute '__dict__' of 'Depositable' objects>, 'deposit_prefix': '_deposit_', '__weakref__': <attribute '__weakref__' of 'Depositable' objects>, '__doc__': '\n Provides shell completion for depositable data nodes.\n\n .. note:: classes, inheriting Depositable, MUST NOT contain\n attributes, starting with ``_deposit_``, which are not plugins for\n depositing.\n ', 'deposit': <function deposit>})¶
-
__module__
= 'aiida.cmdline.commands.data'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
deposit
(*args)[source]¶ Deposit the data node to a given database.
Parameters: args – a namespace with parsed command line parameters.
-
deposit_parameters_postfix
= '_parameters'¶
-
deposit_prefix
= '_deposit_'¶
-
-
class
aiida.cmdline.commands.data.
Exportable
[source]¶ Bases:
object
Provides shell completion for exportable data nodes.
Note
classes, inheriting Exportable, MUST NOT contain attributes, starting with
_export_
, which are not plugins for exporting.-
__dict__
= dict_proxy({'export_parameters_postfix': '_parameters', 'append_export_cmdline_arguments': <function append_export_cmdline_arguments>, 'export_prefix': '_export_', 'print_or_store': <function print_or_store>, '__module__': 'aiida.cmdline.commands.data', 'get_export_plugins': <function get_export_plugins>, 'export': <function export>, '__dict__': <attribute '__dict__' of 'Exportable' objects>, '__weakref__': <attribute '__weakref__' of 'Exportable' objects>, '__doc__': '\n Provides shell completion for exportable data nodes.\n\n .. note:: classes, inheriting Exportable, MUST NOT contain attributes,\n starting with ``_export_``, which are not plugins for exporting.\n '})¶
-
__module__
= 'aiida.cmdline.commands.data'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
append_export_cmdline_arguments
(parser)[source]¶ Function (to be overloaded in a subclass) to add custom export command line arguments.
Parameters: parser – a ArgParse parser object Returns: change the parser in place
-
export_parameters_postfix
= '_parameters'¶
-
export_prefix
= '_export_'¶
-
print_or_store
(node, output_fname, fileformat, other_args={}, overwrite=False)[source]¶ Depending on the parameters, either print the (single) output file on screen, or stores the file(s) on disk.
Parameters: - node – the Data node to print or store on disk
- output_fname – The filename to store the main file. If empty or None, print instead
- fileformat – a string to pass to the _exportstring method
- other_args – a dictionary with additional kwargs to pass to _exportstring
- overwrite – if False, stops if any file already exists (when output_fname is not empty
Note: this function calls directly sys.exit(1) when an error occurs (or e.g. if check_overwrite is True and a file already exists).
-
-
class
aiida.cmdline.commands.data.
Importable
[source]¶ Bases:
object
Provides shell completion for importable data nodes.
Note
classes, inheriting Importable, MUST NOT contain attributes, starting with
_import_
, which are not plugins for importing.-
__dict__
= dict_proxy({'import_prefix': '_import_', '__module__': 'aiida.cmdline.commands.data', 'importfile': <function importfile>, '__dict__': <attribute '__dict__' of 'Importable' objects>, 'import_parameters_postfix': '_parameters', '__weakref__': <attribute '__weakref__' of 'Importable' objects>, '__doc__': '\n Provides shell completion for importable data nodes.\n\n .. note:: classes, inheriting Importable, MUST NOT contain attributes,\n starting with ``_import_``, which are not plugins for importing.\n ', 'get_import_plugins': <function get_import_plugins>})¶
-
__module__
= 'aiida.cmdline.commands.data'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
import_parameters_postfix
= '_parameters'¶
-
import_prefix
= '_import_'¶
-
-
class
aiida.cmdline.commands.data.
Listable
[source]¶ Bases:
object
Provides shell completion for listable data nodes.
Note
classes, inheriting Listable, MUST define value for property
dataclass
(preferably in__init__
), which has to point to correct *Data class.-
__dict__
= dict_proxy({'append_list_cmdline_arguments': <function append_list_cmdline_arguments>, '__module__': 'aiida.cmdline.commands.data', 'list': <function list>, 'get_column_names': <function get_column_names>, 'query_group': <function query_group>, 'query_past_days': <function query_past_days>, '__dict__': <attribute '__dict__' of 'Listable' objects>, 'query': <function query>, '__weakref__': <attribute '__weakref__' of 'Listable' objects>, '__doc__': '\n Provides shell completion for listable data nodes.\n\n .. note:: classes, inheriting Listable, MUST define value for property\n ``dataclass`` (preferably in ``__init__``), which\n has to point to correct \\*Data class.\n '})¶
-
__module__
= 'aiida.cmdline.commands.data'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
append_list_cmdline_arguments
(parser)[source]¶ Append additional command line parameters, that are later parsed and used in the query construction.
Parameters: parser – instance of argparse.ArgumentParser
-
get_column_names
()[source]¶ Return the list with column names.
Note
neither the number nor correspondence of column names and actual columns in the output from the
query()
are checked.
-
list
(*args)[source]¶ List all instances of given data class.
Parameters: args – a list of command line arguments.
-
-
class
aiida.cmdline.commands.data.
Visualizable
[source]¶ Bases:
object
Provides shell completion for visualizable data nodes.
Note
classes, inheriting Visualizable, MUST NOT contain attributes, starting with
_show_
, which are not plugins for visualization.In order to specify a default visualization format, one has to override
_default_show_format
property (preferably in__init__
), setting it to the name of default visualization tool.-
__dict__
= dict_proxy({'get_show_plugins': <function get_show_plugins>, '__module__': 'aiida.cmdline.commands.data', 'show_parameters_postfix': '_parameters', 'show': <function show>, '__dict__': <attribute '__dict__' of 'Visualizable' objects>, 'show_prefix': '_show_', '__weakref__': <attribute '__weakref__' of 'Visualizable' objects>, '__doc__': '\n Provides shell completion for visualizable data nodes.\n\n .. note:: classes, inheriting Visualizable, MUST NOT contain\n attributes, starting with ``_show_``, which are not plugins for\n visualization.\n\n In order to specify a default visualization format, one has to override\n ``_default_show_format`` property (preferably in\n ``__init__``), setting it to the name of default visualization tool.\n '})¶
-
__module__
= 'aiida.cmdline.commands.data'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
show_parameters_postfix
= '_parameters'¶
-
show_prefix
= '_show_'¶
-
-
class
aiida.cmdline.commands.data.
_Array
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
,aiida.cmdline.commands.data.Visualizable
View and manipulate Array data classes.
-
__module__
= 'aiida.cmdline.commands.data'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.data.
_Bands
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
,aiida.cmdline.commands.data.Listable
,aiida.cmdline.commands.data.Visualizable
,aiida.cmdline.commands.data.Exportable
Manipulation on the bands
-
__module__
= 'aiida.cmdline.commands.data'¶
-
_abstract
= False¶
-
_export_agr
(node, output_fname, overwrite, **kwargs)[source]¶ Export a .agr file, to be visualized with the XMGrace plotting software.
-
_export_agr_batch
(node, output_fname, overwrite, **kwargs)[source]¶ Export a .agr batch file, to be visualized with the XMGrace plotting software.
-
_export_dat_blocks
(node, output_fname, overwrite, **kwargs)[source]¶ Export a .dat file with one line per datapoint (kpt, energy), with multiple bands separated in stanzas (i.e. having at least an empty newline inbetween).
-
_export_dat_multicolumn
(node, output_fname, overwrite, **kwargs)[source]¶ Export a .dat file with one line per kpoint, with multiple energy values on the same line separated by spaces.
-
_export_gnuplot
(node, output_fname, overwrite, **kwargs)[source]¶ Export a Gnuplot file, together with the corresponding .dat file, to be visualized with the Gnuplot plotting software.
Run with ‘gnuplot -p filename’ to see the plot (and keep the window with the plot open).
-
_export_json
(node, output_fname, overwrite, **kwargs)[source]¶ Export a .dat file with one line per datapoint (kpt, energy), with multiple bands separated in stanzas (i.e. having at least an empty newline inbetween).
-
_export_mpl_pdf
(node, output_fname, overwrite, **kwargs)[source]¶ Export a .pdf file generated using matplotlib
-
_export_mpl_png
(node, output_fname, overwrite, **kwargs)[source]¶ Export a .png file generated using matplotlib
-
_export_mpl_singlefile
(node, output_fname, overwrite, **kwargs)[source]¶ Export a .py file that would produce the plot using matplotlib when run with python (with data dumped within the same python file)
-
_export_mpl_withjson
(node, output_fname, overwrite, **kwargs)[source]¶ Export a .py file that would produce the plot using matplotlib when run with python (with data dumped in an external json filee)
-
_show_xmgrace
(exec_name, list_bands)[source]¶ Plugin for show the bands with the XMGrace plotting software.
-
append_export_cmdline_arguments
(parser)[source]¶ Additional command line arguments for the ‘export’ command
Parameters: parser – instance of argparse.ArgumentParser
-
append_list_cmdline_arguments
(parser)[source]¶ Append additional command line parameters, that are later parsed and used in the query construction.
Parameters: parser – instance of argparse.ArgumentParser
-
-
class
aiida.cmdline.commands.data.
_Cif
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
,aiida.cmdline.commands.data.Listable
,aiida.cmdline.commands.data.Visualizable
,aiida.cmdline.commands.data.Exportable
,aiida.cmdline.commands.data.Importable
,aiida.cmdline.commands.data.Depositable
Visualize CIF structures
-
__module__
= 'aiida.cmdline.commands.data'¶
-
_abstract
= False¶
-
_deposit_tcod_parameters
(parser, **kwargs)[source]¶ Command line parameters deposition plugin for TCOD.
-
_show_vesta
(exec_name, structure_list)[source]¶ Plugin for VESTA, added by Yue-Wen FANG and Abel Carreras at Kyoto University in the group of Prof. Isao Tanaka’s lab
-
-
class
aiida.cmdline.commands.data.
_Parameter
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
,aiida.cmdline.commands.data.Visualizable
View and manipulate Parameter data classes.
-
__module__
= 'aiida.cmdline.commands.data'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.data.
_Remote
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
Manage RemoteData objects
-
__module__
= 'aiida.cmdline.commands.data'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.data.
_Structure
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
,aiida.cmdline.commands.data.Listable
,aiida.cmdline.commands.data.Visualizable
,aiida.cmdline.commands.data.Exportable
,aiida.cmdline.commands.data.Importable
,aiida.cmdline.commands.data.Depositable
Visualize AiIDA structures
-
__module__
= 'aiida.cmdline.commands.data'¶
-
_abstract
= False¶
-
_deposit_tcod_parameters
(parser, **kwargs)[source]¶ Command line parameters deposition plugin for TCOD.
-
_import_ase
(filename, **kwargs)[source]¶ Imports a structure in a number of formats using the ASE routines.
-
_import_xyz_parameters
(parser)[source]¶ Adding some functionality to the parser to deal with importing files
-
_show_vesta
(exec_name, structure_list)[source]¶ Plugin for VESTA This VESTA plugin was added by Yue-Wen FANG and Abel Carreras at Kyoto University in the group of Prof. Isao Tanaka’s lab
-
append_list_cmdline_arguments
(parser)[source]¶ Append additional command line parameters, that are later parsed and used in the query construction.
Parameters: parser – instance of argparse.ArgumentParser
-
-
class
aiida.cmdline.commands.data.
_Trajectory
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
,aiida.cmdline.commands.data.Listable
,aiida.cmdline.commands.data.Visualizable
,aiida.cmdline.commands.data.Exportable
,aiida.cmdline.commands.data.Depositable
View and manipulate TrajectoryData instances.
-
__module__
= 'aiida.cmdline.commands.data'¶
-
_abstract
= False¶
-
_deposit_tcod_parameters
(parser, **kwargs)[source]¶ Command line parameters deposition plugin for TCOD.
-
_show_mpl_heatmap
(exec_name, trajectory_list, **kwargs)[source]¶ Produces a matplotlib plot of the trajectory
-
_show_mpl_heatmap_parameters
(parser)[source]¶ Describe command line parameters for _show_mpl_heatmap
-
-
class
aiida.cmdline.commands.data.
_Upf
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
,aiida.cmdline.commands.data.Importable
Setup and manage upf to be used
This command allows to list and configure upf.
-
__module__
= 'aiida.cmdline.commands.data'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.devel.
Devel
(*args, **kwargs)[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
AiiDA commands for developers
Provides a set of tools for developers. For instance, it allows to run the django tests for the db application and the unittests of the AiiDA modules.
If you want to limit the tests to a specific subset of modules, pass them as parameters.
An invalid parameter will make the code print the list of all valid parameters.
Note: the test called ‘db’ will run all db.* tests.
-
__module__
= 'aiida.cmdline.commands.devel'¶
-
_abstract
= False¶
-
_dbprefix
= 'db.'¶
-
_dbrawprefix
= 'db'¶
-
base_allowed_test_folders
= ['aiida.scheduler', 'aiida.transport', 'aiida.common', 'aiida.tests.work', 'aiida.utils', 'aiida.control', 'aiida.cmdline.tests']¶
-
calculation_getresults
(*args)[source]¶ Routine to get a list of results of a set of calculations, still under development.
-
run_describeproperties
(*args)[source]¶ List all valid properties that can be stored in the AiiDA config file.
Only properties listed in the
_property_table
ofaida.common.setup
can be used.
-
run_setproperty
(*args)[source]¶ Define a global AiiDA property in the config file in .aiida.
Only properties in the _property_table of aiida.common.setup can be modified.
-
separators
= [('~=', 'iexact'), ('>=', 'gte'), ('<=', 'lte'), ('>', 'gt'), ('<', 'lt'), ('=', '')]¶
-
-
aiida.cmdline.commands.devel.
apply_function
(function, value)[source]¶ The function must be defined in this file and be in the format applyfunct_FUNCNAME where FUNCNAME is the string passed as the parameter ‘function’; applyfunct_FUNCNAME will accept only one parameter (‘value’) and return an appropriate value.
-
exception
aiida.cmdline.commands.exportfile.
DanglingLinkError
[source]¶ Bases:
exceptions.Exception
-
__module__
= 'aiida.cmdline.commands.exportfile'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
class
aiida.cmdline.commands.exportfile.
Export
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
Create and manage AiiDA export archives
-
__module__
= 'aiida.cmdline.commands.exportfile'¶
-
_abstract
= False¶
-
-
aiida.cmdline.commands.exportfile.
migrate_v1_to_v2
(metadata, data)[source]¶ Migration of export files from v0.1 to v0.2, which means generalizing the field names with respect to the database backend
Parameters: - data – the content of an export archive data.json file
- metadata – the content of an export archive metadata.json file
-
aiida.cmdline.commands.exportfile.
migrate_v2_to_v3
(metadata, data)[source]¶ Migration of export files from v0.2 to v0.3, which means adding the link types to the link entries and making the entity key names backend agnostic by effectively removing the prefix ‘aiida.backends.djsite.db.models’
Parameters: - data – the content of an export archive data.json file
- metadata – the content of an export archive metadata.json file
-
aiida.cmdline.commands.exportfile.
update_metadata
(metadata, version)[source]¶ Update the metadata with a new version number and a notification of the conversion that was executed
Parameters: - metadata – the content of an export archive metadata.json file
- version – string version number that the updated metadata should get
-
aiida.cmdline.commands.exportfile.
verify_metadata_version
(metadata, version=None)[source]¶ Utility function to verify that the metadata has the correct version number. If no version number is passed, it will just extract the version number and return it.
Parameters: - metadata – the content of an export archive metadata.json file
- version – string version number that the metadata is expected to have
-
class
aiida.cmdline.commands.graph.
Graph
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
Utility to explore the nodes in the database graph More specifically it allow the user to:
- Generate and render graph - (TODO) Find if two nodes of a graph are connected - (TODO) Extend functionalities
A list dictionary with available subcommands can be found in __init__ function
-
__init__
()[source]¶ A dictionary with valid subcommands as keys and corresponding functions as values
-
__module__
= 'aiida.cmdline.commands.graph'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.group.
Group
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
Setup and manage groups
There is a list of subcommands to perform specific operation on groups.
-
__module__
= 'aiida.cmdline.commands.group'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.importfile.
Import
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommand
Import nodes and group of nodes
This command allows to import nodes from file, for backup purposes or to share data with collaborators.
-
__module__
= 'aiida.cmdline.commands.importfile'¶
-
_abstract
= False¶
-
complete
(subargs_idx, subargs)[source]¶ Method called when the user asks for the bash completion. Print a list of valid keywords. Returning without printing will use standard bash completion.
Parameters: - subargs_idx – the index of the subargs where the TAB key was pressed (0 is the first element of subargs)
- subargs – a list of subarguments to this command
-
-
class
aiida.cmdline.commands.node.
Node
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandRouter
Manage operations on AiiDA nodes
There is a list of subcommands for managing specific types of data. For instance, ‘node repo’ manages the files in the local repository.
-
__module__
= 'aiida.cmdline.commands.node'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.node.
_Delete
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommand
-
__module__
= 'aiida.cmdline.commands.node'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.node.
_Description
(node_subclass='data')[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
See or modify the label of one or more set of nodes
-
__init__
(node_subclass='data')[source]¶ x.__init__(…) initializes x; see help(type(x)) for signature
-
__module__
= 'aiida.cmdline.commands.node'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.node.
_Label
(node_subclass='data')[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
See or modify the label of one or more set of nodes
-
__init__
(node_subclass='data')[source]¶ x.__init__(…) initializes x; see help(type(x)) for signature
-
__module__
= 'aiida.cmdline.commands.node'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.node.
_Repo
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
Show files and their contents in the local repository
-
__module__
= 'aiida.cmdline.commands.node'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.node.
_Show
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommand
Show node information (pk, uuid, class, inputs and outputs)
-
__module__
= 'aiida.cmdline.commands.node'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.node.
_Tree
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommand
Show a tree of the nodes.
-
__module__
= 'aiida.cmdline.commands.node'¶
-
_abstract
= False¶
-
-
aiida.cmdline.commands.node.
cat_repo_files
(node, path)[source]¶ Given a Node and a relative path to a file in the Node repository directory, prints in output the content of the file.
Parameters: - node – a Node instance
- path – a string with the relative path to list. Must be a file.
Raises: ValueError – if the file is not found, or is a directory.
-
aiida.cmdline.commands.node.
list_repo_files
(node, path, color)[source]¶ Given a Node and a relative path prints in output the list of files in the given path in the Node repository directory.
Parameters: - node – a Node instance
- path – a string with the relative path to list. Can be a file.
- color – boolean, if True prints with the codes to show colors.
Raises: ValueError – if the file or directory is not found.
This allows to manage profiles from command line.
-
class
aiida.cmdline.commands.profile.
Profile
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
List AiiDA profiles, and set the default profile.
Allow to see the list of AiiDA profiles, and to set the default profile (the to be used by any verdi command when no ‘-p’ option is given).
-
__module__
= 'aiida.cmdline.commands.profile'¶
-
_abstract
= False¶
-
-
class
aiida.cmdline.commands.rehash.
Rehash
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommand
Re-hash all nodes.
-
__module__
= 'aiida.cmdline.commands.rehash'¶
-
_abstract
= False¶
-
This allows to hook-up the AiIDA built-in RESTful API. Main advantage of doing this by means of a verdi command is that different profiles can be selected at hook-up (-p flag).
-
class
aiida.cmdline.commands.restapi.
Restapi
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommand
verdi command used to hook up the AiIDA REST API. Example Usage:
verdi -p <profile_name> restapi –host 127.0.0.5 –port 6789 –config-dir <location of the onfig.py file>
-
__module__
= 'aiida.cmdline.commands.restapi'¶
-
_abstract
= False¶
-
aiida
= <module 'aiida' from '/home/docs/checkouts/readthedocs.org/user_builds/aiida-core/checkouts/v0.12.0/docs/source/../../aiida/__init__.py'>¶
-
default_config_dir
= '/home/docs/checkouts/readthedocs.org/user_builds/aiida-core/checkouts/v0.12.0/aiida/restapi/common'¶
-
default_host
= '127.0.0.1'¶
-
default_port
= '5000'¶
-
os
= <module 'os' from '/home/docs/checkouts/readthedocs.org/user_builds/aiida-core/envs/v0.12.0/lib/python2.7/os.pyc'>¶
-
parse_aiida_profile
= False¶
-
-
class
aiida.cmdline.commands.shell.
Shell
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommand
Run the interactive shell with the AiiDA environment loaded.
This command opens an ipython shell with the AiiDA environment loaded.
-
__module__
= 'aiida.cmdline.commands.shell'¶
-
_abstract
= False¶
-
complete
(subargs_idx, subargs)[source]¶ Method called when the user asks for the bash completion. Print a list of valid keywords. Returning without printing will use standard bash completion.
Parameters: - subargs_idx – the index of the subargs where the TAB key was pressed (0 is the first element of subargs)
- subargs – a list of subarguments to this command
-
shells
= ['ipython', 'bpython']¶
-
This allows to setup and configure a user from command line.
-
class
aiida.cmdline.commands.user.
User
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
List and configure new AiiDA users.
Allow to see the list of AiiDA users, their permissions, and to configure old and new users.
-
__module__
= 'aiida.cmdline.commands.user'¶
-
_abstract
= False¶
-
-
aiida.cmdline.commands.user.
do_configure
(email, first_name, last_name, institution, no_password, non_interactive=False, force=False, **kwargs)[source]¶
-
class
aiida.cmdline.commands.work.
Work
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
Manage the AiiDA worflow manager
-
__module__
= 'aiida.cmdline.commands.work'¶
-
_abstract
= False¶
-
-
aiida.cmdline.commands.work.
_build_query
(projections=None, order_by=None, limit=None, past_days=None)[source]¶
-
class
aiida.cmdline.commands.workflow.
Workflow
[source]¶ Bases:
aiida.cmdline.baseclass.VerdiCommandWithSubcommands
Manage the AiiDA legacy worflow manager
Valid subcommands are: * list: list the running workflows running and their state. Pass a -h | option for further help on valid options. * kill: kill a given workflow * report: show the report of a given workflow
-
__module__
= 'aiida.cmdline.commands.workflow'¶
-
_abstract
= False¶
-