Learn R Programming

Rchemcpp (version 2.10.0)

getMoleculePropertyFromSDF: getMoleculePropertyFromSDF - a helper function

Description

This function helps to extract a certain property from an SDF file. Usually the molecule class, like "active/non-active" or a property of the molecule, like "biological activity", is also stored in the SDF file. These values often serve as targets for a prediction task. This function is a small wrapper that extracts the information.

Usage

getMoleculePropertyFromSDF(sdfile,property)

Arguments

sdfile
A character containing the name of the SDF file.
property
The name of the slot in the SDF.

Value

A character vector with one value per molecule.

Examples

Run this code
sdfolder <- system.file("extdata",package="Rchemcpp")
sdf <- list.files(sdfolder,full.names=TRUE,pattern="tiny")
activity <- getMoleculePropertyFromSDF(sdf,"Activity")

Run the code above in your browser using DataLab