From 4e092707e70adac492b74197e6ceef5cdd09cc8d Mon Sep 17 00:00:00 2001
From: Johannes Ranke
# On Travis, we get a certificate validation error,
-# likely because the system (xenial) is so old,
-# therefore don't run this example on Travis
-if (Sys.getenv("TRAVIS") == "") {
-
-atr <- pai$new("atrazine")
-print(atr)
-if (!is.null(atr$Picture)) {
- plot(atr)
-}
-
-}
-#> BCPC:
-#> PubChem:
-#> Trying to get chemical information from RDKit using PubChem SMILES
+ atr <- pai$new("atrazine")
+#> Querying BCPC for atrazine ...
+#> Querying PubChem for inchikey MXWJVTOOROXGIU-UHFFFAOYSA-N ...
+#> Get chemical information from RDKit using PubChem SMILES
#> CCNC1=NC(=NC(=N1)Cl)NC(C)C
-
+print(atr)
#> <pai> with ISO common name $iso atrazine
#> <chent>
#> Identifier $identifier atrazine
@@ -210,8 +199,32 @@ and the reticulate package?
#> "CCNC1=NC(=NC(=N1)Cl)NC(C)C"
#> Molecular weight $mw: 215.7
#> PubChem synonyms (up to 10):
-#> [1] "atrazine" "1912-24-9" "Gesaprim" "Atranex" "Oleogesaprim"
-#> [6] "Atazinax" "Atrasine" "Chromozin" "Gesoprim" "Hungazin"
+#> [1] "atrazine" "1912-24-9" "Gesaprim" "Aatrex" "Atranex"
+#> [6] "Atrazin" "Oleogesaprim" "Atazinax" "Atrasine" "Chromozin"
+if (!is.null(atr$Picture)) {
+ plot(atr)
+}
+
+# We can also define pais that are not found on the BCPC site
+decanol <- pai$new("1-Decanol")
+#> Querying BCPC for 1-Decanol ...
+#> Common name 1-Decanol is not known at the BCPC compendium, trying PubChem
+#> Querying PubChem for name 1-Decanol ...
+#> Get chemical information from RDKit using PubChem SMILES
+#> CCCCCCCCCCO
+print(decanol)
+#> <pai> without ISO common name
+#> <chent>
+#> Identifier $identifier 1-Decanol
+#> InChI Key $inchikey MWKFXSUHUHTGQN-UHFFFAOYSA-N
+#> SMILES string $smiles:
+#> PubChem
+#> "CCCCCCCCCCO"
+#> Molecular weight $mw: 158.3
+#> PubChem synonyms (up to 10):
+#> [1] "1-DECANOL" "Decan-1-ol" "Decyl alcohol" "112-30-1"
+#> [5] "n-Decyl alcohol" "n-Decanol" "Capric alcohol" "Nonylcarbinol"
+#> [9] "Antak" "Royaltac"