write_mol | R Documentation |
Some webchem functions return character strings that contain a chemical structure in Mol format. This function exports a character string as a .mol file so it can be imported with other chemistry software.
write_mol(x, file = "")
x |
a character string of a chemical structure in mol format. |
file |
a character vector of file names |
## Not run:
# export Mol file
csid <- get_csid("bergapten")
mol3d <- cs_compinfo(csid$csid, field = "Mol3D")
write_mol(mol3d$mol3D, file = mol3d$id)
# export multiple Mol files
csids <- get_csid(c("bergapten", "xanthotoxin"))
mol3ds <- cs_compinfo(csids$csid, field = "Mol3D")
mapply(function(x, y) write_mol(x, y), x = mol3ds$mol3D, y = mol3ds$id)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.