aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
Diffstat (limited to 'R')
-rw-r--r--R/chent.R1
-rw-r--r--R/zzz.R8
2 files changed, 3 insertions, 6 deletions
diff --git a/R/chent.R b/R/chent.R
index 6d18277..4375305 100644
--- a/R/chent.R
+++ b/R/chent.R
@@ -24,7 +24,6 @@
#' if (!is.null(caffeine$Picture)) {
#' plot(caffeine)
#' }
-
chent <- R6Class("chent",
public = list(
#' @field identifier (`character(1)`)\cr
diff --git a/R/zzz.R b/R/zzz.R
index 248f830..f18e559 100644
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -1,11 +1,9 @@
.onLoad = function(libname, pkgname) {
- rdkit_available <- FALSE
+ conf <- reticulate::py_discover_config("rdkit")
+ rdkit_available <- conf$available
rdkit_module <- try(
- reticulate::import("rdkit", delay_load = TRUE),
+ reticulate::import("rdkit"),
silent = TRUE)
- if (!inherits(rdkit_module, "try-error")) {
- rdkit_available <- TRUE
- }
assign('rdkit_available', rdkit_available, envir = topenv())
assign('rdkit_module', rdkit_module, envir = topenv())
}

Contact - Imprint