schrodinger.application.transforms.property_filter module¶
Structure property filter transform.
Filters structures based on structure-level property values using existence, numeric range, and set membership criteria.
- class schrodinger.application.transforms.property_filter.PropertyCriterion(*, property: str, exists: bool | None = None, min: float | None = None, max: float | None = None, allowed_values: list[str | int | float] | None = None)¶
Bases:
BaseModelA single property filter criterion.
- property_name: str¶
- exists: bool | None¶
- min: float | None¶
- max: float | None¶
- allowed_values: list[str | int | float] | None¶
- model_config: ClassVar[ConfigDict] = {'frozen': True, 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None¶
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Args:
self: The BaseModel instance. context: The context.
- class schrodinger.application.transforms.property_filter.FilterByPropConfig(*, criteria: list[PropertyCriterion], error_handling: ErrorHandling | None = None)¶
Bases:
BaseModelConfiguration for the FilterByProp transform.
- criteria: list[PropertyCriterion]¶
- error_handling: ErrorHandling | None¶
- model_config: ClassVar[ConfigDict] = {'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- class schrodinger.application.transforms.property_filter.FilterByProp(*, _config: pydantic.main.BaseModel | None = None, **kwargs)¶
Bases:
PTransformWithConfigFilter structures based on structure-level property values.
Supports three filter modes per criterion:
exists: check if a property is present (or absent)
min/max: check if a numeric property is within a range
allowed_values: check if a property value is in a set
When
min,max, orallowed_valuesare specified, existence is implied — the property must be present. Useexistsalone to check only for presence or absence.All criteria must pass for a structure to be kept (AND logic).
Example YAML usage:
- type: FilterByProp config: criteria: - property: "r_epik_State_Penalty" max: 5.0 - property: "i_epik_Tot_Q" allowed_values: [0, -1, 1]
- config_class¶
alias of
FilterByPropConfig
- expand(pcoll: PCollection) OutcomePCollections¶