webchem 2.0.0
CRAN release: 2026-10-13
NEW FEATURES
- Added offline access to the EU Pesticides Database. Use
db_download_eup()to download the database,eup_list_entries()to list all entries,eup_convert()to convert between identifiers, andeup_query()to query the database. - Added offline access to FooDB, a database of food constituents. Use
db_download_foodb()to download the database,foodb_list_compounds()to list all compounds,foodb_convert()to convert between identifiers, andfoodb_query()to query the database. -
pc_sect()can now retrieve previously inaccessible PubChem sections, including spectral data and data from separate subsystems. - Added
chembl_status()to retrieve status information about the ChEMBL webservice, including database version, release date, and entity counts. - Added
chembl_atc_classes()to retrieve all available ATC classifications from ChEMBL. - Added
chembl_img()for downloading SVG images from ChEMBL.
OFFLINE ACCESS TO CHEMBL
-
chembl_query()now supports both online queries (mode = "ws", default) and offline retrieval from a local ChEMBL database (mode = "offline"). Offline mode currently supports the following resources: “activity”, “assay”, “atc_class”, “binding_site”, “biotherapeutic”, “cell_line”, “chembl_id_lookup”, “compound_record”, “document”, “drug”, “drug_indication”, “drug_warning”, “go_slim”, “and molecule”. - Results for online and offline queries are identical for most resources. Where they differ, the offline version throws informative warnings.
- Added
db_download_chembl()for downloading ChEMBL for fully offline access. The function supports aversionargument for downloading a specific version of ChEMBL. - Added
chembl_check_db_version()to retrieve a pinned default ChEMBL database version from .Renviron or .Rprofile. An error is thrown if no version is configured. This can be used to work with pinned ChEMBL versions in offline mode.
MINOR IMPROVEMENTS
-
bcpc_query()now also looks for derivatives (esters and salts) of active compounds. -
chembl_query()now returns a named list with improved formatting for nested output whenoutput = "tidy". -
chembl_query()now supports the “similarity” resource (currently limited to 20 results). -
chembl_query()now supports the “compound_structural_alert” resource. -
chembl_query()now retrieves the ChEMBL schema for each resource (once per session) and enforces it. Also NULL values are replaced with typed NA values. - Added new argument
outputtochembl_query()(values: “raw” or “tidy”) to control output format. Raw format returns the full nested structure; tidy format attempts to flatten the results.
webchem 1.3.1
CRAN release: 2025-07-16
BUG FIXES
-
pc_prop()returnedNAwithout much further explanation if any of the queries were not positive integers. The updated function attempts to coerce queries to positive integers, only progresses valid queries, and prints informative messages along the way if verbose messages are enabled. -
srs_query()broke because the URL was no longer working. We have updated the URL. -
is.inchikey(type = "chemspider")broke because the URL was no longer working. We have updated the URL but the function now requires an API key like all other ChemSpider functions. -
pc_prop()failed withproperties = NULLbecause the list of accepted property names had changed. We have updated the list.
webchem 1.3.0
CRAN release: 2023-06-09
NEW FEATURES
- The
nist_rifunction now returns a column with the CAS number to facilitate querying of multiple retention index tables. - The
nist_rifunction can now take multiple arguments fortype,polarityandtemp_prog. - CAS numbers are automatically reformatted using
as.casinbcpc_query,cts_convert,get_etoxid,fn_percept,get_cid, andsrs_query. - The
as.casfunction now has averboseargument.
DEFUNCT FUNCTIONS
-
ci_query()has been removed from the package because NLM had retired ChemIDplus. -
pan_query()has been removed from the package because PAN no longer supports programmatic access.
webchem 1.2.0
CRAN release: 2022-11-02
NEW FEATURES
- webchem can now access ChEMBL (https://www.ebi.ac.uk/chembl/) with
chembl_*()functions. ChEMBL is a manually curated database of bioactive molecules with drug-like properties.
BUG FIXES
- ChemSpider functions did not include time delays between queries. This has been fixed.
- Multiple ChemSpider functions failed when the API key was provided during function call. This has been fixed.
- Minor change in NIST retention index tables was causing
nist_ri()to fail. This has been fixed.
webchem 1.1.3
CRAN release: 2022-06-15
webchem 1.1.2
CRAN release: 2021-12-06
webchem 1.1.0.
CRAN release: 2020-10-02
NEW FEATURES
- Download images of substances from Chemical Identifier Resolver (CIR) with
cir_img(). - Download images of substances from ChemSpider with
cs_img(). -
find_db()checks if a query gets a hit in most databases integrated in webchem. Useful for deciding which of several databases to focus on given a set of chemicals.
MINOR IMPROVEMENTS
- Most functions now use httr::RETRY() to access webservices.
- Verbose messages are now harmonized.
- The
"type"argument inci_query()andaw_query()has been changed to"from"for consistency with other functions. -
fn_percept()andcts_compinfo()now have"query"and"from"arguments for consistency with other functions. - Possible values for
"from"have been made more consistent across functions. -
pc_synonyms(),cts_convert(),cir_query()have been changed to use thematchargument instead ofchoicesfor consistency with other functions. -
get_etoxid()output changed slightly so that the matched chemical name string no longer includes the etoxid in parentheses. -
is.cas()is now vectorized.
webchem 1.0.0
CRAN release: 2020-05-28
NEW FEATURES
- get_cid() now can search by registry IDs (e.g. CAS RN), and can handle more complex requests like searching for similar compounds.
- Retrieve chemical data from PubChem content pages with pc_sect().
- get_etoxid() now can search by CAS, EC, GSBL and RTECS numbers. Added
from =argument. - nist_ri() now can search by name, InChI, InChIKey, or CAS. The
casargument is deprecated. Usequeryinstead withfrom = "cas".
MINOR IMPROVEMENTS
- All
get_*()functions now output tibbles with a column for the query and a column for the retrieved ID. - Changes to arguments in
get_*()functions to make them more consistent. - aw_idx.rda is no longer included in the package as a data set. Instead, it is built by build_aw_idx() to tempdir().
BUG FIXES
- nist_ri() returned malformed tables or errored if there was only one entry for a query.
- get_csid() now returns all csids when queried from formula.
- get_csid() returned an error when query was NA.
- get_chebiid() and chebi_comp_entity() fixed for invalid queries.
- get_cid() returned the PubChem ID of sodium when the query was NA.
- aw_query() returned a list for successful queries, NA for unsuccessful queries.
webchem 0.5.0
CRAN release: 2020-03-02
NEW FEATURES
- Retrieve data from ChEBI (https://www.ebi.ac.uk/chebi/) webservice with get_chebiid() and chebi_comp_entity(). ChEBI comprises a rich data base on chemicals with bilogical interest.
- Retrieve retention indices from NIST (https://webbook.nist.gov) with nist_ri().
- Get record details from US EPA Substance Registry Services (https://cdxnodengn.epa.gov/cdx-srs-rest/) with srs_query().
- “first” argument in cts_convert() and cir_query() and “interactive” argument in pc_synonyms() deprecated. Use “choices” instead to return either a list of all results, only the first result, or an interactive menu to choose a result to return.
- ChemSpider functions now look for an API token stored in .Renviron or .Rprofile by default so you can keep them hidden more easily.
MINOR IMPROVEMENTS
- as.cas() added.
- Removed documentation files for non-exported functions that were only used internally.
BUG FIXES
- cs_prop() failed with duplicated return values.
- pp_query() failed when compound present, but no properties.
- ci_query() failed when missing table.
- get_csid() failed because of a major change in the ChemSpider API.
- multiple functions failed because of a major change in the ChemSpider API.
- cir_query() mistook NA for sodium.
- fixed functions that communicate with the ChemSpider API.
- get_etoxid() printed incorrect results for certain match types.
webchem 0.4.0
CRAN release: 2018-04-07
BUG FIXES
- extr_num() did not work properly with decimal numbers.
- cs_prop() failed when epi-suite data was not available.
- cs_prop() failed with invalid html.
- cs_prop() gave incorrect answer, if entries were not available.
- cs_prop() did not parse scientific number correctly.
- is.smiles() failed because of changes in rcdk.
- cir_query() failed with identifiers containing spaces (e.g. ‘acetic acid’).
- Aeveral other functions failed with identifiers containing spaces & returned wrong distance.
webchem 0.3.0
CRAN release: 2017-10-20
MINOR IMPROVEMENTS
- cs_prop() now also return experimental data for Boiling and Melting Points.
- pc_synonyms gained an argument ‘interactive’ to enter an interactive mode for selecting synonyms.
- cts_convert now returns NA if no matches are found.
webchem 0.2.0
webchem 0.1.1
NEW FEATURES
- Added ping_pubchem() to check whether pubchem is up & running.
- Added cs_web_ping () to check whether the chemspider webpage is functional.
webchem 0.1.0
NEW FEATURES
- Added cts_to() and cts_from() to retrieve possible ids that can be queried.
- cts_(), pp_query(), cir_query(), get_cid(), get_etoxid(), etox_(), pan_query() get_wdid(), aw_query(), get_csid(), cs_prop(), cs_compinfo() and ci_query() can handle multiple inputs.
- pc_prop() queries properties and pc_synonmy() synonyms from PUG-REST.
- Added extractors for webchem objects: cas(), inchikey() and smiles().
webchem 0.0.5
NEW FEATURES
- is.smiles() checks SMILES strings, by parsing via (R)CDK.
- get_wdid() and wd_indent() to retrieve information from wikidata.
- get_etoxid() can handle multi inputs (interactive mode, best match, first match, NA and all matches).
- ci_query() can handle multi inputs (interactive mode, best match, first match and NA).
- cs_prop() queries predictions (ACD and EPiSuite) from ChemSpider.
MINOR IMPROVEMENTS
- webchem uses exclusively xml2 (instead of XML).
- All function return source_url for (micro-)attribution of sources.
- cs_compinfo(): names of returned list changed.
- cs_extcompinfo():
- names of returned list changed.
- result is numeric where appropriate.
- cir(): result is numeric where appropriate.
- Unified naming scheme of functions.
- is.inchikey_cs() has been integrated into is.inchikey().
- aw_query() returns multiple inchikey if found.
- pan() now returns chemical name and matched synonym.
BUG FIXES
- Utility functions are not vectorized and throw an error.
- chemid() did mot work with inchikey as input.
- ppdb_idx returned duplicated CAS values, which caused ppdb() to fail.
- ppdb() failed in some cases because of false encoding.
- etox_*() functions are more robust.
- ci_query() failed if multi hits were found. Now returns first hit.
- aw_fuery() failed if inchikey was not found.
webchem 0.0.4
NEW FEATURES
- chemid() to query ChemIDplus http://chem.sis.nlm.nih.gov/chemidplus/.
- is.inchikey() and is.cas() to check if a string is valid inchikey or CAS registry number.
- parse_mol(): A simple molfile parser.
- Functions to work with ChemSpider InChI API:
- cs_csid_mol() : convert csid to mol.
- cs_inchikey_csid() : convert inchikey to csid.
- cs_inchikey_inchi() : convert inchikey to inchi.
- cs_inchikey_mol() : convert inchikey to Molfile.
- cs_inchi_csid() : convert inchi to csid.
- cs_inchi_inchikey : convert inchi to inchikey.
- cs_inchi_mol() : convert inchi to molfile.
- cs_inchi_smiles() : convert inchi to smiles.
- cs_smiles_inchi() : convert smiles to inchi.
- These are all wrapped into cs_convert().
- is.inchikey_cs() : Check via ChemSpider if inchikey is valid.
- webchem has now a zenodo doi, please cite if you use it.
MINOR IMPROVEMENTS
- cts_compinfo() checks if input is a inchikey (via exported function is.inchikey()).
- cts_compinfo() is now more robust and verbose, if problems are encountered.
- alanwood() returns separate inchi and ichikeys in case of isomers.
- alanwood() returns also subactvity (e.g. activity [1] “fungicides” and subactivity [1] “pyridine fungicides”).
- physprop() also returns boiling and melting points. Moreover, values are now numeric.
BUG FIXES
- alanwood() returns only results for first match in case of multiple links found.
- physprop() stopped working after change of SRC to https, fixed now.
- Changed etox_* functions to https.
webchem 0.0.3
CRAN release: 2015-09-25
webchem 0.0.2
CRAN release: 2015-08-15
NEW FEATURES
- Query the PAN Pesticides Database with pan().
- Query Allan Woods Compendium of Pesticide Common Names with allanwood().
