Download molecular structure files in various formats (MOL, SDF, PNG).
Usage
download_compound_structure(
client,
id_type,
id_value,
format = "molfile",
save_path = NULL
)Arguments
- client
An mw_rest_client object
- id_type
Character. Identifier type ("regno", "pubchem_cid", etc.)
- id_value
Character or numeric. Identifier value
- format
Character. File format ("molfile", "sdf" or "png")
- save_path
Character. Path to save the downloaded file. If NULL, content is returned as a character string.
Examples
if (FALSE) { # \dontrun{
client <- mw_rest_client()
mol_file <- download_compound_structure(
client, "regno", "1", "molfile",
"compound.mol"
)
# Save to file
} # }
