From 4e092707e70adac492b74197e6ceef5cdd09cc8d Mon Sep 17 00:00:00 2001
From: Johannes Ranke
try_pubchem()Try to get chemical information from PubChem
chent$try_pubchem(query, from = "name")chent$try_pubchem(query = self$identifier, from = "name")caffeine <- chent$new("caffeine")
-#> PubChem:
-#> Trying to get chemical information from RDKit using PubChem SMILES
+#> 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>
@@ -813,11 +813,16 @@ or according to Freundlich
}
oct <- chent$new("1-octanol", smiles = "CCCCCCCCO", pubchem = FALSE)
-#> Trying to get chemical information from RDKit using user SMILES
+#> Get chemical information from RDKit using user SMILES
#> CCCCCCCCO
-#> Error in if (!is.na(self$mw)) { if (round(self$rdkit$mw, 1) != round(self$mw, 1)) { message("RDKit mw is ", self$rdkit$mw) message("mw is ", self$mw) }} else { self$mw <- self$rdkit$mw attr(self$mw, "source") <- "rdkit"}: argument is of length zero
print(oct)
-#> Error: object 'oct' not found
+#> <chent>
+#> Identifier $identifier 1-octanol
+#> InChI Key $inchikey NA
+#> SMILES string $smiles:
+#> user
+#> "CCCCCCCCO"
+#> Molecular weight $mw: 130.2