Trees | Indices | Help |
|
---|
|
A group of functions and classes to help filtering structure files on unique SMILES strings.
Copyright Schrodinger, LLC. All rights reserved.
|
|||
FilterReporter A class to handle reporting of results from the remove_dupes function. |
|||
SmilesErrorHandler A class that acts as an error handler for cases where SMILES generation fails. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
_version = "$Revision: 1.20 $"
|
|||
_output_logger = log.get_output_logger("output.schrodinger.str
|
|
Process structures from the provided structure iterator 'struct_iterator' using the 'smiles_generator' to compute unique SMILES strings. Unique structures are passed to the 'put_unique' callback and duplicates to 'put_dupes' (if provided). Parameters smiles_generator (SmilesGenerator) struct_iterator (iterator return Structure objects) Any iterator returning Structure objects (such as a StructureReader) will work. put_unique (callable) put_dupes (callable) These functions will be called with (structure, SMILES string) arguments in the appropriate situation. error_handler (callable) A callable that takes (index, structure, exception) for cases where SMILES generation generates a RuntimeError. reporter (FilterReporter) If present, information will be logged. |
Calculate SMILES strings with 'smiles_generator' for each structure in 'struct_iterator'. Parameters smiles_generator (SmilesGenerator) struct_iterator (iterator return Structure objects) Any iterator returning Structure objects (such as a StructureReader) will work. put_output (callable) This function will be called with (structure, SMILES string) arguments when a SMILES string can be calculated. error_handler (callable) A callback function that takes (index, structure, exception) and is called in cases where SMILES generation generates a RuntimeError. |
Parse command-line options. Parameters args (list of str) This should be the list of arguments without any program name at the 0 index (e.g. pass in sys.argv[1:], not sys.argv). Like OptionParser.parse_args(), return a tuple of (options, arguments). (Here, options is an optparse.Values instance and arguments is a list of the remaining command-line arguments.) Raises SystemExit exception if the arguments are not good. |
Returns a function that takes a structure and a SMILES string. The created function sets the SMILES property and writes the structure to the mae file 'filename'. |
The main routine for filtering and SMILES generation. Parameters args (list of str) This should be the list of arguments without any program name at the 0 index (e.g. pass in sys.argv[1:], not sys.argv). Raises RuntimeError if a filename argument has an unrecognized extension (i.e., format). |
|
_output_logger
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Aug 6 04:50:20 2015 | http://epydoc.sourceforge.net |