Package schrodinger :: Package ui :: Module appframework :: Class StartDialog
[hide private]
[frames] | no frames]

Class StartDialog


Toplevel Tkinter widget that mimics the Maestro Start dialog.
Configuration options set via constructor keywords are...

    title -         Title for the dialog window.  Default is
                    '<parent_title> - Start'.
    command -       Function to call (not used?).
    jobname -       Initial string value for the job name EntryField.
                    Default is ''.
    incorporation - Display a disposition selector for Maestro
                    incorporation.  Maestro only.  Default is True.
    host -          Display an OptionMenu for selecting the host for
                    the job.  Default is True.
    localdriver -   Display a checkbutton for running driver job on the
                    localhost (Default is remote driver)
    remotedriver -  Display a checkbutton for running driver job on the
                    localhost (Default is local driver)
    
    jobentry -      Display widgets for setting the job name.
                    Default is True.
    cpus -          Display additional options for distributed jobs,
                    including the number of CPUs.  Default is False.
    njobs -         Display widgets for running the job as a specified
                    number of subjobs.  Default is False.
    tmpdir -        Show the tmpdir for the currently selected host.
                    Default is False.
    default_disp -  The default disposition, if 'incorporation' is True.
                    Must be 'Append new entries' or 'Do not incorporate'.
                    Default is 'Do not incorporate'.
    
    NOTE: localdriver and remotedriver options are mutually exclusive and
          if either feature is requested, commandLineOptions() method will
          append -LOCALDRIVER or -REMOTEDRIVER to the command list, 
          depending on whether the checkbutton is checked or not.
          

Job parameters passed out in the StartDialogParams object upon
the dialog deactivating with via a "Start" (not "Cancel") action...

    proj -    The Project from which the job is launched (required for
              incorporation).  "" if not in Maestro.
    disp -    Maestro disposition.  'append' or 'ignore' if
              'incorporation' is True.  "" if not in Maestro.  Undefined
              if in Maestro but 'incorporation' is False.
    jobname - Job name.  Undefined if 'jobentry' is False.
    host -    Main host.  Undefined if 'host' option is False.
    localdriver - Wheather to run driver on localhost. Undefined if
                    'localdriver' & 'remotedriver' options are False
    njobs -   Number of subjobs.  Undefined if 'njobs' option is False.
    cpus -    Number of CPUs.  Undefined if 'cpus' option is False.  Set
              to 'njobs' if the "Distribute subjobs over maximum..." is
              chosen, otherwise set to the number of specified CPUs.

Please see the DialogParameters class below for usage instructions.

Instance Methods [hide private]
 
__init__(self, parent, title="", jobname="", **kw)
See class docstring.
 
updateTmpDir(self, host)
Callback method for host option menu (self.hostMnu) Sets proper scratch directory options if scratch dir menu exists.
 
warning(self, text)
Display a warning window with the specified text.
 
execute(self, result)
Callback for the dialog.
 
getHosts(self, ncpus=True)
Returns list of host entries from appropriate schrodinger.hosts file, with parenthetical entry of the number of available processors (if 'ncpus' is True).
 
_stripProcs(self, host_entry)
Returns host name minus the parenthetical available processors entry
Method Details [hide private]

__init__(self, parent, title="", jobname="", **kw)
(Constructor)

 

See class docstring. Raises an Exception if the disposition specified as the default is not recognized.

execute(self, result)

 

Callback for the dialog. Take action based on the button pressed. If starting the job, deactivate with a StartDialogParams object that holds the job parameters.