bulk_fraggle_similarity#
- skfp.distances.bulk_fraggle_similarity(X: list[Mol], Y: list[Mol] | None = None, tversky_threshold: float = 0.8) ndarray #
Bulk Fraggle similarity.
Computes the pairwise Fraggle similarity between lists of molecules. If a single list is passed, similarities are computed between its molecules. For two lists, similarities are between their respective molecules, with i-th row and j-th column in output corresponding to i-th molecule from first list and j-th molecule from second list.
See also
fraggle_similarity()
.- Parameters:
X (ndarray) – First list of molecules, of length m.
Y (ndarray, default=None) – First list of molecules, of length n. If not passed, similarities are computed between molecules from X.
tversky_threshold (float, default=0.8) – Required minimal Tversky similarity between a fragment and the reference molecule.
- Returns:
similarities – Array with pairwise Fraggle similarity values. Shape is \(m \times n\) if two lists of molecules are passed, or \(m \times m\) otherwise.
- Return type:
ndarray
See also
fraggle_similarity()
Fraggle similarity function for two molecules.
Examples
>>> from skfp.distances import bulk_fraggle_similarity >>> from rdkit.Chem import MolFromSmiles >>> mols = [MolFromSmiles("COc1ccccc1"), MolFromSmiles("CN1C=NC2=C1C(=O)N(C(=O)N2C)C")] >>> sim = bulk_fraggle_similarity(mols) >>> sim array([[1. , 0.23275862], [0.23275862, 1. ]])