schrodinger.application.transforms.scorers.base module

Base classes and registry for AL-Pareto scorers.

schrodinger.application.transforms.scorers.base.SCORER_REGISTRY: dict[str, type[BaseScorer]] = {'esol': <class 'schrodinger.application.transforms.scorers.esol.EsolScorer'>, 'fep': <class 'schrodinger.application.transforms.scorers.fep.FEPScorer'>, 'hfe': <class 'schrodinger.application.transforms.scorers.hfe.HFEScorer'>, 'ldml_inference': <class 'schrodinger.application.transforms.scorers.ldml.InferenceScorer'>, 'property': <class 'schrodinger.application.transforms.scorers.property.PropertyScorer'>, 'rdkit': <class 'schrodinger.application.transforms.scorers.rdkit.RdkitScorer'>, 'retrosynth': <class 'schrodinger.application.transforms.scorers.retrosynth.RetroSynthScorer'>}

Registry mapping scorer identifiers to BaseScorer subclasses.

class schrodinger.application.transforms.scorers.base.BaseScorer(**kwargs)

Bases: PTransformWithConfig

Base class for scoring transforms.

Each input structure is either dropped or returned with the properties returned by getProperties() set on the structure.

Subclasses must set config_class, SCORER_ID, and implement expand. They must also either set SCORER_PROPERTIES or override getProperties() to advertise the property keys they produce.

Property values must be valid structure property keys with a numeric prefix (r_ for real or i_ for integer).

SCORER_ID: str = None
SCORER_PROPERTIES: Iterable[str] = None
getProperties() set[str]

Return the property names this scorer produces.

By default, returns SCORER_PROPERTIES. Subclasses that determine properties dynamically (e.g. from configuration) should override this method instead of setting SCORER_PROPERTIES.

Returns:

Property names this scorer sets on scored structures.

class schrodinger.application.transforms.scorers.base.AsyncScorer(**kwargs)

Bases: BaseScorer

Base class for scorers that submit work to remote services.

Subclasses implement submit() and collect() which return PTransforms. submit() should be fast (just submits jobs), collect() polls and gathers results.

expand() chains them for standalone use. CompositeScorer calls them separately to interleave with sync work.

submit() PTransform

A PTransform that takes structures and submits jobs to a remote service. The PTransform should output objects that can be used to monitor and poll the remote jobs.

collect() PTransform

A PTransform that processes objects output by the submit() transform, waits for the remote jobs to complete, and outputs structures with scored properties set.