schrodinger.application.jaguar.autots_input module¶
Functions and classes for defining the input to a AutoTS workflow.
- schrodinger.application.jaguar.autots_input.read_mae_files(fhlist: List[str], clean_st: bool, fileonly: bool = False, reset_bonding: bool = True) Union[List[schrodinger.structure._structure.Structure], List[str]] ¶
Process a list of mae files and return extant file paths or associated Structure instances if requested.
- Parameters
fhlist – list of filehandles
clean_st – if True, cleanup structure file by removing dummy atoms, etc.
fileonly – if True, return only file paths, else Structures.
reset_bonding – if True and clean_st is True, redefine bonding using mmjag.
- Returns
Structures or file paths.
- class schrodinger.application.jaguar.autots_input.AutoTSInput(inputfile: Optional[str] = None, keywords: Optional[dict] = None, jaguar_keywords: Optional[dict] = None, jobname: Optional[str] = None, add_autots_jaguar_defaults: bool = False)¶
Bases:
schrodinger.application.jaguar.workflow_input.WorkflowInput
A class to completely specify a AutoTS calculation.
Example usage:
input = AutoTSInput() # Set user-defined values input.setValue('integerKW', 3) input.setValue('floatKW', '7.0') input.setValue('stringKW', 'foo') # Print all keyword/value pairs. for keyword in input: print "keyword '%s' has value %s" % (keyword, input[keyword]) # Handling the case of trying to set an unsupported keyword try: input['mykeyword'] = 'value' except WorkflowKeywordException as e: print e.allowed_keywords
- input_file_keys = ['reactant', 'product', 'reactant_complex', 'product_complex', 'template_database_file', 'full_path_file', 'full_path_separated', 'conf_search_file', 'spectators', 'graft_structures']¶
- workflow_name = 'AutoTS'¶
- __init__(inputfile: Optional[str] = None, keywords: Optional[dict] = None, jaguar_keywords: Optional[dict] = None, jobname: Optional[str] = None, add_autots_jaguar_defaults: bool = False)¶
Create a AutoTSInput instance. If a keyword is specified in both ‘inputfile’ and ‘keywords’, then the values in ‘keywords’ will be set preferrentially. This also applies to ‘jaguar_keywords’.
- Parameters
inputfile – Path to a AutoTS input file
keywords – AutoTS keyword/value pairs
jaguar_keywords – Jaguar &gen section keyword/value pairs
jobname – Name of job, if it is not None it will be set to the basename of the input file name.
add_autots_jaguar_defaults – if True add some custom Jaguar defaults
- property reaction_smarts: str¶
Reaction smarts identifying input reaction
- static generate_keywords() dict ¶
Initialize dictionary of all possible AutoTS keywords
- setJaguarValues(keywords: dict)¶
Set multiple Jaguar &gen section keywords.
- Parameters
keywords – Jaguar &gen section keyword/value pairs
- updateJaguarUserKeywords(keywords: dict)¶
Update the Jaguar &gen section keywords of the user-defined settings only if previous settings exist.
- Parameters
keywords (dict of string/anytype pairs) – Jaguar &gen section keyword/value pairs
- getReactants(fileonly: bool = False, clean_st: bool = False, reset_bonding: bool = True) Union[List[schrodinger.structure._structure.Structure], List[str]] ¶
Return list of reactants. If no file(s) found, return empty list.
- Parameters
fileonly – if True, return only file paths, else Structures.
clean_st – if True redefine bonding using mmlewis.
reset_bonding – if True and clean_st is True, redefine bonding using mmjag.
- Returns
reactant Structures or file paths.
- getProducts(fileonly: bool = False, clean_st: bool = False, reset_bonding: bool = True) Union[List[schrodinger.structure._structure.Structure], List[str]] ¶
Return list of products. If no file(s) found, return empty list.
- Parameters
fileonly – if True, return only file paths, else Structures.
clean_st – if True redefine bonding using mmlewis.
reset_bonding – if True and clean_st is True, redefine bonding using mmjag.
- Returns
product Structures or file paths.
- getReactantComplex(clean_st: bool = False, reset_bonding: bool = True) Optional[schrodinger.structure._structure.Structure] ¶
Return Reactant Complex. If no file found, return NoneType.
- Parameters
clean_st – if True redefine bonding using mmlewis.
reset_bonding – if True and clean_st is True, redefine bonding using mmjag.
- Returns
Reactant Complex Structures or file path.
- getProductComplex(clean_st: bool = False, reset_bonding: bool = True) Optional[schrodinger.structure._structure.Structure] ¶
Return Product Complex. If no file found, return NoneType.
- Parameters
clean_st – if True redefine bonding using mmlewis.
reset_bonding – if True and clean_st is True, redefine bonding using mmjag.
- Returns
Product Complex Structures or file path.
- getSpectators(clean_st: bool = False) Optional[List[schrodinger.structure._structure.Structure]] ¶
Return spectator. If no file found, return NoneType.
- Parameters
clean_st – if True redefine bonding using mmlewis.
- Returns
Reactant Complex Structures or file path.
- validate()¶
Perform a self-consistency check of all currently set keywords.
:raise WorkflowKeywordConflictError if conflicting values found :raise WorkflowConservationError if matter not conserved
- validate_jaguar_keywords(strs)¶
Perform a check to ensure that Jaguar keywords are not set that AutoTS cannot handle.
- setConstants()¶
Set any constants defined by keywords
- read(inputfile: str)¶
Read an existing AutoTS input file. Any keywords specified in the input file will override existing values in this AutoTSInput instance.
Jaguar &gen section keywords are defined like:
&JaguarKeywords key=val key=val ... &
Constraints can be defined with:
&Constraints st_title atom_index1 atom_index2... value &
- Parameters
inputfile – Path to a AutoTS input file
- set_default_template_file()¶
If the default template file is not set and the keyword use_default_templates is True and that file exists, set the template file to the default one.
- schrodinger.application.jaguar.autots_input.users_default_template_filename() str ¶
Returns the name of the users template file that should be found in .schrodinger/autots_templates. The file may or may not exist.