schrodinger.application.transforms.glide module¶
Apache Beam transforms for running Glide docking.
- class schrodinger.application.transforms.glide.GlideDockingConfig(*, grid_file: Path, glide_in_file: Optional[Path] = None, precision: Optional[Literal['SP', 'HTVS', 'XP']] = None, poses_per_lig: int = 1, ref_ligand_file: Optional[Path] = None, glide_keywords: dict[str, Any] | None = None)¶
Bases:
BaseModelConfiguration for Glide docking transforms.
There are three ways to configure docking:
Use a glide.in file (recommended for complex setups):
config = GlideDockingConfig( grid_file="/path/to/grid.zip", glide_in_file="/path/to/glide.in" )
Use explicit fields for common options:
config = GlideDockingConfig( grid_file="/path/to/grid.zip", precision="SP", poses_per_lig=5 )
Use glide_keywords dict for any Glide keyword:
config = GlideDockingConfig( grid_file="/path/to/grid.zip", glide_keywords={"EXPANDED_SAMPLING": True} )
These can be combined - explicit fields and glide_keywords override values from glide_in_file.
- Parameters:
grid_file – Path to the Glide grid file (.zip).
glide_in_file – Path to a glide.in configuration file.
precision – Docking precision level.
poses_per_lig – Number of poses to generate per ligand.
ref_ligand_file – Path to reference ligand for core constraints.
glide_keywords – Additional Glide keywords (escape hatch).
- grid_file: Path¶
- glide_in_file: Optional[Path]¶
- precision: Optional[Literal['SP', 'HTVS', 'XP']]¶
- poses_per_lig: int¶
- ref_ligand_file: Optional[Path]¶
- glide_keywords: dict[str, Any] | None¶
- model_config: ClassVar[ConfigDict] = {'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- toKeywords() InputConfig¶
Convert config to Glide InputConfig keywords.
Merges configuration from glide_in_file, explicit fields, and glide_keywords dict in order of increasing priority.
- Returns:
InputConfig with all Glide keywords.
- class schrodinger.application.transforms.glide.GlideDockingResult(*, source_id: ~schrodinger.seam.io.sourceid.SourceID, input_structure: ~schrodinger.structure._structure.Structure, success: bool, poses: list[schrodinger.structure._structure.Structure] = <factory>, error_message: str | None = None)¶
Bases:
BaseModelResult of docking a single input structure with Glide.
- Parameters:
source_id – Source ID of the input structure for tracking.
input_structure – The input structure that was docked.
success – Whether docking succeeded (produced at least one pose).
poses – List of docked poses (empty if failed).
error_message – Error message if docking failed.
- success: bool¶
- error_message: str | None¶
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- class schrodinger.application.transforms.glide.RunGlideDocking(**kwargs)¶
Bases:
PTransformWithConfigRun Glide docking and yield a GlideDockingResult for each input structure.
This is the core transform that returns results for ALL inputs, including failures. Use this when you need to track which inputs succeeded or failed.
Example usage:
>>> with beam.Pipeline() as p: ... results = (p ... | chemio.ReadStructuresFromFile('ligands.maegz') ... | RunGlideDocking(grid_file='receptor.zip', precision='SP') ... | beam.Map(lambda r: (r.source_id, r.success, len(r.poses))))
- Parameters:
grid_file – Path to the Glide grid file (.zip).
glide_in_file – Path to a glide.in configuration file.
precision – Docking precision level (SP, HTVS, XP).
poses_per_lig – Number of poses per ligand (default 1).
ref_ligand_file – Path to reference ligand for core constraints.
glide_keywords – Additional Glide keywords.
See
GlideDockingConfigfor all available configuration options.- config_class¶
alias of
GlideDockingConfig
- class schrodinger.application.transforms.glide.Dock(**kwargs)¶
Bases:
PTransformWithConfigDock structures with Glide and yield the resulting poses.
This is a convenience wrapper that runs docking and yields only the successfully docked poses. Failed inputs are silently dropped.
Example usage:
>>> from schrodinger.application.transforms import glide >>> with beam.Pipeline() as p: ... poses = (p ... | chemio.ReadStructuresFromFile('ligands.maegz') ... | glide.Dock(grid_file='receptor.zip', precision='SP') ... | chemio.WriteStructuresToFile('poses.maegz'))
- Parameters:
grid_file – Path to the Glide grid file (.zip).
glide_in_file – Path to a glide.in configuration file.
precision – Docking precision level (SP, HTVS, XP).
poses_per_lig – Number of poses per ligand (default 1).
ref_ligand_file – Path to reference ligand for core constraints.
glide_keywords – Additional Glide keywords.
See
GlideDockingConfigfor all available configuration options.- config_class¶
alias of
GlideDockingConfig