pyiron.base.database.jobtable module

pyiron.base.database.jobtable.get_child_ids(database, sql_query, user, project_path, job_specifier, status=None)[source]

Get the childs for a specific job

Parameters
  • database (DatabaseAccess) – Database object

  • sql_query (str) – SQL query to enter a more specific request

  • user (str) – username of the user whoes user space should be searched

  • project_path (str) – root_path - this is in contrast to the project_path in GenericPath

  • job_specifier (str) – name of the master job or the master jobs job ID

  • status (str) – filter childs which match a specific status - None by default

Returns

list of child IDs

Return type

list

pyiron.base.database.jobtable.get_db_columns(database)[source]

Get column names

Parameters

database (DatabaseAccess) – Database object

Returns

list of column names like:

[‘id’, ‘parentid’, ‘masterid’, ‘projectpath’, ‘project’, ‘job’, ‘subjob’, ‘chemicalformula’, ‘status’, ‘hamilton’, ‘hamversion’, ‘username’, ‘computer’, ‘timestart’, ‘timestop’, ‘totalcputime’]

Return type

list

pyiron.base.database.jobtable.get_job_id(database, sql_query, user, project_path, job_specifier)[source]

get the job_id for job named job_name in the local project path from database

Parameters
  • database (DatabaseAccess) – Database object

  • sql_query (str) – SQL query to enter a more specific request

  • user (str) – username of the user whoes user space should be searched

  • project_path (str) – root_path - this is in contrast to the project_path in GenericPath

  • job_specifier (str) – name of the job or job ID

Returns

job ID of the job

Return type

int

pyiron.base.database.jobtable.get_job_ids(database, sql_query, user, project_path, recursive=True)[source]

Return the job IDs matching a specific query

Parameters
  • database (DatabaseAccess) – Database object

  • sql_query (str) – SQL query to enter a more specific request

  • user (str) – username of the user whoes user space should be searched

  • project_path (str) – root_path - this is in contrast to the project_path in GenericPath

  • recursive (bool) – search subprojects [True/False]

Returns

a list of job IDs

Return type

list

pyiron.base.database.jobtable.get_job_status(database, sql_query, user, project_path, job_specifier)[source]

Get the status of a particular job

Parameters
  • database (DatabaseAccess) – Database object

  • sql_query (str) – SQL query to enter a more specific request

  • user (str) – username of the user whoes user space should be searched

  • project_path (str) – root_path - this is in contrast to the project_path in GenericPath

  • job_specifier (str) – name of the job or job ID

Returns

job status can be one of the following [‘initialized’, ‘appended’, ‘created’, ‘submitted’, ‘running’,

’aborted’, ‘collect’, ‘suspended’, ‘refresh’, ‘busy’, ‘finished’]

Return type

str

pyiron.base.database.jobtable.get_job_working_directory(database, sql_query, user, project_path, job_specifier)[source]

Get the working directory of a particular job

Parameters
  • database (DatabaseAccess) – Database object

  • sql_query (str) – SQL query to enter a more specific request

  • user (str) – username of the user whoes user space should be searched

  • project_path (str) – root_path - this is in contrast to the project_path in GenericPath

  • job_specifier (str) – name of the job or job ID

Returns

working directory as absolute path

Return type

str

pyiron.base.database.jobtable.get_jobs(database, sql_query, user, project_path, recursive=True, columns=None)[source]

Internal function to return the jobs as dictionary rather than a pandas.Dataframe

Parameters
  • database (DatabaseAccess) – Database object

  • sql_query (str) – SQL query to enter a more specific request

  • user (str) – username of the user whoes user space should be searched

  • project_path (str) – root_path - this is in contrast to the project_path in GenericPath

  • recursive (bool) – search subprojects [True/False]

  • columns (list) – by default only the columns [‘id’, ‘project’] are selected, but the user can select a subset of [‘id’, ‘status’, ‘chemicalformula’, ‘job’, ‘subjob’, ‘project’, ‘projectpath’, ‘timestart’, ‘timestop’, ‘totalcputime’, ‘computer’, ‘hamilton’, ‘hamversion’, ‘parentid’, ‘masterid’]

Returns

columns are used as keys and point to a list of the corresponding values

Return type

dict

pyiron.base.database.jobtable.job_table(database, sql_query, user, project_path, recursive=True, columns=None, all_columns=False, sort_by='id', max_colwidth=200, element_lst=None)[source]

Access the job_table

Parameters
  • database (DatabaseAccess) – Database object

  • sql_query (str) – SQL query to enter a more specific request

  • user (str) – username of the user whoes user space should be searched

  • project_path (str) – root_path - this is in contrast to the project_path in GenericPath

  • recursive (bool) – search subprojects [True/False]

  • columns (list) – by default only the columns [‘job’, ‘project’, ‘chemicalformula’] are selected, but the user can select a subset of [‘id’, ‘status’, ‘chemicalformula’, ‘job’, ‘subjob’, ‘project’, ‘projectpath’, ‘timestart’, ‘timestop’, ‘totalcputime’, ‘computer’, ‘hamilton’, ‘hamversion’, ‘parentid’, ‘masterid’]

  • all_columns (bool) – Select all columns - this overwrites the columns option.

  • sort_by (str) – Sort by a specific column

  • max_colwidth (int) – set the column width

  • element_lst (list) – list of elements required in the chemical formular - by default None

Returns

Return the result as a pandas.Dataframe object

Return type

pandas.Dataframe

pyiron.base.database.jobtable.set_job_status(database, sql_query, user, project_path, job_specifier, status)[source]

Set the status of a particular job

Parameters
  • database (DatabaseAccess) – Database object

  • sql_query (str) – SQL query to enter a more specific request

  • user (str) – username of the user whoes user space should be searched

  • project_path (str) – root_path - this is in contrast to the project_path in GenericPath

  • job_specifier (str) – name of the job or job ID

  • status (str) – job status can be one of the following [‘initialized’, ‘appended’, ‘created’, ‘submitted’, ‘running’, ‘aborted’, ‘collect’, ‘suspended’, ‘refresh’, ‘busy’, ‘finished’]