Skip to contents

Helper function for getCDs(). Calculates chemical descriptors for a single molecule, specified as SMILES string. This function should NOT be used directly. It is only exported so getCDs() can easily spawn background worker processes that are able to call this function.

Usage

getCDsFor1Molecule(smi = "O=C(O)CCCCCCCCCO", cache = TRUE, verbose = 1)

Arguments

smi

SMILES string of the molecule.

cache

If TRUE, the results are cached in RAM and on disk at directory ~/.cache/FastRet/getCDsFor1Molecule/ to speed up subsequent calls.

verbose

Verbosity. 0: no output, 1: show progress.

Value

A dataframe of dimension 1 x 241. The rowname is the input SMILES string. The colnames are the chemical descriptor features specified by CDFeatures.

Details

Chemical descriptors in getCDs() are calculated individually for each molecule. This is due to the inconsistent ordering of output dataframes when a list of IAtomContainer objects is provided to rcdk::eval.desc. Although the input SMILES are set as rownames, they don't match the original input SMILES due to an unclear transformation, making mapping non-trivial. Calculating descriptors molecule by molecule also enables parallelization in getCDs().

See also

Examples

cds <- getCDsFor1Molecule("O=C(O)CCCCCCCCCO", cache = TRUE, verbose = 0)