schrodinger.application.transforms.autosar module

AutoSAR is a workflow to explore combinations of RGroups at multiple positions while ensuring that the properties of the resulting molecule are within certain cutoffs. It is assumed that properties are additive.

Suppose we have a molecule where we have enumerated RGroups separately for R1, R2, and R3. AutoSAR will explore all possible combinations of RGroups at R1, R2, and R3 that satisfy the cutoffs. We estimate the entire molecule’s properties by summing the individual contributions of each RGroup.

class schrodinger.application.transforms.autosar.Algorithm

Bases: enum.Enum

SIMPLE = 'simple'
RANGE_SORT = 'range-sort'
class schrodinger.application.transforms.autosar.RGroupID(index: int, smiles: str)

Bases: object

Represent a unique ID of a RGroup on a molecule

Variables
  • index – the index of the RGroup on the molecule to identify from multiple locations, e.g. R1, R2, R3…

  • smiles – the SMILES of the RGroup

index: int
smiles: str
__init__(index: int, smiles: str) None
class schrodinger.application.transforms.autosar.Combination(id: typing.Tuple[schrodinger.application.transforms.autosar.RGroupID, ...] = <factory>, data: dict = <factory>)

Bases: object

Represent a combination of different RGroups on the same molecule and their aggregated properties.

Variables
  • id – A tuple of RGroupID objects that uniquely identify each of the RGroups that were aggregated in the combination

  • data – A dictionary mapping property names to their aggregated values

id: Tuple[schrodinger.application.transforms.autosar.RGroupID, ...]
data: dict
classmethod fromCombination(c: schrodinger.application.transforms.autosar.Combination, *, rgroup_id: schrodinger.application.transforms.autosar.RGroupID, data: dict)
toCSVRow(headers: list[str]) str

Stringify the combination as a single row in a CSV file. The order of the columns is determined by the headers list

Parameters

headers – The list of headers to use for the CSV file

__init__(id: typing.Tuple[schrodinger.application.transforms.autosar.RGroupID, ...] = <factory>, data: dict = <factory>) None
class schrodinger.application.transforms.autosar.ExpandCombination(rgroups: dict[schrodinger.application.transforms.autosar.RGroupID, dict[str, str | float]], cutoffs: dict[str, float], algorithm: schrodinger.application.transforms.autosar.Algorithm = Algorithm.SIMPLE)

Bases: apache_beam.transforms.ptransform.PTransform

Expand a combination of RGroups by trying to add one more RGroup. All resulting combinations will be within the cutoffs.

__init__(rgroups: dict[schrodinger.application.transforms.autosar.RGroupID, dict[str, str | float]], cutoffs: dict[str, float], algorithm: schrodinger.application.transforms.autosar.Algorithm = Algorithm.SIMPLE)
Parameters
  • rgroups – A dictionary mapping RGroupIDs to RGroups to attempt to add to the combination

  • cutoffs – A dictionary mapping property names to the max, inclusive cutoff

  • algorithm – The algorithm to use to expand the combination

expand(combinations)