schrodinger.application.transforms.dock module

class schrodinger.application.transforms.dock.Dock(grid_path: str | pathlib.Path, ref_ligand_path: Optional[Union[Path, str]] = None, in_path: Optional[Union[Path, str]] = None, poses_per_lig: int = 1, input_overrides: Optional[Dict] = None)

Bases: PTransform

A PTransform that docks structures and generates poses using Glide.

Parameters:
  • grid_path – The path to the grid file.

  • ref_ligand_path – (Optional) A path to a reference ligand file.

  • in_path – (Optional) A path to a glide input file.

  • poses_per_lig – (Optional) The number of poses to generate per ligand.

  • input_overrides – (Optional) A dictionary of input overrides.

Example usage:

>>> import apache_beam as beam
>>> from schrodinger.application.transforms.dock import Dock
>>> from schrodinger.seam.io import chemio
>>> from schrodinger.test import mmshare_data_file
>>> with beam.Pipeline() as p:
...     _ = (p
...          | chemio.ReadStructuresFromFile(mmshare_data_file('glide/factorXa.maegz'))
...          | Dock(grid_path=mmshare_data_file('glide/factorXa_grid.zip'),
...                 ref_ligand_path=mmshare_data_file('glide/factorXa_reference.maegz'),
...                 in_path=mmshare_data_file('glide/glide.in'),
...                 poses_per_lig=1)
...          | chemio.WriteStructuresToFile('output.maegz'))
__init__(grid_path: str | pathlib.Path, ref_ligand_path: Optional[Union[Path, str]] = None, in_path: Optional[Union[Path, str]] = None, poses_per_lig: int = 1, input_overrides: Optional[Dict] = None)
class schrodinger.application.transforms.dock.FilterUndockable(grid_path: Path, ref_ligand_path: Optional[Path] = None, in_path: Optional[Path] = None, input_overrides: Optional[Dict] = None)

Bases: PTransform

A PTransform that filters out any molecules that failed to dock with Glide.

Accepts either Mol or Structure PCollections and returns the same type.

Parameters:
  • grid_path – The path to the grid file.

  • ref_ligand_path – The path to the reference ligand file.

  • in_path – The path to the input file.

  • input_overrides – A dictionary of input overrides.

Example usage:

>>> import apache_beam as beam
>>> from rdkit import Chem
>>> from schrodinger.application.transforms.dock import Dock
>>> from schrodinger.seam.io import chemio
>>> from schrodinger.test import mmshare_data_file
>>> with beam.Pipeline() as p:
...     _ = (p
...          | beam.Create([Chem.MolFromSmiles('N(c1ccccc1)c1nc(-c2ccccc2)c2nc[nH]c2n1'),
...                 Chem.MolFromSmiles('COC(=O)CCc1c(C(=O)OC)[nH]c(C)c1C(=O)[O-]')])
...          | FilterUndockable(grid_path=mmshare_data_file('glide/factorXa_grid.zip'),
...                 ref_ligand_path=mmshare_data_file('glide/factorXa_reference.maegz'),
...                 in_path=mmshare_data_file('glide/glide.in'))
...          | chemio.WriteMolsToFile('output.smi'))
>>> # The output file will contain only the second molecule, as the first molecule failed to dock.
__init__(grid_path: Path, ref_ligand_path: Optional[Path] = None, in_path: Optional[Path] = None, input_overrides: Optional[Dict] = None)