Learn R Programming

rcdk (version 3.1.8.1)

get.fingerprint: Evaluate Fingerprints

Description

This function evaluates fingerprints of a specified type for a set of molecules or a single molecule. Depending on the nature of the fingerprint, parameters can be specified. Currently five different fingerprints can be specified:
  • standard - Considers paths of a given length. The default is but can be changed. These are hashed fingerprints, with a default length of 1024
  • extended - Similar to the standard type, but takes rings and atomic properties into account into account
  • graph - Similar to the standard type by simply considers connectivity
  • hybridization - Similar to the standard type, but only consider hybridization state
  • maccs - The popular 166 bit MACCS keys described by MDL
  • estate - 79 bit fingerprints corresponding to the E-State atom types described by Hall and Kier
  • pubchem - 881 bit fingerprints defined by PubChem

Depending on whether the input is a single IAtomContainer object, a list or single vector is returned. Each element of the list is an S4 object of class fingerprint, which can be manipulated with the fingerprint package.

Usage

get.fingerprint(molecule, type = 'standard', depth=6, size=1024, verbose=FALSE)

Arguments

molecule
An IAtomContainer object that can be obtained by loading them from disk or drawing them in the editor.
type
The type of fingerprint. Alternatives include 'extended', 'graph', 'maccs', 'estate', 'hybridization'
depth
The search depth. This argument is ignored for the 'pubchem', 'maccs' and 'estate' fingerprints
size
The length of the fingerprint bit string. This argument is ignored for the 'pubchem', 'maccs' and 'estate' fingerprints
verbose
If TRUE, exceptions, if they occur, will be printed

Value

  • Objects of class fingerprint, from the fingerprint package. If there is a problem during fingerprint calculation, NULL is returned.

See Also

load.molecules

Examples

Run this code
## get some molecules
sp <- get.smiles.parser()
smiles <- c('CCC', 'CCN', 'CCN(C)(C)', 'c1ccccc1Cc1ccccc1','C1CCC1CC(CN(C)(C))CC(=O)CC')
mols <- parse.smiles(smiles)

## get a single fingerprint using the standard
## (hashed, path based) fingerprinter
fp <- get.fingerprint(mols[[1]])

## get MACCS keys for all the molecules
fps <- lapply(mols, get.fingerprint, type='maccs')

Run the code above in your browser using DataLab