Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is.smiles

Check if input is a SMILES string


Description

This function checks if a string is a valid SMILES by checking if (R)CDK can parse it. If it cannot be parsed by rcdk FALSE is returned, else TRUE.

Usage

is.smiles(x, verbose = TRUE)

Arguments

x

character; input SMILES.

verbose

logical; print messages during processing to console?

Value

a logical

Note

This function can handle only one SMILES string.

References

Egon Willighagen (2015). How to test SMILES strings in Supplementary Information. https://chem-bla-ics.blogspot.nl/2015/10/how-to-test-smiles-strings-in.html

Examples

## Not run: 
# might fail if rcdk is not working properly
is.smiles('Clc(c(Cl)c(Cl)c1C(=O)O)c(Cl)c1Cl')
is.smiles('Clc(c(Cl)c(Cl)c1C(=O)O)c(Cl)c1ClJ')

## End(Not run)

webchem

Chemical Information from the Web

v1.1.1
MIT + file LICENSE
Authors
Eduard Szöcs [aut], Robert Allaway [ctb], Daniel Muench [ctb], Johannes Ranke [ctb], Andreas Scharmüller [ctb], Eric R Scott [ctb], Jan Stanstrup [ctb], João Vitor F Cavalcante [ctb], Gordon Getzinger [ctb], Tamás Stirling [ctb, cre]
Initial release
2021-02-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.