schrodinger.application.matsci.configdlgs module

Module for config dialog classes used by MatSci panels

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.matsci.configdlgs.PerStrucConfigDialog(parent, title='', jobname='', checkcommand=None, multi_gpgpu_allowed=True, no_cpu=True, **kw)

Bases: schrodinger.application.desmond.gui.DesmondGuiConfigDialog

Dialog for configuring jobs that can have CPUs/GPUs per input structure specified.

CPU_UNIT_LABEL = 'processors per structure'
GPU_UNIT_LABEL = 'GPUs per structure'
class schrodinger.application.matsci.configdlgs.PerStrucSingleGpuConfigDialog(*args, **kwargs)

Bases: schrodinger.application.desmond.gui.SingleGpuDesmondGuiConfigDialog

Class to configure jobs that can use a single GPU per input structure.

CPU_UNIT_LABEL = 'processors per structure'
GPU_UNIT_LABEL = 'GPUs per structure'
class schrodinger.application.matsci.configdlgs.PerStructDesmondSubhostConfigDialog(*arg, gpu_num=None, cpu_num=None, sim_jobnum=None, sim_job_sb=None, has_subjobs_func=None, **kwargs)

Bases: schrodinger.application.desmond.fep_dialog.FEPConfigDialog

Subclass fep_dialog.FEPConfigDialog dialog, and customize it for panels that run multiple desmond subjobs.

MAX_SUBJOBS_LABEL_TEXT = 'Maximum simultaneous subjobs:'
__init__(*arg, gpu_num=None, cpu_num=None, sim_jobnum=None, sim_job_sb=None, has_subjobs_func=None, **kwargs)

See parent class for additional documentation string.

Parameters
  • gpu_num (int) – Fix the gpu processor number per subjob, if provided.

  • cpu_num (int) – Fix the cpu processor number per subjob, if provided.

  • sim_jobnum (int) – The default simultaneous subjob number.

  • sim_job_sb (str) – the attribute name of the parent to define the number of simultaneous subjob.

  • has_subjobs_func – Function that takes no arguments and returns a boolean indicating whether subjobs will be run. If not supplied, validation will always assume subjobs are run.

Type

callable

updateMaxjobsDefault()

Overwrite the parent class method to set the upper limit of max simultaneous subjobs.

validateSubHost()

Overwritten the parent method.

validate()

Overwritten the parent method to allow cpu hosts for master jobs.

class schrodinger.application.matsci.configdlgs.ConfigDialogWithPlatformValidation(*args, compatible_platforms=(), platform_warning='', **kwargs)

Bases: schrodinger.ui.qt.config_dialog.ConfigDialog

Adds a platform check to ConfigDialog for localhost jobs.

__init__(*args, compatible_platforms=(), platform_warning='', **kwargs)
Parameters
  • compatible_platforms (tuple) – Compatible platforms for the job. Use platform module’s LINUX, WINDOWS or DARWIN as values for platforms.

  • platform_warning (str) – The warning to be displayed if the platform is incompatible.

validateHost(host)

Validates whether or not a launch host is valid for the job. Currently only validates localhost.

Parameters

host (schrodinger.job.jobcontrol.Host object) – Launch host to validate

Return type

bool

Returns

True if the selected host is valid for the job, False otherwise.

validate()

Checks the panel to make sure settings are valid. Return False if any validation test fails, otherwise return True.

Return type

bool

Returns

True if all checks pass, False otherwise

class schrodinger.application.matsci.configdlgs.ThreadsAndMaxSubjobsConfigDialog(parent, title='', jobname='', checkcommand=None, help_topic='MM_TOPIC_JOB_START_DIALOG', **kw)

Bases: schrodinger.ui.qt.config_dialog.ConfigDialog

Manage a config dialog that only exposes the number of threads and maximum number of simultaneous subjobs.

class schrodinger.application.matsci.configdlgs.ThreadOnlyConfigDialog(parent, title='', jobname='', checkcommand=None, help_topic='MM_TOPIC_JOB_START_DIALOG', **kw)

Bases: schrodinger.application.matsci.configdlgs.ThreadsAndMaxSubjobsConfigDialog

Manage a config dialog that only exposes the number of threads and locks the number of simultaneous subjobs at one.

class schrodinger.application.matsci.configdlgs.MaxSubjobsConfigDialog(max_subjobs, *args, **kwargs)

Bases: schrodinger.application.matsci.configdlgs.ThreadsAndMaxSubjobsConfigDialog

Manage a config dialog with a maximum number of simultaneous subjobs.

__init__(max_subjobs, *args, **kwargs)
Parameters

max_subjobs (int) – the maximum number of simultaneous subjobs

class schrodinger.application.matsci.configdlgs.DesmondSubhostConfigDialog(*args, multiple_gpus=False, **kwargs)

Bases: schrodinger.ui.qt.config_dialog.ConfigDialog

Custom job config dialog that launches using Launch API and supports subhost.

DRIVER_HOST = 'Driver/GPU host'
GPU_SUBHOST = 'GPU subhost'
__init__(*args, multiple_gpus=False, **kwargs)

Initialize the dialog. Set host products.

Parameters

multiple_gpus (bool) – Whether to allow multiple GPUs

setLaunchParams(job_spec, launch_params)

Set launch parameters from config dialog settings. See parent for docs.

useSubhost()

Check if subhost is needed.

Return type

bool

Returns

Whether subhost is needed. In this particular case, if driver host is GPU, subhost is not needed.

getLicHost()

Get license host.

Return type

str or None

Returns

If driver host is GPU, all the jobs will run there, need to request license for it. Otherwise return None

getNumGPUS()

Get number of GPUs. Only makes sense when multiple GPUs is allowed.

Return type

None or int

Returns

Number of GPUs requested, None if multiple GPUs hasn’t been requested