schrodinger.application.transforms.ligprep module

class schrodinger.application.transforms.ligprep.LigandPrep(arg_string: str, filter_string: str)

Bases: apache_beam.transforms.ptransform.PTransform

A PTransform that returns ligand prepped molecules.

To be used with Mol or Structure PCollections.

NOTE:: If the input is a Mol PCollection, the Mol will first be converted to a Structure and then ligprep will be run on the Structure. The output will be a Mol PCollection. If any structures fail to convert to Mols, they will be dropped from the output.

__init__(arg_string: str, filter_string: str)
Parameters
  • arg_string – the command line arguments to pass to ligprep excluding the input and output arguments.

  • filter_string – the filter string which will be written to a temporary file and passed to ligprep.

Note: the filter_string is a single string, so if multiple filters are needed they need to be separated by “n”.

expand(pcoll: apache_beam.pvalue.PCollection[schrodinger.application.transforms.ligprep.T])
classmethod FromFile(path: Union[str, pathlib.Path], *, arg_string: str)
Parameters
  • path – the path to the ligprep filter file.

  • arg_string – the command line arguments to pass to ligprep excluding the input and output arguments.