atomsubset: Subset SDF/SDFset Objects by Atom Index to Obtain...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Function to obtain a substructure from SDF/SDFset objects by providing a row index for the atom block in an SDF referencing the atoms of interest. The function subsets both the atom and bond block(s) accordingly.

Usage

1
atomsubset(x, atomrows, type="new", datablock = FALSE)

Arguments

x

object of class SDFset or SDF

atomrows

The argument atomrows can be assigned a numeric index referencing the atoms in the atom block of x. If x is of class SDF, the index needs to be provided as vector. If x is of class SDFset, the same number of index vectors as molecules stored in x need to be passed on in a list with component names identical to the component (molecule) names stored in x.

type

The argument type="new" assigns new atom numbers to a subsetted SDF, while type="old" maintains the numbering of the source SDF.

datablock

By default the data block(s) in SDF/SDFset objects are removed after atom subsetting. The setting datablock=TRUE will maintain the data block information in the subsetted result.

Details

...

Value

object of class SDF or SDFset

Author(s)

Thomas Girke

References

...

See Also

...

Examples

1
2
3
4
5
6
7
8
9
## Instance of SDFset class
data(sdfsample)
sdfset <- sdfsample

## Subset one or more molecules with atom index(es) to obtain substructure(s)
atomsubset(sdfset[[1]], atomrows=1:18) 
indexlist <- list(1:18, 1:12)
names(indexlist) <- cid(sdfset[1:2])
atomsubset(sdfset[1:2], atomrows=indexlist)

girke-lab/ChemmineR-release documentation built on May 17, 2019, 5:26 a.m.