extractDrugDescOB: Calculate Molecular Descriptors Provided by OpenBabel

Description Usage Arguments Details Value Author(s) Examples

View source: R/384-extractDrugDescOB.R

Description

Calculate Molecular Descriptors Provided by OpenBabel

Usage

1
extractDrugDescOB(molecules, type = c("smile", "sdf"))

Arguments

molecules

R character string object containing the molecules. See the example section for details.

type

'smile' or 'sdf'.

Details

This function calculates 14 types of the numerical molecular descriptors provided in OpenBabel.

Value

A data frame, each row represents one of the molecules, each column represents one descriptor. This function returns 14 columns named abonds, atoms, bonds, dbonds, HBA1, HBA2, HBD, logP, MR, MW, nF, sbonds, tbonds, TPSA:

Author(s)

Nan Xiao <https://nanx.me>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
mol1 = 'CC(=O)NCCC1=CNc2c1cc(OC)cc2'  # one molecule SMILE in a vector
mol2 = c('OCCc1c(C)[n+](=cs1)Cc2cnc(C)nc(N)2',
         'CCc(c1)ccc2[n+]1ccc3c2Nc4c3cccc4',
         '[Cu+2].[O-]S(=O)(=O)[O-]')  # multiple SMILEs in a vector
mol3 = readChar(system.file('compseq/DB00860.sdf', package = 'Rcpi'),
                nchars = 1e+6)  # single molecule in a sdf file
mol4 = readChar(system.file('sysdata/OptAA3d.sdf', package = 'Rcpi'),
                nchars = 1e+6)  # multiple molecules in a sdf file


# Problem (core dump) under Ubuntu 16.04
smidesc0 = extractDrugDescOB(mol1, type = 'smile')
smidesc1 = extractDrugDescOB(mol2, type = 'smile')
sdfdesc0 = extractDrugDescOB(mol3, type = 'sdf')
sdfdesc1 = extractDrugDescOB(mol4, type = 'sdf')

Rcpi documentation built on Sept. 9, 2017, 2:01 a.m.