schrodinger.job.launchparams module¶
-
class
schrodinger.job.launchparams.ProjectDisposition¶ Bases:
enum.EnumAn enumeration.
-
NONE= 'None'¶
-
APPEND= 'append'¶
-
APPEND_FIT= 'append:fit'¶
-
IGNORE= 'ignore'¶
-
CUSTOM= 'custom'¶
-
ADDTOENTRY= 'addtoentry'¶
-
APPENDINPLACE= 'appendinplace'¶
-
APPENDINPLACE_FIT= 'appendinplace:fit'¶
-
APPENDUNGROUPED= 'appendungrouped'¶
-
REPLACE= 'replace'¶
-
REPLACE_FIT= 'replace:fit'¶
-
WORKSPACE= 'workspace'¶
-
__class__¶ alias of
enum.EnumMeta
-
__members__= mappingproxy(OrderedDict([('NONE', <ProjectDisposition.NONE: 'None'>), ('APPEND', <ProjectDisposition.APPEND: 'append'>), ('APPEND_FIT', <ProjectDisposition.APPEND_FIT: 'append:fit'>), ('IGNORE', <ProjectDisposition.IGNORE: 'ignore'>), ('CUSTOM', <ProjectDisposition.CUSTOM: 'custom'>), ('ADDTOENTRY', <ProjectDisposition.ADDTOENTRY: 'addtoentry'>), ('APPENDINPLACE', <ProjectDisposition.APPENDINPLACE: 'appendinplace'>), ('APPENDINPLACE_FIT', <ProjectDisposition.APPENDINPLACE_FIT: 'appendinplace:fit'>), ('APPENDUNGROUPED', <ProjectDisposition.APPENDUNGROUPED: 'appendungrouped'>), ('REPLACE', <ProjectDisposition.REPLACE: 'replace'>), ('REPLACE_FIT', <ProjectDisposition.REPLACE_FIT: 'replace:fit'>), ('WORKSPACE', <ProjectDisposition.WORKSPACE: 'workspace'>)]))¶
-
__module__= 'schrodinger.job.launchparams'¶
-
-
class
schrodinger.job.launchparams.LaunchParameters¶ Bases:
objectThese are parameters that can change with each job launch.
-
__init__()¶ Initialize self. See help(type(self)) for accurate signature.
-
setDebugLevel(debug_level)¶ Parameters: save (bool) – if True, copy back full output directory as zip
-
getDebugLevel()¶ Returns debug level (integer)
-
setDeleteAfterIncorporation(delete)¶ Parameters: delete (bool) – if True, the directory the job was launched from is deleted after incporation
-
setSaveAllJobOutput(save)¶ Parameters: save (bool) – if True, copy back full output directory as zip
-
setLaunchDirectory(launch_directory)¶ Sets cwd for job launch. This avoids a chdir command before calling launch potentially allowing for more than one launch from maestro.
-
getLaunchDirectory()¶ Sets cwd for job launch. This avoids a chdir command before calling launch potentially allowing for more than one launch from maestro.
-
setHostname(hostname)¶ Hostname is the name of the host to run the job on. This name needs to correspond to something in schrodinger.hosts file or DNS-resolveable.
Parameters: hostname (str) – name of host
-
getHostname()¶ Returns hostname is the name of the host to run the job on. This name needs to correspond to something in schrodinger.hosts file or DNS-resolveable.
-
getJobname()¶ Return the jobname.
-
setJobname(jobname)¶ Jobname is a non mandatory variable that can be used to indicate name of job in job record.
Parameters: jobname (str) – name of job
-
getMaestroViewname()¶ Viewname is used by a maestro panel to identify a job as belonging to a panel.
Returns: viewname name of panel Return type: str
-
setMaestroViewname(viewname)¶ Viewname is used by a maestro panel to identify a job as belonging to a panel.
Parameters: viewname (str) – name of panel
-
getMaestroProjectDisposition()¶ :returns ProjectDisposition
-
getMaestroProjectDispositionString()¶ :returns str matching project disposition, appropriate for cmdline
-
setMaestroProjectDisposition(disp)¶ Mark the state of project incorporation.
Parameters: disp (ProjectDisposition) – should we incorporate?
-
getMaestroProjectName()¶ Returns associated project for a job, marking which project should do the incorporation of results.
Returns: path to project Return type: str
-
setMaestroProjectName(project)¶ Set associated project for a job, marking which project should do the incorporation of results.
Parameters: project (str) – path to project
-
setNumberOfProcessorsManyNodes(nprocessors)¶ Set number of processors to allocate to a job. These may be across multiple nodes. Used by MPI jobs to indicate how many processors the queuing system needs to allocate.
Parameters: nprocessors (int greater than 0) – number of processors requested for this job
-
setNumberOfSubjobs(nsubjobs)¶ Set number of subjobs that a job could run. This is used by workflow jobs to indicate that a driver job might run and use subjobs. This value is NOT used by the queueing system, but can be accessed from inside the job.
Parameters: nsubjobs – number of subjobs
-
getNumberOfProcessorsManyNodes()¶ Get number of processors to allocate to a job. Used by MPI jobs.
For example 4 processors = 4 nodes allocated by single jobs.
-
getNumberOfSubjobs()¶ Get number of subjobs that a job may run. This value is used by product backend (not jobcontrol).
In a workflow job, 4 process = 4 jobs running simultaneously.
-
setNumberOfProcessorsOneNode(nprocessors)¶ Set number of processors on one node. Useful for OpenMP-type jobs, indicates to the queueing system to allocate the requisite number of processors on the same node..
Parameters: nprocessors (int greater than 0) – number of processors requested for this job
-
getNumberOfProcessorsOneNode()¶ Return number of processors on one node. Useful for OpenMP-type jobs, indicates to the queueing system to allocate the requisite number of processors on the same node.
Returns: number of processors requested for this job Return type: int greater than 0
-
setDetached(detached)¶ Set job to run detached, keeping the files on the remote server until explicitly downloaded. Only valid if your launching host machine has serverhost: in schrodinger.hosts entry (and serverhost is configured correctly)
Parameters: detached (boolean) – allow running disconnected from network
-
getTPP()¶ Return the TPP option set by toplevel.py only.
-
setTPP(tpp)¶ Sets the TPP option on the cmdline. This will not be used by the parent job unless jobUsesTPP is set in the job specification.
-
setOPLSDir(oplsdir)¶
-
getNumberOfQueueSlots()¶ Return the number of slots we need to request for the queueing system. This value current maps to NPROC. If we don’t know how many, return None.
-
verify()¶
-
constructHostArg()¶
-
convertToJLaunchOptions()¶ Validate state of Launch Parameters (may throw RuntimeError) and return list of cmdline parameters.
Returns: list of str
-
convertToEnv()¶ Converts LaunchParameters to environment. Not all parameters are supported. This option should be limited to use by toplevel.py if possible.
-
consumeCommandLine(cmdline)¶ This consumes arguments from cmdline. The primary purpose is to consume arguments from toplevel $SCHRODINGER/run.
:returns cmdline with options filtered out.
-
__class__¶ alias of
builtins.type
-
__delattr__¶ Implement delattr(self, name).
-
__dict__= mappingproxy({'__module__': 'schrodinger.job.launchparams', '__doc__': '\n These are parameters that can change with each job launch.\n ', '__init__': <function LaunchParameters.__init__>, 'setDebugLevel': <function LaunchParameters.setDebugLevel>, 'getDebugLevel': <function LaunchParameters.getDebugLevel>, 'setDeleteAfterIncorporation': <function LaunchParameters.setDeleteAfterIncorporation>, 'setSaveAllJobOutput': <function LaunchParameters.setSaveAllJobOutput>, 'setLaunchDirectory': <function LaunchParameters.setLaunchDirectory>, 'getLaunchDirectory': <function LaunchParameters.getLaunchDirectory>, '_setOriginalHosts': <function LaunchParameters._setOriginalHosts>, '_setDriverHostname': <function LaunchParameters._setDriverHostname>, '_setSubHost': <function LaunchParameters._setSubHost>, 'setHostname': <function LaunchParameters.setHostname>, 'getHostname': <function LaunchParameters.getHostname>, 'getJobname': <function LaunchParameters.getJobname>, 'setJobname': <function LaunchParameters.setJobname>, 'getMaestroViewname': <function LaunchParameters.getMaestroViewname>, 'setMaestroViewname': <function LaunchParameters.setMaestroViewname>, 'getMaestroProjectDisposition': <function LaunchParameters.getMaestroProjectDisposition>, 'getMaestroProjectDispositionString': <function LaunchParameters.getMaestroProjectDispositionString>, 'setMaestroProjectDisposition': <function LaunchParameters.setMaestroProjectDisposition>, 'getMaestroProjectName': <function LaunchParameters.getMaestroProjectName>, 'setMaestroProjectName': <function LaunchParameters.setMaestroProjectName>, 'setNumberOfProcessorsManyNodes': <function LaunchParameters.setNumberOfProcessorsManyNodes>, 'setNumberOfSubjobs': <function LaunchParameters.setNumberOfSubjobs>, 'getNumberOfProcessorsManyNodes': <function LaunchParameters.getNumberOfProcessorsManyNodes>, 'getNumberOfSubjobs': <function LaunchParameters.getNumberOfSubjobs>, 'setNumberOfProcessorsOneNode': <function LaunchParameters.setNumberOfProcessorsOneNode>, 'getNumberOfProcessorsOneNode': <function LaunchParameters.getNumberOfProcessorsOneNode>, 'setDetached': <function LaunchParameters.setDetached>, 'getTPP': <function LaunchParameters.getTPP>, 'setTPP': <function LaunchParameters.setTPP>, 'setOPLSDir': <function LaunchParameters.setOPLSDir>, 'getNumberOfQueueSlots': <function LaunchParameters.getNumberOfQueueSlots>, 'verify': <function LaunchParameters.verify>, 'constructHostArg': <function LaunchParameters.constructHostArg>, 'convertToJLaunchOptions': <function LaunchParameters.convertToJLaunchOptions>, 'convertToEnv': <function LaunchParameters.convertToEnv>, 'consumeCommandLine': <function LaunchParameters.consumeCommandLine>, '__dict__': <attribute '__dict__' of 'LaunchParameters' objects>, '__weakref__': <attribute '__weakref__' of 'LaunchParameters' objects>})¶
-
__dir__() → list¶ default dir() implementation
-
__eq__¶ Return self==value.
-
__format__()¶ default object formatter
-
__ge__¶ Return self>=value.
-
__getattribute__¶ Return getattr(self, name).
-
__gt__¶ Return self>value.
-
__hash__¶ Return hash(self).
-
__init_subclass__()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__¶ Return self<=value.
-
__lt__¶ Return self<value.
-
__module__= 'schrodinger.job.launchparams'¶
-
__ne__¶ Return self!=value.
-
__new__()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__()¶ helper for pickle
-
__reduce_ex__()¶ helper for pickle
-
__repr__¶ Return repr(self).
-
__setattr__¶ Implement setattr(self, name, value).
-
__sizeof__() → int¶ size of object in memory, in bytes
-
__str__¶ Return str(self).
-
__subclasshook__()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__¶ list of weak references to the object (if defined)
-
-
exception
schrodinger.job.launchparams.ArgumentParserError¶ Bases:
Exception-
__cause__¶ exception cause
-
__class__¶ alias of
builtins.type
-
__context__¶ exception context
-
__delattr__¶ Implement delattr(self, name).
-
__dict__= mappingproxy({'__module__': 'schrodinger.job.launchparams', '__weakref__': <attribute '__weakref__' of 'ArgumentParserError' objects>, '__doc__': None})¶
-
__dir__() → list¶ default dir() implementation
-
__eq__¶ Return self==value.
-
__format__()¶ default object formatter
-
__ge__¶ Return self>=value.
-
__getattribute__¶ Return getattr(self, name).
-
__gt__¶ Return self>value.
-
__hash__¶ Return hash(self).
-
__init__¶ Initialize self. See help(type(self)) for accurate signature.
-
__init_subclass__()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__¶ Return self<=value.
-
__lt__¶ Return self<value.
-
__module__= 'schrodinger.job.launchparams'¶
-
__ne__¶ Return self!=value.
-
__new__()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__()¶ helper for pickle
-
__reduce_ex__()¶ helper for pickle
-
__repr__¶ Return repr(self).
-
__setattr__¶ Implement setattr(self, name, value).
-
__setstate__()¶
-
__sizeof__() → int¶ size of object in memory, in bytes
-
__str__¶ Return str(self).
-
__subclasshook__()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__suppress_context__¶
-
__traceback__¶
-
__weakref__¶ list of weak references to the object (if defined)
-
args¶
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-