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)¶ 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='[]')¶ Bases:
object-
__init__(input_file, options='[]')¶ Parameters: - input_file (str) – Input file name.
- options (str) – Ligprep command line options (in JSON format).
Raises: RuntimeError – If something goes wrong.
-
close()¶
-
prepareStructure(ct)¶ Applies ligprep to
ct.Returns: (outcomes, failures, summary) tuple Return type: (list(structure.Structure), list(structure.Structure), dict)
-
yieldStructures(text=False)¶ Reads consecutive entries from the input file, applies LigPrep and yields resulting structures. Optionally also yields input text from which the structures were obtained. TODO: support “strip” – minimize text size, like keep only the SMILES itself.
-
-
schrodinger.application.phase.packages.shape_ligprep.add_ligprep_arguments(parser)¶ Registers ligprep-specific options.
Parameters: parser ( argparse.ArgumentParser) – Command line argument parser.
-
schrodinger.application.phase.packages.shape_ligprep.validate_ligprep_arguments(args)¶ Validates ligprep-specific command line options.
Parameters: args ( argparse.Namespace) – Populatedargparse.Namespaceinstance.Returns: Tuple of validation success, and error message. Return type: bool, str
-
schrodinger.application.phase.packages.shape_ligprep.validate_ligprep_options(text)¶ 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