Created
August 25, 2017 14:08
-
-
Save rajarshi/c1551b81cb29d8f3629305d149bff3bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(rcdk) | |
all_form <- expand.grid(C=1:5, N=0:5, O=0:5, H=0:50) | |
all_form <- all_form %>% | |
mutate(formula = paste0('C',C,'N',N,'O',O,'H',H)) | |
system.time(valid <- sapply(all_form$formula, function(x) isvalid.formula(get.formula(x)))) | |
table(valid) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment