Description Objects from the Class Slots Methods Author(s) References See Also Examples
List-like container for storing one or many objects of class SDF
each containing the structure definition information of molecules provided by an SD/MOL file. The SDFset
is the most important class in the ChemmmineR package for accessing and manipulating information stored in SD files.
Objects can be created by calls of the form new("SDFset", ...)
.
SDF
:Object of class "list"
storing SDF
components
ID
:Object of class "character"
storing compound identifiers
signature(x = "SDFset")
: subsetting of class with bracket operator
signature(x = "SDFset")
: returns single component as SDF
object
signature(x = "SDFset")
: replacement method for single SDF
component
signature(x = "SDFset")
: replacement method for several SDF
components
signature(x = "SDFset")
: returns all atom blocks as list
signature(x = "SDFset")
: returns all atom frequencies as list
signature(x = "SDFset")
: returns all bond blocks as list
signature(x = "SDFset")
: returns pointers to OBMol objects as a vector
signature(x = "SDFset")
: concatenates two SDFset
containers
signature(x = "SDFset")
: returns all compound identifiers from ID slot
signature(x = "SDFset")
: replacement method for header block
signature(x = "SDFset")
: replacement method for atom block
signature(x = "SDFset")
: replacement method for bond block
signature(x = "SDFset")
: replacement method for data block
signature(from = "list", to = "SDFset")
: as(list, "SDFset")
signature(from = "SDF", to = "SDFset")
: as(sdf, "SDFset")
signature(from = "SDFset", to = "list")
: as(sdfset, "list")
signature(from = "SDFset", to = "SDF")
: as(sdfset, "SDF")
signature(from = "SDFset", to = "SDFstr")
: as(sdfset, "SDFstr")
signature(from = "SDFstr", to = "SDFset")
: as(sdfstr, "SDFset")
signature(x = "SDFset")
: returns all data blocks as list
signature(x = "SDFset")
: returns all data blocks as named as list with subsetting support
signature(x = "SDFset")
: returns all header blocks as list
signature(x = "SDFset")
: returns number of entries stored in object
signature(x = "SDFset")
: plots one or many molecule structures from SDFset
object
signature(x = "SDFset")
: returns molecule ID field from header block
signature(x = "SDFset")
: returns SDFset
object as list
signature(x = "SDFset")
: returns SDFset
object as list
with SDF
components
signature(x = "SDFset")
: replacement method for SDFset
component in SDFset
using accessor method
signature(object = "SDFset")
: prints summary of SDFset
signature(x = "SDFset")
: prints extended summary of SDFset
SDFset(SDF, ID)
: interface to SDFset
constructor
Thomas Girke
SDF format definition: http://www.symyx.com/downloads/public/ctfile/ctfile.jsp
Related classes: SDF, SDFstr, AP, APset
Import function: read.SDFset("some_SDF_file")
Export function: write.SDF(sdfset, "some_file.sdf")
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | showClass("SDFset")
## Instances of SDFset class
data(sdfsample); sdfset <- sdfsample
sdfset; view(sdfset[1:4])
sdfset[[1]]
## Import and store SD File in SDFset container
# sdfset <- read.SDFset("some_SDF_file")
## Miscellaneous accessor methods
header(sdfset[1:4])
atomblock(sdfset[1:4])
atomcount(sdfset[1:4])
bondblock(sdfset[1:4])
datablock(sdfset[1:4])
## Assigning compound IDs and keeping them unique
cid(sdfset); sdfid(sdfset)
unique_ids <- makeUnique(sdfid(sdfset))
cid(sdfset) <- unique_ids
## Convert data block to matrix
blockmatrix <- datablock2ma(datablocklist=datablock(sdfset)) # Converts data block to matrix
numchar <- splitNumChar(blockmatrix=blockmatrix) # Splits to numeric and character matrix
numchar[[1]][1:4,]; numchar[[2]][1:4,]
## Compute atom frequency matrix, molecular weight and formula
propma <- data.frame(MF=MF(sdfset), MW=MW(sdfset), atomcountMA(sdfset))
propma[1:4, ]
## Assign matrix data to data block
datablock(sdfset) <- propma
view(sdfset[1:4])
## String Searching in SDFset
grepSDFset("650001", sdfset, field="datablock", mode="subset") # To return index, set mode="index")
## Export SDFset to SD file
# write.SDF(sdfset[1:4], file="sub.sdf", sig=TRUE)
## Plot molecule structure of SDF
plot(sdfset[1:4]) # plots to R graphics device
# sdf.visualize(sdfset[1:4]) # viewing in browser
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.