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 ligpreps molecules.

Example usage:

>>> benzene = Chem.MolFromSmiles('c1ccccc1')
>>> with beam.Pipeline() as p:
...     ligprepped_benzene = (p
...         | beam.Create([benzene])
...         | LigandPrep()
...         | beam.Map(lambda mol: Chem.MolToSmiles(mol))
...         | beam.LogElements())
c1ccccc1

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.

Parameters
  • arg_string – command line arguments to pass to ligprep, e.g. ‘-nt’, or ‘-nt -bff 16 -epik -s 32’.

  • filter_string – a filter string to pass to ligprep.

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

__init__(arg_string: str = '', filter_string: str = '')
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.