UppASD_AiiDA package
Subpackages
Submodules
UppASD_AiiDA.core_CLI module
UppASD_AiiDA.core_calcs module
- class UppASD_AiiDA.core_calcs.UppASD(*args: Any, **kwargs: Any)[source]
Bases:
aiida.engine.processes.calcjobs.calcjob.CalcJob
AiiDA calculation plugin wrapping the SD executable (from UppASD packages).- Parameters
CalcJob (aiida.engine.CalcJob class) – father class
- __abstractmethods__ = frozenset({})
- __module__ = 'UppASD_AiiDA.core_calcs'
- _abc_impl = <_abc_data object>
- classmethod define(spec)[source]
- Define inputs and outputs of the calculation.Note that you can add whatever flags here as wanted.(Recommand add “required=False,”)Remember that only if you put the output port here, your parser incore_parser.py will work. otherwise you will go an error report orcould not see your parsed output array in database.You can also use our example down there to make your output port.#example:#spec.output(‘xx_out’, valid_type=ArrayData, required=False,# help=’’)ToDo : we need to write all the possible output port here. so our user couldbe easier.
- find_out_files(filepath, except_files=[])[source]
- find out file names in the folder of input path and exclude files in except_files(a list)Note that we have set the default except file : “.DS_Store”
- Parameters
filepath (str) – path of input folder.
except_files (list, optional) – list of file name that need to be excluded. Make sure only need file with correct name(same name with flags) could be placed in the input folder., defaults to []
- Returns
a list of file names for input and generate tags.
- prepare_for_submission(folder)[source]
- IMPORTANT! we assumed that you have responsibility to name allfile in the input folder with same name of input flag that needto generate in inspd.dat file.And of course you can just put everything into the folder and sendit to aiida like what show in demo1 but remember to name ‘inpsd.dat’as ‘inpsd’ without the file extension name’.out’
- Parameters
folder (aiida.common.folders.Folder) – an aiida.common.folders.Folder where the plugin should temporarily place all files needed by the calculation.
- Returns
calcinfo
UppASD_AiiDA.core_parser module
Parser for UppASD
- class UppASD_AiiDA.core_parser.SpinDynamic_core_parser(node)[source]
Bases:
aiida.parsers.parser.Parser
Note that, all the parser here are just demos,or in other word, basic version(np.array) You can change it as you want and parser it to fit your need.
:param Parser father class aiida.parsers.parser :type Parser aiida.parsers.parser module :return: parsed numpy array
- __abstractmethods__ = frozenset({})
- __module__ = 'UppASD_AiiDA.core_parser'
- _abc_impl = <_abc_data object>
- averages_file_paser(file_name_of_averages)[source]
:param file_name_of_averages averages file :type file_name_of_averages opened output file :return: np.array
- coord_file_paser(file_name_of_coord)[source]
:param file_name_of_coord coord file :type file_name_of_coord opened output file :return: np array
- dm_out_parser(dmdata_out_file)[source]
:param dmdata_out_file dmdata file :type dmdata_out_file opened output file :return: np.array
- moment_file_paser(mom_out_file)[source]
:param mom_out_file moment file :type mom_out_file opened output file :return: np.array
- parse(**kwargs)[source]
IMPORTANT, All parser should be connect to the output port in core_calcs, since all files have been retrieved into the retrieved folder, we have no need to care about how many output file will UppASD generate, only thing that need to care is when parsering them into the data type you need, all parser should be connect to the output port in core_calcs
- qm_minima_file_paser(file_name_of_qm_minima)[source]
:param file_name_of_qm_minima qm minima file :type file_name_of_qm_minima opened output file :return: np.array
- qm_sweep_file_paser(file_name_of_qm_sweep)[source]
:param file_name_of_qm_sweep qm sweep file :type file_name_of_qm_sweep opened output file :return: np.array
- qpoints_file_paser(file_name_of_qpoints)[source]
:param file_name_of_qpoints points file :type file_name_of_qpoints opened output file :return: np array
Module contents
UppASD-AiiDA interface