schrodinger.application.phase.packages.shape_ligprep module

Thin LigPrep wrapper and related subroutines (for PHASE-2070).

schrodinger.application.phase.packages.shape_ligprep.get_structure_file_format(filename)[source]

Much like fileutils.get_structure_file_format() except also allows for compressed SMILES and SMILESCSV.

class schrodinger.application.phase.packages.shape_ligprep.LigPrep(input_file, options='[]')[source]

Bases: object

__init__(input_file, options='[]')[source]
Parameters
  • input_file (str) – Input file name.

  • options (str) – Ligprep command line options (in JSON format).

Raises

RuntimeError – If something goes wrong.

close()[source]
prepareStructure(ct)[source]

Applies ligprep to ct.

Returns

(outcomes, failures, summary) tuple

Return type

(list(structure.Structure), list(structure.Structure), dict)

yieldStructures()[source]

Reads consecutive entries from the input file, applies LigPrep and yields resulting structures.

schrodinger.application.phase.packages.shape_ligprep.add_ligprep_arguments(parser)[source]

Registers ligprep-specific options.

Parameters

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

schrodinger.application.phase.packages.shape_ligprep.validate_ligprep_arguments(args)[source]

Validates ligprep-specific command line options.

Parameters

args (argparse.Namespace) – Populated argparse.Namespace instance.

Returns

Tuple of validation success, and error message.

Return type

bool, str

schrodinger.application.phase.packages.shape_ligprep.validate_ligprep_options(text)[source]

Validates ligprep-specific command-line arguments.

Parameters

text (str) – Ligprep options as list of strings in JSON format.

Returns

Tuple of validation success, and error message.

Return type

bool, str