Package schrodinger :: Package application :: Package matsci :: Module jaguarworkflows :: Class Step
[hide private]
[frames] | no frames]

Class Step

object --+
         |
        Step
Known Subclasses:

Manages the start, monitoring and finish of a single step in a workflow

Instance Methods [hide private]
 
__init__(self, workflow, parent=None, optimization=True, charge=0, multiplicity=1, property_name=None, step_name='', job_name='', kcal=True, solvent=None, keystring='', serial_only=False, keep_jag_restart=True, need_spm=False)
Create a Step object
 
log(self, msg, prefix=True, level=20)
Add a message to the parent workflow's log file
 
setKeywords(self, input, keystring)
Set the keywords for this job
schrodinger.structure.Structure
getStructure(self)
Get the starting structure for this step
None or jaguar_input.JaguarInput
getInput(self, override_uhf=True, override_solvent=True)
Get the JaguarInput object for this step, setting the keywords as required.
bool
canStart(self)
Check to see if this job can start - if the parent job has finished successfully.
 
writeInput(self)
Write the input file for the step
schrodinger.job.jobcontrol.Job object
createJob(self)
Submit a jaguar job under job control
 
start(self)
Start the job - create the input and write it, adding necessary output files to make sure they get copied back
bool
calcsDone(self)
Check to see if the calculation finished successfully
None or JaguarOutput
getOutput(self, quiet=False)
Read in the results of the calculation
 
finishProcessingJobControlJob(self)
Finish processing the job control job object before we release our handle to it
 
finish(self)
Do any work required to create properties when the calculation has finished.
 
write(self, writer, props=None)
Add the final structure for this step to the output structure file

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, workflow, parent=None, optimization=True, charge=0, multiplicity=1, property_name=None, step_name='', job_name='', kcal=True, solvent=None, keystring='', serial_only=False, keep_jag_restart=True, need_spm=False)
(Constructor)

 

Create a Step object

Parameters:
  • workflow (Workflow) - The workflow that owns this step
  • parent (Step) - The parent job that must finish successfully before this job can start
  • optimization (bool) - True if this step should optimize the geometry, False if not
  • charge (int) - The molecular charge for this step
  • multiplicity (int) - The spin multiplicity for this step
  • property_name (str) - The name of the property this step should create when finished, None if no property will be created
  • step_name (str) - The user-readable name of this step to use in messages
  • job_name (str) - The base name of the file.
  • kcal (bool) - True if the property should be in kcal/mol, False if not
  • solvent (dict) - Dictionary of keyword/value pairs for solvent keywords. If not given, a gas phase calculation will be run
  • keystring (str) - Space separated keyword=value pairs. Each pair must contain an equals sign
  • serial_only (bool) - If True, do not use any parallel options when running Jaguar
  • keep_jag_restart (bool) - If True, add .01.in files Jaguar restart files to the backend (that will get them copied to the original folder)
  • need_spm (bool) - If True, add Jaguar spm file to the backend (that will get them copied to the original folder)
Overrides: object.__init__

log(self, msg, prefix=True, level=20)

 

Add a message to the parent workflow's log file

Parameters:
  • msg (str) - The message to add
  • prefix (bool) - Whether to add information about the workflow and step name to the front of the message string
  • level (int) - A logging constant indicating the priority level of the message

setKeywords(self, input, keystring)

 

Set the keywords for this job

Parameters:
  • input (jaguar_input.JaguarInput) - The JaguarInput object to set the keywords on
  • keystring (str) - Space separated keyword=value pairs. Each pair must contain an equals sign

getStructure(self)

 

Get the starting structure for this step

Returns: schrodinger.structure.Structure
The starting structure for this step

getInput(self, override_uhf=True, override_solvent=True)

 

Get the JaguarInput object for this step, setting the keywords as required.

Returns: None or jaguar_input.JaguarInput
None if an error occured, or the jaguar_input.JaguarInput object to use for this step

canStart(self)

 

Check to see if this job can start - if the parent job has finished successfully.

Returns: bool
True if the job can start, False if not

createJob(self)

 

Submit a jaguar job under job control

Parameters:
Returns: schrodinger.job.jobcontrol.Job object
The Job object for the launched job

calcsDone(self)

 

Check to see if the calculation finished successfully

Returns: bool
True if the calculation finished and was successful, False if not

getOutput(self, quiet=False)

 

Read in the results of the calculation

Parameters:
  • quiet (bool) - If True, no error messages will be printed. If False, (default) error messages will be printed. Also, if True, self.ok will not be set to False if the output file cannot be read.
Returns: None or JaguarOutput
None if the calculation failed, or JaguarOutput object for successful calculations.

finish(self)

 

Do any work required to create properties when the calculation has finished.

If property_name was provided to the constructor, this computes the energy difference between this step and the parent step and stores it in the property name.

write(self, writer, props=None)

 

Add the final structure for this step to the output structure file

Parameters:
  • writer (schrodinger.StructureWriter) - The writer to use to write the structure
  • props (dict) - A dictionary of property/value pairs to add to the property dictionary of this object.