schrodinger.application.hitexpander module

schrodinger.application.hitexpander.fp_types()

Returns a (sorted) list of the available fingerprint type names.

schrodinger.application.hitexpander.make_fp_generator_from_canvas_fpfile(filename)

Instantiates fingerprint generator from Canvas FP file.

Parameters

filename (string) – Canvas FP file name.

Returns

Fingerprint generator.

Return type

canvas.ChmFPOut32

schrodinger.application.hitexpander.is_phdb_path(path)
exception schrodinger.application.hitexpander.UnsupportedFormat

Bases: ValueError

__init__(*args, **kwargs)
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

schrodinger.application.hitexpander.count_ligands(path, isub='')
schrodinger.application.hitexpander.structure_file_reader(filename, logger=None, molids=None, keepsmiles=False)

Generator that yields (mol_id, st) tuples for the structures in the file identified by filename. The file can be in Maestro/SD/SMILES format.

Parameters
  • filename – File name.

  • logger (logging.Logger) – Logger for warnings.

  • molids (iterable over integers) – IDs (1-based indices) of the desired structures. None means “all”.

  • keepsmiles (bool) – Should SMILES text be converted into schrodinger.structure.Structure instances?

schrodinger.application.hitexpander.phdb_mol_reader(path, molids=None, isub='')

Generator that yields (mol_id, st) tuples for the ligands in the Phase DB.

Parameters
  • path (str) – Path to the Phase DB.

  • molids (iterable over integers) – IDs of the desired structures. None means “all”.

  • isub (str) – Subset file name (ENUM-285).

exception schrodinger.application.hitexpander.UnavailableFingerprintType

Bases: KeyError

__init__(*args, **kwargs)
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

schrodinger.application.hitexpander.phdb_fpreader(path, kind, molids=None, isub='')

Generator yielding (mol_id, fp) tuples for fingerprints of the desired kind for the molecules selected via molids (in order of sorted molids) from Phase DB pointed to by path.

Parameters
  • path (str) – Path to Phase DB.

  • kind – Name of the desired fingerprints type.

  • molids (iterable over int) – Identificators of the molecules for which fingerprints are to be loaded.

  • isub (str) – Subset file name (ENUM-285).

schrodinger.application.hitexpander.multifpfile_fpreader(path, kind, molids=None)

Generator yielding (mol_id, fp) tuples for fingerprints of the desired kind for the molecules selected via molids (in order of sorted molids) from multi-fingerprint file pointed to by path.

Parameters
  • path (str) – Path to the multi-fingerprint file.

  • kind – Name of the desired fingerprints type.

  • molids (int containment checkable or None) – Identificators of the molecules for which fingerprints are to be loaded.

schrodinger.application.hitexpander.structure_fpreader(path, kind, molids=None, logger=None)

Generator yielding (mol_id, fp) tuples for fingerprints of the desired kind for the molecules selected via molids (in order of sorted molids) from multi-fingerprint file pointed to by path.

Parameters
  • path (str) – Path to the multi-fingerprint file.

  • kind – Name of the desired fingerprints type.

  • molids (int containment checkable or None) – Identificators of the molecules for which fingerprints are to be loaded.

schrodinger.application.hitexpander.canvasfp_fpreader(path, molids=None, logger=None)

Generator yielding (mol_id, fp) tuples for fingerprints of the molecules selected via molids (in order of sorted molids) from Canvas FP file pointed to by path.

Parameters
  • path (str) – Path to the Canvas FP file.

  • molids (iterable over int) – Identificators of the molecules for which fingerprints are to be loaded.

schrodinger.application.hitexpander.check_fp_availability(path, kinds)

Check whether fingerprints of the desired type are available, raise exception if they are not.

Parameters
  • path (str) – Name of the structure/multi-fingerprint file or Phase DB.

  • kinds – Iterable over desired fingerprint kinds.

class schrodinger.application.hitexpander.LogFormatter

Bases: object

format(rec)
schrodinger.application.hitexpander.prog_for_argparse(scriptfile)

Returns strings like “$SCHRODINGER/run script.py”.

Parameters

scriptfile – Name of a script file.

Returns

String to be used to launch the script.

Return type

str

schrodinger.application.hitexpander.add_isub_option(parser)

Adds -isub option to the parser (ENUM-285).

Parameters

parser (argparse.ArgumentParser) – Command line argument parser.

schrodinger.application.hitexpander.massage_isub_option(parser, args)

Processes -isub option (ENUM-285).

Parameters
  • parser (argparse.ArgumentParser) – Command line argument parser.

  • args (argparse.Namespace) – Namespace holding command line arguments.