post_validate_inchikey: Validate an InChIKey

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/TOOLS-post_validate_inchikey.R

Description

Functionality to check the validity of an InChIKey.

Usage

1
post_validate_inchikey(inchikey, apikey)

Arguments

inchikey

A 25- or 27-character InChIKey to be validated.

apikey

A 32-character string with a valid key for ChemSpider's API services.

Details

Before this functions performs an API query, it runs quality checking as lined out at https://www.inchi-trust.org/technical-faq/#13.1. If an InChIKey is ruled out based on these criteria, it returns FALSE with a warning message.

Value

A logical indicating the validity of the InChIKey

Author(s)

Raoul Wolf (https://github.com/RaoulWolf/)

See Also

https://developer.rsc.org/compounds-v1/apis/post/tools/validate/inchikey

Examples

1
2
3
4
5
6
7
## Not run: 
## validate the InChIKey of caffeine
inchikey <- "RYYVLZVUVIJVGH-UHFFFAOYSA-N"
apikey <- "a_valid_ChemSpider_API_key"
post_validate_inchikey(inchikey = inchikey, apikey = apikey)

## End(Not run)

NIVANorge/chemspiderapi documentation built on Jan. 10, 2021, 10:12 a.m.