R/329-extractDrugKappaShapeIndices.R

#' 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{https://bit.ly/3ramdBy} 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
#' }
#'
#' @export extractDrugKappaShapeIndices
#'
#' @examples
#' smi = system.file('vignettedata/FDAMDD.smi', package = 'Rcpi')
#' \donttest{
#' mol = readMolFromSmi(smi, type = 'mol')
#' dat = extractDrugKappaShapeIndices(mol)
#' head(dat)}

extractDrugKappaShapeIndices = function (molecules, silent = TRUE) {
    evaluateDescriptor(molecules, type = 'KappaShapeIndicesDescriptor', silent = silent)
}
nanxstats/Rcpi documentation built on July 6, 2023, 9:57 a.m.