R/429-extractDrugKappaShapeIndices.R

Defines functions extrDrugKappaShapeIndices

Documented in extrDrugKappaShapeIndices

#' Descriptor that Calculates Kier and Hall Kappa Molecular Shape Indices
#'
#' Descriptor that Calculates Kier and Hall Kappa Molecular Shape Indices
#' 
#' Kier and Hall Kappa molecular shape indices compare the molecular graph 
#' with minimal and maximal molecular graphs; 
#' see \url{http://www.chemcomp.com/Journal_of_CCG/Features/descr.htm#KH} 
#' for details:
#' "they are intended to capture different aspects of molecular shape. 
#' Note that hydrogens are ignored. In the following description, 
#' n denotes the number of atoms in the hydrogen suppressed graph, 
#' m is the number of bonds in the hydrogen suppressed graph. 
#' Also, let p2 denote the number of paths of length 2 
#' and let p3 denote the number of paths of length 3".
#' 
#' @param molecules Parsed molucule object.
#' @param silent Logical. Whether the calculating process 
#' should be shown or not, default is \code{TRUE}.
#'
#' @return A data frame, each row represents one of the molecules, 
#' each column represents one feature. 
#' This function returns 3 columns named 
#' \code{Kier1}, \code{Kier2} and \code{Kier3}:
#' \itemize{
#' \item \code{Kier1} - First kappa shape index
#' \item \code{Kier2} - Second kappa shape index
#' \item \code{Kier3} - Third kappa shape index
#' }
#' 
#' @keywords extrDrugKappaShapeIndices Kappa Shape Indices
#'
#' @aliases extrDrugKappaShapeIndices
#' 
#' @author Min-feng Zhu <\email{wind2zhu@@163.com}>, 
#'         Nan Xiao <\url{http://r2s.name}>
#' 
#' @export extrDrugKappaShapeIndices
#' 
#' @importFrom rcdk eval.desc
#' 
#' @examples
#' smi = system.file('vignettedata/test.smi', package = 'BioMedR')
#' mol = readMolFromSmi(smi, type = 'mol')
#' dat = extrDrugKappaShapeIndices(mol)
#' head(dat)
#' 

extrDrugKappaShapeIndices = function (molecules, silent = TRUE) {

    x = eval.desc(molecules, 
                  'org.openscience.cdk.qsar.descriptors.molecular.KappaShapeIndicesDescriptor', 
                  verbose = !silent)

    return(x)

}

Try the BioMedR package in your browser

Any scripts or data that you put into this service are public.

BioMedR documentation built on Nov. 17, 2017, 10:08 a.m.