schrodinger.application.transforms.autosar.transforms 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.transforms.Combination(rgroups: ~typing.Tuple[~schrodinger.application.transforms.autosar.util.RGroup, ...] = <factory>)¶
Bases:
object
Represent a combination of different RGroups on the same molecule and their aggregated properties.
When accessing a property using the index operator (e.g., combination[prop]), it will return the sum of that property from all RGroups in the combination.
- Parameters:
rgroups – A tuple of RGroups that make up the combination
- toCSVRow(headers: list[str]) str ¶
Convert the Combination to a CSV row string based on the given headers.
- Parameters:
headers – A list of headers to include in the CSV row.
- Returns:
A CSV string representing the combination.
- append(rgroup: RGroup) Combination ¶
Return a new Combination with the given RGroup appended.
NOTE: this does not modify the current combination.
- __init__(rgroups: ~typing.Tuple[~schrodinger.application.transforms.autosar.util.RGroup, ...] = <factory>) None ¶
- class schrodinger.application.transforms.autosar.transforms.ExpandCombination(rgroups: list[RGroup], cutoffs: dict[str, Cutoff], algorithm: Algorithm = Algorithm.SIMPLE)¶
Bases:
PTransform
Expand a Combination by trying to add one more RGroup. All resulting Combinations will have their aggregated properties be less than the maximum value specified in the cutoffs.
NOTE: It is not guaranteed the resulting Combination’s aggregated properties will be larger than the minimum value specified in the cutoffs.
- __init__(rgroups: list[RGroup], cutoffs: dict[str, Cutoff], algorithm: Algorithm = Algorithm.SIMPLE)¶
- Parameters:
rgroups – A list of RGroups to expand the combination with
cutoffs – A dictionary mapping property names to the min / max, inclusive cutoffs
algorithm – The algorithm to use to expand the combination
- expand(combinations)¶
- class schrodinger.application.transforms.autosar.transforms.EnumerateCombination(rgroups: list[RGroup])¶
Bases:
PTransform
Enumerate all Combinations of RGroups with the input Combination
- __init__(rgroups: list[RGroup])¶
- Parameters:
rgroups – A list of RGroups to expand the combination with
- expand(combinations)¶
- class schrodinger.application.transforms.autosar.transforms.FilterCombination(cutoffs: dict[str, Cutoff])¶
Bases:
PTransform
Filter out Combinations that are not within the min / max inclusive Cutoffs.
- __init__(cutoffs: dict[str, Cutoff])¶
- Parameters:
cutoffs – A dictionary mapping property names to the min / max inclusive cutoff.
- expand(combinations)¶
- schrodinger.application.transforms.autosar.transforms.is_within_cutoffs(combination: Combination, cutoffs: dict[str, Cutoff]) bool ¶
Is the given Combination within the Cutoff for each property
- class schrodinger.application.transforms.autosar.transforms.ComputeNormalizedPropertiesSettings(reference_smiles: str, smiles_key: str, reference_properties: dict[str, float] = <factory>, properties_to_calculate: list[str] = <factory>, properties_to_extract: list[str] = <factory>, id_key: str = 'ID', atom_map_num: int = 1)¶
Bases:
object
- Parameters:
reference_smiles – The SMILES of the reference molecule
smiles_key – The key in the input dictionary that contains the SMILES
reference_properties – A dictionary of statically defined reference properties
properties_to_calculate – A list of properties to calculate for the input molecule and the reference molecule
properties_to_extract – A list of static properties to extract from the input dictionary and the reference_properties dict
id_key – The key to use for the ID of the output dictionary
atom_map_num – The atom map number to use for the RGroup attachment point in the output RGoup SMILES
- reference_smiles: str¶
- smiles_key: str¶
- reference_properties: dict[str, float]¶
- properties_to_calculate: list[str]¶
- properties_to_extract: list[str]¶
- id_key: str = 'ID'¶
- atom_map_num: int = 1¶
- validate()¶
- __init__(reference_smiles: str, smiles_key: str, reference_properties: dict[str, float] = <factory>, properties_to_calculate: list[str] = <factory>, properties_to_extract: list[str] = <factory>, id_key: str = 'ID', atom_map_num: int = 1) None ¶
- class schrodinger.application.transforms.autosar.transforms.ComputeNormalizedProperties(settings: ComputeNormalizedPropertiesSettings)¶
Bases:
PTransform
Compute the normalized properties of a molecule by subtracting the reference properties from the molecule’s properties.
- __init__(settings: ComputeNormalizedPropertiesSettings)¶
- expand(rows)¶
- schrodinger.application.transforms.autosar.transforms.calculate_properties(mol, property_keys: list[str]) dict[str, float] ¶
- schrodinger.application.transforms.autosar.transforms.extract_properties(properties: dict[str, float], property_keys: list[str]) dict[str, float] ¶
- schrodinger.application.transforms.autosar.transforms.get_rgroup_smiles(reference_smiles: str, target_smiles: str, atom_map_num: int = 1) str ¶
Determine the RGroup SMILES assuming the reference_smiles is a core of the target_smiles. The attachment point on the RGroup will have the atom map number set to atom_map_num.
- Parameters:
reference_smiles – The SMILES of the core molecule
target_smiles – The SMILES of the target molecule
atom_map_num – The atom map number to set on the RGroup attachment point