Package schrodinger :: Package pipeline :: Module pipeutils
[hide private]
[frames] | no frames]

Module pipeutils

Shared functions for Pipeline stages.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  BackwardsReader
Read a file line by line, backwards.
  DotPrinter
Class for printing a progress period or percentage every N number of iterations.
Functions [hide private]
 
countRoots(ligfiles, unique_field='s_m_title')
Counts the nunber of compounds in the supplied files.
 
get_last_20_lines(logfile)
Given a log file, returns a string of last 20 lines of it.
 
read_unique_field(st, uniquefield)
Returns the value of the specified property for the specified st (converted to string).
 
get_reader(filename, astext=False, sd_for_unknown=True, support_smi=True, ignore_errors=False)
Return a StructureReader object for reading the file; based on the file type.
Variables [hide private]
  __doc__ = ...
  __package__ = 'schrodinger.pipeline'
Function Details [hide private]

countRoots(ligfiles, unique_field='s_m_title')

 

Counts the nunber of compounds in the supplied files. Compounds are identified by the 'unique_field' property, and all structures that share the same 'unique_field' value are considered variants of the compound. Raises a RuntimeError if there is a problem reading a ligand file or if the 'unique_field' property is missing. Returns a tuple of the total number of structures (i.e., variants) and the total number of compounds.

read_unique_field(st, uniquefield)

 

Returns the value of the specified property for the specified st (converted to string). If the property does not exist, attempts to read the same property of different type (string/int/float).

If neither is avaible, re-raises the missing property exception.

get_reader(filename, astext=False, sd_for_unknown=True, support_smi=True, ignore_errors=False)

 

Return a StructureReader object for reading the file; based on the file type.

Parameters:
  • astext (bool) - Returns a MaestroTextReader instance if specified file is a Maestro file and astext is True.
  • sd_for_unknown - Whether to open files with unknown extensions as SD.
  • support_smi (bool) - Whether to support SMILES and SMILESCSV formats.
  • ignore_errors (bool) - If True, unreadable structures will be skipped instead of raising an exception. Currently only used by the SD reader.
  • sd_for_unkown (bool)

Variables Details [hide private]

__doc__

Value:
"""
Shared functions for Pipeline stages.

Copyright Schrodinger, LLC. All rights reserved.

"""