schrodinger.application.transforms.models_transforms module¶
YAML-only transforms registered under the Models. namespace.
These are intentionally scoped to YAML-based pipelines and use a
Models.X naming convention to distinguish them from the general
transform library.
- class schrodinger.application.transforms.models_transforms.SelectionCriteria¶
Bases:
str,Enum- MIN = 'min'¶
- MAX = 'max'¶
- class schrodinger.application.transforms.models_transforms.GroupByCorpID(label: Optional[str] = None)¶
Bases:
PTransformGroup structures by their root SourceID (corporate compound ID).
See also
application.transforms.sourceidfor related transforms that key/group by tagged ancestor SourceIDs.- expand(pcoll)¶
- class schrodinger.application.transforms.models_transforms.Ungroup(label: Optional[str] = None)¶
Bases:
PTransformFlatten grouped collections back into individual elements.
- expand(pcoll)¶
- class schrodinger.application.transforms.models_transforms.TakeBestOfGroupConfig(*, property: str, n: int = 1, criteria: SelectionCriteria = SelectionCriteria.MIN, strict: bool = True)¶
Bases:
BaseModelConfiguration for
TakeBestOfGroup.- Parameters:
property – Structure property name to rank by (e.g.,
"r_i_docking_score").n – Number of structures to keep per group.
criteria – Whether to keep the lowest (
"min") or highest ("max") values.strict – If True, raise an error if any structure in a group is missing the target property. If False, skip those structures.
- model_config: ClassVar[ConfigDict] = {'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- property: str¶
- n: int¶
- criteria: SelectionCriteria¶
- strict: bool¶
- class schrodinger.application.transforms.models_transforms.TakeBestOfGroup(**kwargs)¶
Bases:
PTransformWithConfigSelect the best N structures per group by a structure property.
Example YAML usage:
- type: Models.GroupByCorpID - type: Models.TakeBestOfGroup config: property: "r_i_docking_score" n: 3 criteria: min - type: Models.Ungroup
See
TakeBestOfGroupConfigfor all available configuration options.- config_class¶
alias of
TakeBestOfGroupConfig
- expand(pcoll)¶