Learn R Programming

ChemmineR (version 2.24.2)

smartsSearchOB: SMARTS Search OB

Description

Perform searches for SMARTS patterns using Open Babel (requires ChemmineOB package to be installed).

Usage

smartsSearchOB(sdfset, smartsPattern, uniqueMatches = TRUE)

Arguments

sdfset
An SDFset of the compounds you want to search
smartsPattern
The SMARTS pattern as a string.
uniqueMatches
If true, only return the number of distinct matches, otherwise return the number of all matches.

Value

Returns a vector of counts, one for each input compound.

Examples

Run this code
	## Not run: 
# 		library(ChemmineOB)
# 		data(sdfsample)
# 		#look for rotable bonds
# 		rotableBonds = smartsSearchOB(sdfsample[1:5],"[!$(*#*)&!D1]-!@[!$(*#*)&!D1]",uniqueMatches=FALSE)
# 	## End(Not run)

Run the code above in your browser using DataLab