blob: eaa6817d592be80ea362eae0e001d6c133edfd00 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# Plot method for chent objects
Plot method for chent objects
## Usage
``` r
# S3 method for class 'chent'
plot(x, ...)
```
## Arguments
- x:
The chent object to be plotted
- ...:
Further arguments passed to
[grImport::grid.picture](https://rdrr.io/pkg/grImport/man/grid.picture.html)
## Examples
``` r
# Don't run examples per default, as PubChem may be unavailable
# \dontrun{
caffeine <- chent$new("caffeine")
#> Querying PubChem for name caffeine ...
#> Get chemical information from RDKit using PubChem SMILES
#> CN1C=NC2=C1C(=O)N(C(=O)N2C)C
print(caffeine)
#> <chent>
#> Identifier $identifier caffeine
#> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N
#> SMILES string $smiles:
#> PubChem
#> "CN1C=NC2=C1C(=O)N(C(=O)N2C)C"
#> Molecular weight $mw: 194.2
#> PubChem synonyms (up to 10):
#> [1] "caffeine" "58-08-2"
#> [3] "Guaranine" "1,3,7-Trimethylxanthine"
#> [5] "Methyltheobromine" "Theine"
#> [7] "Thein" "Cafeina"
#> [9] "Caffein" "Cafipel"
if (!is.null(caffeine$Picture)) {
plot(caffeine)
}
# }
```
|