schrodinger.application.transforms.ligprep module

class schrodinger.application.transforms.ligprep.LigPrepConfig(*, arg_string: str = '', filter_string: str = '', filter_path: Optional[Path] = None)

Bases: BaseModel

arg_string: str
filter_string: str
filter_path: Optional[Path]
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

validate_filter() Self
class schrodinger.application.transforms.ligprep.LigPrep(**kwargs)

Bases: PTransformWithConfig

A PTransform that ligpreps molecules.

Example usage::
>>> from rdkit import Chem
>>> benzene = Chem.MolFromSmiles('c1ccccc1')
>>> with beam.Pipeline() as p:
...     ligprepped_benzene = (p
...         | beam.Create([benzene])
...         | LigPrep()
...         | beam.Map(adapter.to_smiles)
...         | beam.LogElements())
c1ccccc1
Parameters:
  • arg_string – command line arguments to pass to ligprep, e.g. ‘-nt’, or ‘-nt -bff 16 -epik -s 32’.

  • filter_string – optional filter string to pass to ligprep.

  • filter_path – optional filter file path to pass to ligprep.

Note: Only filter_string or filter_path may be defined. The filter_string is a single string, so if multiple filters are needed they need to be separated by “n”.

config_class

alias of LigPrepConfig

class schrodinger.application.transforms.ligprep.LigPrepDoFn(config: LigPrepConfig)

Bases: _GetProductsHintsMixin, LigPrepDoFn

schrodinger.application.transforms.ligprep.validate_opls_license(arg_string: str) None

Check if the FFLD_OPLS_MAIN license is available if a opls version > 14 is specified in the command line arguments.

Parameters:

arg_string – command line arguments to pass to ligprep,

schrodinger.application.transforms.ligprep.remove_bff(arg_string: str) str

Remove the -bff argument from the command line arguments.

Parameters:

arg_string – command line arguments to pass to ligprep,

Returns:

the command line arguments without the -bff argument.

schrodinger.application.transforms.ligprep.validate_arg_string(arg_string: str)