schrodinger.application.combinatorial_diversity.diversity_fingerprinter module

This module contains the DiversityFingerprinter class, which generates Canvas fingerprints and, optionally, a default set of physicochemical properties for structures provided as SMILES strings.

Copyright Schrodinger LLC, All Rights Reserved.

schrodinger.application.combinatorial_diversity.diversity_fingerprinter.NoFpClass()
class schrodinger.application.combinatorial_diversity.diversity_fingerprinter.PropertyType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: enum.Enum

FLOAT = 1
INT = 2
STR = 3
MISSING = 4
class schrodinger.application.combinatorial_diversity.diversity_fingerprinter.DiversityFingerprinter(fp_type, want_props=False, hba_file=None, hbd_file=None, prop_subset=None)

Bases: object

Generates Canvas fingerprints and a default set of physicochemical properties for structures provided as SMILES.

__init__(fp_type, want_props=False, hba_file=None, hbd_file=None, prop_subset=None)

Constructor taking a fingerprint type, whether to compute a set of physicochemical properties, custom rule files for assigning hydrogen bond acceptor and donor counts, and a specified subset of properties to compute.

Parameters
  • fp_type (str) – Fingerprint type (see LEGAL_FP_TYPES). If NO_FP, fingerprints will not be computed.

  • want_props (bool) – Whether to compute properties

  • hba_file (str or NoneType) – File with customized hydrogen bond acceptor rules. Ignored if want_props is False.

  • hbd_file (str or NoneType) – File with customized hydrogen bond donor rules. Ignored if want_props is False.

  • prop_subset (iterable of str) – The subset of properties to compute, identified by elements of PROPERTY_NAMES. This may be used to speed up calculations if all properties are not needed. In particular, RB and ChiralCenters consume about 50% of the time.

Raises
  • KeyError – If fp_type or prop_subset is illegal

  • FileNotFoundError – If hba_file or hbd_file can’t be found.

compute(smiles)

Computes fingerprints and properties, if requested, for the provided SMILES. If fingerprints were not requested, an empty fingerprint is is returned. Properties are returned in the same relative order as PROPERTY_NAMES, with only the requested properties.

Parameters

smiles (str) – SMILES string for the structure.

Returns

Fingerprint and list of property values.

Return type

canvas.ChmSparseBitset, list(float/int)