Skip to contents

Compute Morgan fingerprints (circular fingerprints).

Usage

fp_morgan(mols, radius = 2L, use_features = FALSE, explicit = FALSE)

Arguments

mols

A tidymol object.

radius

The radius parameter for Morgan fingerprints. radius = 2 is roughly equivalent to ECFP4 and FCFP4.

use_features

Should we use the feature-based invariants, similar to those used for the FCFP fingerprints? Defaults to FALSE. This means only apply the default atom invariants, which use the connectivity information similar to those used for the ECFP fingerprints.

explicit

Return the fingerprints as a vector or matrix? Default is FALSE.

Examples

if (FALSE) { # is_installed_rdkit()
mol <- parse_smiles("Cc1ccccc1")
mols <- read_smiles(tidychem_example("smi-multiple.smi"))

# ECFP4
fp_morgan(mol)
fp_morgan(mols)

# get fingerprints matrix
fp_morgan(mol, explicit = TRUE)
fp_morgan(mols, explicit = TRUE)

# FCFP2
fp_morgan(mol, radius = 1L, use_features = TRUE)
fp_morgan(mols, radius = 1L, use_features = TRUE)

# get fingerprints matrix
fp_morgan(mol, radius = 1L, use_features = TRUE, explicit = TRUE)
fp_morgan(mols, radius = 1L, use_features = TRUE, explicit = TRUE)
}