Learn R Programming

Rcpi (version 1.8.0)

extractDrugOBFP3: Calculate the FP3 Molecular Fingerprints

Description

Calculate the FP3 Molecular Fingerprints

Usage

extractDrugOBFP3(molecules, type = c("smile", "sdf"))

Arguments

molecules
R character string object containing the molecules. See the example section for details.
type
'smile' or 'sdf'.

Value

A matrix. Each row represents one molecule, the columns represent the fingerprints.

Details

Calculate the 64 bit FP3 fingerprints provided by OpenBabel.

Examples

Run this code

mol1 = 'C1CCC1CC(CN(C)(C))CC(=O)CC'  # one molecule SMILE in a vector
mol2 = c('CCC', 'CCN', 'CCN(C)(C)', 'c1ccccc1Cc1ccccc1',
         'C1CCC1CC(CN(C)(C))CC(=O)CC')  # multiple SMILEs in a vector
mol3 = readChar(system.file('compseq/DB00860.sdf', package = 'Rcpi'),
                nchars = 1e+6)  # single molecule in single sdf file
mol4 = readChar(system.file('sysdata/OptAA3d.sdf', package = 'Rcpi'),
                nchars = 1e+6)  # multiple molecules in single sdf file

smifp0 = extractDrugOBFP3(mol1, type = 'smile')
smifp1 = extractDrugOBFP3(mol2, type = 'smile')
sdffp0 = extractDrugOBFP3(mol3, type = 'sdf')
sdffp1 = extractDrugOBFP3(mol4, type = 'sdf')

Run the code above in your browser using DataLab