From 1b58327278038a1111a88c521e6992c15e0b17ea Mon Sep 17 00:00:00 2001 From: Ranke Johannes Date: Mon, 5 Aug 2024 18:41:45 +0200 Subject: Set identifiers to NA if not initialized, add NEWS --- R/chent.R | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'R') diff --git a/R/chent.R b/R/chent.R index 60c42c4..6f77582 100644 --- a/R/chent.R +++ b/R/chent.R @@ -138,6 +138,21 @@ chent <- R6Class("chent", if (chyaml) { self$get_chyaml() } + + # Define main identifiers as NA if still not available + if (is.null(self$smiles)) { + self$smiles <- NA + attr(self$smiles, "source") <- "user" + } + if (is.null(self$inchikey)) { + self$inchikey<- NA + attr(self$inchikey, "source") <- "user" + } + if (is.null(self$mw)) { + self$mw<- NA + attr(self$mw, "source") <- "user" + } + invisible(self) }, -- cgit v1.2.1