schrodinger.application.matsci.jobdirdlg module

A dialog for obtaining a job directory of a previously submitted job

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.matsci.jobdirdlg.NewJobDirFrame(master, layout=None, dclick_callback=None)

Bases: schrodinger.ui.qt.swidgets.SFrame

A collection of widgets that reads in the JobDB and puts jobs in a table that can be selected. It also allows the user to specify a job directory manually.

reset(load_jobs=True)

Reset the entire frame

Parameters:load_jobs (bool) – Whether the job database should be loaded back into the table after reset
resetTable()

Remove all rows from the table

setAllowedPrograms(programs)

Set the programs whose jobs are allowed to show up in the table

Parameters:programs (set) – The strings that show up in the job.Program field for programs whose jobs should show in the dialog. Use None to show all jobs.
readJobsFromDatabase()

Read the jobs from the JobDB database

Return type:list, list
Returns:Two lists. The first contains the completed jobs, the second currently running jobs. All list items are schrodinger.job.jobcontrol.Job objects and the lists are sorted so that the newest jobs appear first
loadJobs()

Load in all the desired jobs from the job database

loadToggled()

Whether to load from the job table or a manual directory has been toggled - react to that

getCurrentJobDir()

Get the currently selected job directory and the associated job if applicable

Return type:(str, schrodinger.job.jobcontrol.Job or (str, None) or (None, None)
Returns:The path to the selected job directory and if possible, the associated Job object. If the user specified a job directory manually, the Job object will be None. If no job directory has been specified, the return value is (None, None)
browseDirectory()

Allow the user to browse to a new directory via file dialog

setWaitCursor(app_wide=True)

Set the cursor to the wait cursor. This will be an hourglass, clock or similar. Call restoreCursor() to return to the default cursor. If ‘app_wide’ is True then it will apply to the entire application (including Maestro if running there). If it’s False then it will apply only to this panel.

Added for the wait_cursor decorator

restoreCursor(app_wide=True)

Restore the application level cursor to the default. If ‘app_wide’ is True then if will be restored for the entire application, if it’s False, it will be just for this panel.

Added for the wait_cursor decorator

class schrodinger.application.matsci.jobdirdlg.NewJobDirDialog(master, user_accept_function=None, standard_buttons=None, nonstandard_buttons=None, help_topic='', title=None)

Bases: schrodinger.ui.qt.swidgets.SDialog

SDialog to allow the user to read in information for a new job. Should be created with the user_accept_function parameter set to a function that accepts (path, job=job) api, where path is the path to the job directory and job is a Job object if available.

layOut()

Lay out the widgets for the dialog

We use a wait cursor because searching the job database may take a few seconds (or more)

setAllowedPrograms(programs)

Set the programs whose jobs are allowed to show up in the table

Parameters:programs (set) – The strings that show up in the job.Program field for programs whose jobs should show in the dialog. Use None to show all jobs.
accept()

The user has pressed the Accept button. Call the user_accept_function with the chosen job information.