schrodinger.application.combinatorial_explorer.oned_combi_utils module¶
This module contains a collection of classes that attempt to solve the fundamental problem of 1D combinatorial screening: how to combine the 1D representations of reactants to yield an accurate approximation to the 1D representation of the product.
Given a synthetic reaction scheme, the problem is approached by examining a random sample of 1D reactants and 1D products, joining the 1D reactants head-to-tail to obtain approximate 1D products, and varying the following factors to achieve the most accurate similarities between the approximate and true 1D product representations:
The order of the reactants along the 1D coordinate
The internal 180-degree flips of the reactants
The gaps/overlaps between reactants
Once identified, the best scheme is applied during 1D combinatorial screening to rapidly estimate the 1D similarity between a query and a proposed product without actually generating the product or its true 1D representation.
Copyright Schrodinger LLC, All Rights Reserved.
- class schrodinger.application.combinatorial_explorer.oned_combi_utils.OneDOrienter¶
Bases:
objectTrains a linear discriminant analysis (LDA) model on the coordinates of a set of 1D reactants that have been assigned optimal +1/-1 flips and applies the model to assign a most probable orientation to new reactants. Ideally, a 1D reactant with the most probable orientation would require no further flipping in order to form the most accurate 1D product. The ideal situation is never actually realized for every 1D product, so a more realistic goal is to simply improve the accuracy of 1D product represenations formed by using the most probable orientations of all reactants.
- __init__()¶
- addPattern(oned_reactant: list[tuple[int, float]], flip: bool)¶
Adds the provided 1D reactant and its flip state to the LDA model training set. The model is automatically built, as needed, when the orient() method is called.
- buildModel()¶
Builds an LDA model from all patterns added via addPattern().
- orient(oned_reactant: list[tuple[int, float]]) list[tuple[int, float]]¶
Returns the most probable orientation of the provided 1D reactant.
- class schrodinger.application.combinatorial_explorer.oned_combi_utils.OneDCombinerRules(order: tuple, flips: tuple, gaps: tuple, orienters: list)¶
Bases:
objectHolds the set of rules for joining 1D reactants to form approximate 1D products.
- Parameters:
order – The left-to-right order in which to join reactants.
flips – +1/-1 values that indicate whether a reactant should be flipped by 180 degrees.
gaps – The zero, positive or negative gaps/overlaps between adjacent reactants.
orienters – Pre-trained OneDOrienter objects that yield the most probable orientation of each reactant.
- order: tuple¶
- flips: tuple¶
- gaps: tuple¶
- orienters: list¶
- __init__(order: tuple, flips: tuple, gaps: tuple, orienters: list) None¶
- schrodinger.application.combinatorial_explorer.oned_combi_utils.normalize_overlap(ovlp_ab: float, ovlp_aa: float, ovlp_bb: float, oned_norm: int) float¶
Normalizes 1D overlap according to one of the recognized 1D normalization schemes, where a = ref and b = compared.
- class schrodinger.application.combinatorial_explorer.oned_combi_utils.OneDCombiner(oned_combos: list[list[list[tuple[int, float]]]], gap_pool: Optional[float] = [-4.0, -3.5, -3.0, -2.5, -2.0, -1.0, -0.5, 0.0])¶
Bases:
objectGiven a random sample of 1D reactants + 1D products, this class identifies a set of rules for combining 1D reactants to yield accurate approximations to the 1D products. Those rules are applied in the combine() method.
- __init__(oned_combos: list[list[list[tuple[int, float]]]], gap_pool: Optional[float] = [-4.0, -3.5, -3.0, -2.5, -2.0, -1.0, -0.5, 0.0])¶
Constructor taking 1D reactant + 1D product combinations from which to develop the rules, and an optional pool of reactant gaps, with each gap being considered for each possible join. Note that oned_combos[i] contains the ith combination, which holds 2-4 1D reactants, followed by the corresponding 1D product. The number of combinations must be at least MIN_ONED_COMBOS.
- combine(oned_reactant_combos: list[list[list[tuple[int, float]]]], oned_query: list[tuple[int, float]], oned_norm: Optional[int] = 0, use_corrected_self_overlaps: Optional[bool] = True) Iterator[OneDJoin]¶
Given a list of 1D reactant combinations, a 1D query, an optional 1D normalization scheme, and an optional bool for whether to use corrected self-overlaps for approximate 1D products, this function joins each reactant combination to form an approximate 1D product, aligns that product to the provided query, and yields the resulting OneDJoin object.
- getRmse() float¶
Returns the RMSE in the approximate 1D product similarities.
- getRules() OneDCombinerRules¶
Returns the best rules for combining 1D reactants.
- getSortedGaps() list[list[tuple[float], float]]¶
Returns all [gaps, rmse] combinations, sorted by increasing rmse.