Package schrodinger :: Package application :: Package jaguar :: Module utils
[hide private]
[frames] | no frames]

Module utils

Jaguar utility functions.

Copyright Schrodinger, LLC. All rights reserved.

Functions [hide private]
 
get_pybatch_optparser(usage=None)
Return a SingleDashOptionParser that already has the standard python batch command-line options added.
 
add_subjob_files(jobbe, job_id, subdir=None)
Add output and log files from a subjob to a job's record.
str
get_stoichiometry_string(atom_list)
Take atom list and return stoichiometry string.
list
_get_atom_elements(jag_input)
This function returns list of elements for atoms stored in a given JaguarInput object.
tuple
_get_atoms_and_charge(inputs)
This function iterates over the list of given JaguarInput objects and creates a list of all atom element names as well as total charge.
str or None
validate_stoichiometry(reactants, products)
This function validates stoichiometry for a reaction defined by the list of reactants and products.
Variables [hide private]
  __package__ = 'schrodinger.application.jaguar'
Function Details [hide private]

add_subjob_files(jobbe, job_id, subdir=None)

 

Add output and log files from a subjob to a job's record.

Parameters:
  • jobbe (schrodinger.job.jobcontrol._Backend) - The Backend object for the current job.
  • job_id (str) - The subjob Job ID.
  • subdir (str)

get_stoichiometry_string(atom_list)

 

Take atom list and return stoichiometry string. For example, atom_list = ['H', 'H', 'O'] yields stoichimetry string = 'H2O'.

Parameters:
  • atom_list (list) - list of strings
Returns: str
stoichiometry string

_get_atom_elements(jag_input)

 

This function returns list of elements for atoms stored in a given JaguarInput object. This function is only used when calling validate_stoichiometry function.

Returns: list
list of atom elements

_get_atoms_and_charge(inputs)

 

This function iterates over the list of given JaguarInput objects and creates a list of all atom element names as well as total charge. This function is only used when calling validate_stoichiometry function.

Returns: tuple
tuple that contains list of atom elements and total charge

validate_stoichiometry(reactants, products)

 

This function validates stoichiometry for a reaction defined by the list of reactants and products. If stoichiometry is not valid this function return text string explaining what was wrong. In case of valid stoichiometry returns None.

Parameters:
  • reactants (list) - list of JaguarInput objects for reactants
  • products (list) - list of JaguarInput objects products
Returns: str or None
string with warning message or None