R/332-extractDrugLargestPiSystem.R

#' Descriptor that Calculates the Number of Atoms in the Largest Pi Chain
#'
#' Descriptor that Calculates the Number of Atoms in the Largest Pi Chain
#'
#' This descriptor calculates the number of atoms in the largest pi chain.
#'
#' @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 one column named \code{nAtomP}.
#'
#' @keywords extractDrugLargestPiSystem Largest Pi Chain
#'
#' @aliases extractDrugLargestPiSystem
#'
#' @author Nan Xiao <\url{https://nanx.me}>
#'
#' @export extractDrugLargestPiSystem
#'
#' @importFrom rcdk eval.desc
#'
#' @examples
#' smi = system.file('vignettedata/FDAMDD.smi', package = 'Rcpi')
#' \donttest{
#' mol = readMolFromSmi(smi, type = 'mol')
#' dat = extractDrugLargestPiSystem(mol)
#' head(dat)}

extractDrugLargestPiSystem = function (molecules, silent = TRUE) {

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

    return(x)

}

Try the Rcpi package in your browser

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

Rcpi documentation built on Nov. 8, 2020, 8:23 p.m.