Calculate Molecular Descriptors Provided by OpenBabel

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:

  • abonds - Number of aromatic bonds

  • atoms - Number of atoms

  • bonds - Number of bonds

  • dbonds - Number of double bonds

  • HBA1 - Number of Hydrogen Bond Acceptors 1

  • HBA2 - Number of Hydrogen Bond Acceptors 2

  • HBD - Number of Hydrogen Bond Donors

  • logP - Octanol/Water Partition Coefficient

  • MR - Molar Refractivity

  • MW - Molecular Weight Filter

  • nF - Number of Fluorine Atoms

  • sbonds - Number of single bonds

  • tbonds - Number of triple bonds

  • TPSA - Topological Polar Surface Area

Author(s)

Nan Xiao <http://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')

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.