sim | R Documentation |
Calculate fingerprint similarity.
sim(
fps1 = NULL,
fps2 = NULL,
metric = c("tanimoto", "dice", "cosine", "sokal", "russel", "rogotgoldberg", "allbit",
"kulczynski", "mcconnaughey", "asymmetric", "braunblanquet")
)
fps1 |
A |
fps2 |
A |
metric |
Metric type. |
mols1 <- parse_smiles(c("Cc1ccccc1", "CCN(CC)CC"))
mols2 <- parse_smiles(c("Cc1ccccc1", "CCN(CC)CC", "CCC"))
fps1 <- fp_maccs(mols1)
fps2 <- fp_maccs(mols2)
sim(fps1, metric = "tanimoto")
sim(fps1, fps2, metric = "tanimoto")
# or use pipes
mols1 |>
fp_maccs() |>
sim("tanimoto")
(mols1 |> fp_maccs()) |> sim(mols2 |> fp_maccs(), "tanimoto")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.