schrodinger.application.transforms.filters module

class schrodinger.application.transforms.filters.ProductFilter(filters: List[schrodinger.structutils.filter.SingleSmartsFilter])

Bases: apache_beam.transforms.ptransform.PTransform

A PTransform that returns molecules that match every SingleSmartsFilter in filters.

To be used with PCollections of Mol or Structure objects.

__init__(filters: List[schrodinger.structutils.filter.SingleSmartsFilter])
Parameters

filters – the SingleSmartsFilters that must all match

expand(pcoll)
classmethod FromFilterFile(path: Union[str, pathlib.Path])

Load filters from a product filter file.

class schrodinger.application.transforms.filters.StructurePropertyFilter(property_ranges: Dict[str, List[float]])

Bases: apache_beam.transforms.ptransform.PTransform

A PTransform that rejects structures that have one or more property values outside the allowed range as defined by the property_ranges.

Properties that are not on the structure will not be used as filters.

__init__(property_ranges: Dict[str, List[float]])
Parameters

property_ranges – the property ranges to filter on

expand(pcoll)
class schrodinger.application.transforms.filters.FepAmenable(fep_references_path: pathlib.Path, max_hac_diff: int, core_smarts: str = '')

Bases: apache_beam.transforms.ptransform.PTransform

A PTransform that returns molecules that have a perturbation that is amenable to FEP calculations.

A perturbation is considered acceptable if the number of heavy atoms in the perturbation from the maximum common substructure (MCS) is less than or equal to max_hac_diff.

The core_smarts parameter can be used to specify a SMARTS pattern that is used to speed up filtering by avoiding the MCS calculation if possible.

__init__(fep_references_path: pathlib.Path, max_hac_diff: int, core_smarts: str = '')
Parameters
  • fep_references_path – the path to the FEP references file

  • max_hac_diff – the maximum number of heavy atoms not part of the maximum common substructure with molecules in the FEP references

expand(pcoll)
class schrodinger.application.transforms.filters.DistinctStructures(label: Optional[str] = None)

Bases: apache_beam.transforms.ptransform.PTransform

A PTransform that returns the unique structures based on the SMILES.

expand(pcoll)
class schrodinger.application.transforms.filters.TanimotoFilter(references: Iterable[rdkit.Chem.rdchem.Mol], threshold: float, ignored_smarts: str = '', larger_is_better: bool = True)

Bases: apache_beam.transforms.ptransform.PTransform

A PTransform that returns molecules that have a better Tanimoto similarity score to at least one molecule in references. What is considered better depends on the larger_is_better parameter.

The optional ignored_smarts parameter can be used to ignore certain atoms in the Tanimoto similarity calculation.

The larger_is_better parameter determines whether a larger or equal similarity score than the threshold is required to pass the filter. (Default is True)

__init__(references: Iterable[rdkit.Chem.rdchem.Mol], threshold: float, ignored_smarts: str = '', larger_is_better: bool = True)
Parameters
  • references – the molecules to compare against

  • ignored_smarts – the SMARTS pattern for the atoms to ignore in the Tanimoto similarity calculation

  • threshold – the Tanimoto similarity threshold

  • larger_is_better – whether a larger similarity score is better

expand(pcoll)
class schrodinger.application.transforms.filters.AlogDFilter(min_alogd: float, max_alogd: float)

Bases: apache_beam.transforms.ptransform.PTransform

Allow structures through that meet AlogD criteria.

The filter value is:

AlogP - (state penalty / units.KCAL_PER_MOL_PER_ORDER_OF_MAGNITUDE)

The AlogP value is that calculated by the RDKit AlogP descriptor. If the structure’s state penalty (r_epik_State_Penalty) property is not defined, it is assumed to be 0.

__init__(min_alogd: float, max_alogd: float)
Parameters
  • min_alogd – the minimum AlogD value

  • max_alogd – the maximum AlogD value

expand(pcoll)
class schrodinger.application.transforms.filters.ChargedNHpKaFilter(min_pka: float, max_pka: float, exclude_smarts: Optional[str] = None)

Bases: apache_beam.transforms.ptransform.PTransform

A PTransforms that only passes structures if all known pKa values of the hydrogens on a formally charged nitrogen atom fall in the min_pka to max_pka (borders included) range.

The pKa values should be stored in the r_epik_H2O_pKa atom property, as is customarily done by ligprep. If the atom property is not defined, the atom is considered to have an acceptable pKa value.

__init__(min_pka: float, max_pka: float, exclude_smarts: Optional[str] = None)
expand(pcoll)