schrodinger.tasks.ldi module

class schrodinger.tasks.ldi.InputColumn(param: Param)

Bases: object

Class representing a column of input data for a LiveDesign model. The data in the column is read from a file provided by LiveDesign. The data is parsed and then used to populate a parameter in a task’s InputItem.

Variables:

param – The input item subparam to which this column maps.

param: Param
setInputFile(filename: str) None

Set the input file from which to read data.

populateInputItem(item: CompoundParam, row_idx: int)
getArgName()
__init__(param: Param) None
class schrodinger.tasks.ldi.SdfColumn(param: Param)

Bases: InputColumn

An input column for structure data in SDF format.

populateInputItem(item: CompoundParam, row_idx: int)
__init__(param: Param) None
class schrodinger.tasks.ldi.CsvColumn(param: Param, required: bool = False)

Bases: InputColumn

Abstract base class for input columns that read data from a CSV file. Each CSV file contains a Corporate ID column and a Data column that must be parsed according to the type of data in the column.

Variables:

required – Whether this column is required as input in the LD model.

required: bool = False
__init__(param: Param, required: bool = False) None
class schrodinger.tasks.ldi.DataColumn(param: Param, required: bool = False)

Bases: CsvColumn

A CsvColumn with 2 total columns: Corporate ID and data. This column must map to a single parameter in the task’s InputItem. The data can be parsed with a custom casting function.

Variables:

casting_func – A callable that converts a string to the appropriate data type.

populateInputItem(item: CompoundParam, row_idx: int)

Cast the data to the appropriate type and set the parameter value in the input item.

__init__(param: Param, required: bool = False) None
class schrodinger.tasks.ldi.PoseColumn(required: bool = False, protein_param: Param = None, ligand_param: Param = None)

Bases: CsvColumn

A CsvColumn with 3 total columns: Corporate ID, protein, and ligand. This column can map to 1 or 2 parameters in the task’s InputItem.

Note: it’s possible for this CSV file to be missing protein or ligand values for a given row.

protein_param: Param = None
ligand_param: Param = None
param: Param = None
populateInputItem(item: CompoundParam, row_idx: int)
getArgName()
__init__(required: bool = False, protein_param: Param = None, ligand_param: Param = None) None
class schrodinger.tasks.ldi.LDI

Bases: TaskCLI

__init__()
mapInputColumns() list[InputColumn]

Return input columns to map to parameters in the task’s InputItem. Any entity columns (e.g. SdfColumn) and pose columns must be returned by this method to properly map input data to the task’s InputItem.

Any InputItem parameters that aren’t mapped in this method will be automatically mapped by the framework.

main(argv: list[str] = None) int

This method serves as the main function, and will be added to the module’s namespace as main. Implement mainFunction to define the execution behavior of the CLI.

makeJobSpecBuilder()

Make the job spec args builder from the given task and args. Override this method in a subclass to customize the job spec builder.

customizeParamArgs()

A param arg is a parser argument that corresponds to a param in the self.ParamClass. See customizeParser for adding non-param args.

The following methods can be called from this method to customize param args:

updateParamArg skipParamArg flattenParamArgs

customizeParser(parser: ArgumentParser) None

Use this method to add additional arguments that do not correspond directly to any param in self.ParamClass. If custom arguments are added, override customProcessParsedArgs to consume the values of these custom arguments after they have been parsed.

customProcessParsedArgs(task: AbstractTask, namespace: Namespace) None

Process the parsed namespace to populate the param instance with desired values.