schrodinger.application.jaguar.gui.timing module

Contains classes and widgets that provide a time estimate for Jaguar jobs

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.jaguar.gui.timing.TimingResults

Bases: object

Stores the results of a Jaguar timing calculation

SECONDS_PER_HOUR = 3600
NO_TIME = 'Unavailable'
class PER_ENTRY_DATA(title, time, cpus)

Bases: tuple

cpus

Alias for field number 2

time

Alias for field number 1

title

Alias for field number 0

__init__()

Create a TimingResults instance

setResults(total_time, entry_data, maxjobs, total_cpus)

Store the results of a successful timing calculation

This will erase any previously stored error.

Parameters
  • total_time (float) – The total time in hours

  • entry_data (list(PER_ENTRY_DATA)) – Data for each entry.

  • maxjobs (int) – The maximum number of simultaneous jobs

  • total_cpus – The total number of CPUs allowed

setError(error)

Record an error that occurred during the timing calculation.

Parameters

error (str) – The error that prevented timing from being calculated

This will erase any previously stored results.

reset()

Erase all stored data

formatTime(value)

Format the given time into a user-facing amount. The time will be an integer value with an associated unit. The time unit will be the highest unit with an associated non-zero value. For example - 0.01 -> 36 seconds 2.4 -> 2 hours 1000 -> 1 month

Parameters

value (float) – The time in hours

Return type

str

Returns

A user-facing time statement

perEntryData()

Generator for the time, cpus, and title for each entry

Return type

tuple(str, str, int)

Returns

Each iteration yields the title, user-facing time, and # of cpus for a structure

getTotalTime()

Get the total time in a user-facing string

Return type

str

Returns

The total time. NO_TIME is returned if no time is available (typically due to an error)

class schrodinger.application.jaguar.gui.timing.ArchPopUp(parent)

Bases: schrodinger.ui.qt.pop_up_widgets.PopUp

A popup QFrame that gives the reference computer architecture

setup()

Define the widgets for the popup

class schrodinger.application.jaguar.gui.timing.EntryTimingTable(results, layout)

Bases: schrodinger.ui.qt.swidgets.STableWidget

A table of timing results per entry

HEADER_TITLE = 'Entry Title'
HEADER_CPUS = '# CPUs'
HEADER_TIME = 'Est. Clock Time'
__init__(results, layout)

Create an EntryTimingTable instance

Parameters
  • results (TimingResults) – The results object to obtain data from

  • layout (QBoxLayout) – The layout to place this table in

refill()

Refill the table with the latest results

class schrodinger.application.jaguar.gui.timing.TimerInfoDialog(panel, results)

Bases: schrodinger.ui.qt.swidgets.SDialog

A dialog that gives the full timing information

JOBS_CPUS = 'Maximum number of jobs that will run simultaneously: {maxjobs}    Total # CPUs: {ncpus}'
TOTAL_TIME = 'Total estimated clock-time: {etime}'
__init__(panel, results)

Create a TimerInfoDialog instance

Parameters
  • panel (QWidget) – The parent widget for this dialog

  • results (TimingResults) – The results object to obtain data from

layOut()

Lay out the dialog widgets

showEvent(*args, **kwargs)

Make sure the latest data is displayed when the dialog opens

fillWithResults()

Fill in all the latest data

showConfigDialog()

Close this dialog and open the Job Settings dialog

class schrodinger.application.jaguar.gui.timing.TimerMixin

Bases: object

A mixin that provides job timing information on the input tab

TIME_TEXT = 'Estimated total time: '
TIMED_PROPERTIES = ['Vibrational frequencies', 'Raman spectroscopy', 'Vibrational circular dichroism']
setup()

Add the timing widgets and connect any widgets that will affect the timing estimate

timingEnabled()

Check the state of the feature flag that enables timing

Return type

bool

Returns

True if timing is enabled, False if not

showTimingDialog()

Show the timing information dialog

hookUpTiming()

Connect signals from all the widgets that impact timing

hookUpPropTableTiming(proptable)

Connect to changes to the properties tab table that impact timing

Parameters

proptable (QtWidgets.QTableWidget) – The properties table

checkPropTableForTiming(row, column)

Recalculate timing if a change in the Property table requires it

Parameters
  • row (int) – The row that changed

  • column (int) – The column that changed

checkCustomKeysForTiming()

Recalculate timing if the custom keyword edit changed and is valid

timingImpacted()

Something changed that possibly impacts the timing. If there is no current time-delay recalculation in effect, start a new one

generateJaguarInputForTiming(eid, struc, keywords, custom_keys)

Create a JaguarInput object from scratch with the current panel settings

Parameters
  • eid (str) – The entry id to create an input for

  • struc (schrodinger.Structure) – The structure for this entry

  • keywords (dict) – Standard keywords from the panel settings

  • custom_keys (dict) – Keywords from the custom keyword line edit

Return type

JaguarInput

Returns

The JaguarInput object for the given eid and settings

getInputsForTiming()

Get JaguarInput objects and titles for each entry

Return type

dict or None

Returns

Keys of the dict are JaguarInput objects, one for each entry. Values are the structure title for that object. None is returned if an error occurred.

computeTiming()

Compute and show the timing using the current panel settings

displayTiming()

Show the timing results in the panel

jagInputEdited(*args, **kwargs)

Override the parent method to recalculate timing if the user edits the input as they may have entered in relevant keywords

getConfigDialog()

Override the parent method so that each time a new config dialog is created, we hook up the relevant widgets to a time recalculation

connectConfigDialogToTimer(dlg)