schrodinger.application.transforms.shape_screen module

class schrodinger.application.transforms.shape_screen.FlexSettings(*, sample_method: Literal['rapid', 'thorough', 'rdkit'] = 'rapid', max_conformers: PositiveInt = 100, conformers_per_bond: PositiveInt = 10, max_relative_energy: PositiveFloat = 16.0, amide_option: Literal['vary', 'orig', 'trans'] = 'vary', append: bool = False)

Bases: BaseModel

Settings for sampling of the flexible conformers.

Parameters:
  • sample_method – Sampling method: rapid|thorough|rdkit.

  • max_conformers – Maximum number of flexible conformers to generate.

  • conformers_per_bond – Number of conformers to generate per bond.

  • max_relative_energy – Maximum relative energy of the conformers in kJ/mol.

  • amide_option – Amide option to use: vary|orig|trans.

  • append – Whether to append the conformers to the existing ones.

sample_method: Literal['rapid', 'thorough', 'rdkit']
max_conformers: PositiveInt
conformers_per_bond: PositiveInt
max_relative_energy: PositiveFloat
amide_option: Literal['vary', 'orig', 'trans']
append: bool
class schrodinger.application.transforms.shape_screen.ShapeScreenSettings(*, xvol_path: pydantic.types.FilePath | None = None, flex_settings: FlexSettings | None = None, sort: bool = False, keep: PositiveInt = 1, score_in_place: bool = False, feature_definition_path: pydantic.types.FilePath | None = None, pharmacophoric_sites: bool = False, max_mappings: ConstrainedIntValue = 8, num_alternative_mappings: ConstrainedIntValue = 1, report: pydantic.types.PositiveInt | None = None, redundancy_tolerance: PositiveFloat = 0.5)

Bases: BaseModel

Settings for the shape screen job, see also the command line arguments for the shape_screen executable.

Parameters:
  • xvol_path – Optional excluded volume file path. If not None, the excluded volumes are applied to each generated alignment and discard if clashes are found. Any reported alignment will be the one that yields the highest similarity while avoiding clashes.

  • flex_settings – Optional settings for on-the-fly generation of flexible ligand conformers. If None, no flexible ligand conformers are generated.

  • sort – Whether to sort output structures by decreasing similarity to the query.

  • keep – Cap value for the amount of sorted structures output.

  • score_in_place – Whether to compute similarity score without aligning.

  • feature_definition_path – Optional pharmacophore feature definition file to use.

  • pharmacophoric_sites – Whether to treat each structure as a collection of pharmacophoric sites.

  • max_mappings – Maximum number of primary screen->query sphere mappings.

  • num_alternative_mappings – Maximum number of alternative mappings to each primary mapping.

  • report – Output up to report alignments per input structure. If multiple shape queries are provided, up to report alignments are output for each query.

  • redundancy_tolerance – Reject an alignment of a given conformer if all of its atoms are within redundancy_tolerance in angstroms of another alignment of that same conformer. Different conformers are not compared for redundancy.

xvol_path: pydantic.types.FilePath | None
flex_settings: FlexSettings | None
sort: bool
keep: PositiveInt
score_in_place: bool
feature_definition_path: pydantic.types.FilePath | None
pharmacophoric_sites: bool
max_mappings: int
num_alternative_mappings: int
report: pydantic.types.PositiveInt | None
redundancy_tolerance: PositiveFloat
class schrodinger.application.transforms.shape_screen.ShapeScreen(settings: ShapeScreenSettings, shapes: Union[PCollection[Structure], list[Structure]])

Bases: PTransform

Screens conformers of the input structures against shape(s) query.

Each conformer is aligned to the query in various ways, and a similarity is computed based on overlapping hard sphere volumes. The aligned conformers with the highest similarity are returned with the r_phase_Shape_Sim set to the shape similarity.

Example usage:

>>> import apache_beam as beam
>>> from schrodinger.application.transforms.shape_screen import ShapeScreen
>>> from schrodinger.application.transforms.shape_screen import ShapeScreenSettings
>>> from schrodinger.application.transforms.shape_screen import FlexSettings
>>> from schrodinger.seam.io import chemio
>>> from schrodinger.structure import StructureReader
>>> from schrodinger.test import mmshare_data_file
>>>
>>> shapes_file = mmshare_data_file('glide/factorXa_reference.maegz')
>>> with StructureReader(shapes_file) as reader:
...     shapes = list(reader)
>>> ligands_file = mmshare_data_file('glide/factorXa.maegz')
>>> flex_settings = FlexSettings(sample_method='rapid')
>>> settings = ShapeScreenSettings(flex_settings=flex_settings)
>>> with beam.Pipeline() as p:
...     screened = (
...         p
...         | chemio.ReadStructuresFromFile(ligands_file)
...         | ShapeScreen(settings, shapes)
...         | chemio.WriteStructuresToFile('screened.maegz')
...     )
Parameters:
  • settings – Shape screen settings.

  • shapes – Structure shapes to use as templates, either as a list or PCollection of Structure objects.

__init__(settings: ShapeScreenSettings, shapes: Union[PCollection[Structure], list[Structure]])
classmethod run(sts: list[Structure], shapes: list[Structure], settings: ShapeScreenSettings, work_dir: pathlib.Path | None = None) Iterable[Structure]

Run shape screen as a subprocess.

Parameters:
  • sts – Structures to screen.

  • shapes – Structure shapes to use as templates.

  • settings – Shape screen settings to use.

  • work_dir – Working directory to use, if None, the current working directory is used.

Returns:

Screened structures.