schrodinger.application.transforms.validators module

These validator functions are intended to be used in the __init__ method of PTransform classes to validate the arguments passed to the PTransform.

When the validation fails, a ValueError is raised with a message that describes the issue.

schrodinger.application.transforms.validators.validate_optional_int(value: Optional[int], what: str) None

Check that the value is None or an int.

schrodinger.application.transforms.validators.validate_nonzero_positive_int(n: Any, what: str) None

Check that the value is a non-zero positive int.

schrodinger.application.transforms.validators.validate_positive_int(n: Any, what: str) None

Check that the value is a positive int.

schrodinger.application.transforms.validators.validate_smarts(smarts: str, what: str = 'SMARTS') None

Check that the SMARTS string is valid.

schrodinger.application.transforms.validators.validate_path_exists(path: pathlib.Path, what: str = 'Path') None

Check that the path exists.

schrodinger.application.transforms.validators.validate_non_empty_smiles_path(path: pathlib.Path, what: str = 'Path') None

Check that the path exists and contains at least one valid SMILES string.

schrodinger.application.transforms.validators.validate_property_ranges(property_ranges: Dict[str, List[float]]) None

Check that the property ranges are valid.