Splits SD Files into any number of smaller SD Files
write.SDFsplit(x, filetag, nmol)
object of class
string to prepend to file names
integer specifying number of molecules in split SD files
To split an SD File into smaller ones, one can read the source file into R with
and write out smaller ones with
write.SDFsplit. Note: when importing big SD Files,
will be much faster than
read.SDFset, and there is no need to go through an SDFset object instance
in this case.
SDF format definition: http://www.symyx.com/downloads/public/ctfile/ctfile.jsp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
## Load sample data library(ChemmineR) data(sdfsample) ## Not run: ## Create sample SD File with 100 molecules write.SDF(sdfsample, "test.sdf") ## Read in sample SD File sdfstr <- read.SDFstr("test.sdf") ## Run export on SDFstr object write.SDFsplit(x=sdfstr, filetag="myfile", nmol=10) ## Run export on SDFset object write.SDFsplit(x=sdfsample, filetag="myfile", nmol=10) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.