extractDrugDescOB {Rcpi} | R Documentation

## Calculate Molecular Descriptors Provided by OpenBabel

### Description

Calculate Molecular Descriptors Provided by OpenBabel

### Usage

    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 <https://nanx.me>

### Examples

    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')

[Package Rcpi version 1.24.0 Index]