# Create a sample data frame with SMILES strings
df <- data.frame(
ID = c("Compound1", "Compound2", "Compound3"),
SMILES = c("C1=CC=CC=C1", "CCO", "CN1C=NC2=C1C(=O)N(C(=O)N2C)C")
)
df
## ID SMILES
## 1 Compound1 C1=CC=CC=C1
## 2 Compound2 CCO
## 3 Compound3 CN1C=NC2=C1C(=O)N(C(=O)N2C)C
dir_path <- "C:\\Users\\xut2\\Desktop\\"
write.table(df[, c("SMILES", "ID")], file = paste0(dir_path,Sys.Date(),"-","output.smi"), sep = "\t", col.names = FALSE, row.names = FALSE, quote = FALSE)
#ref https://bioconductor.org/packages/devel/bioc/vignettes/ChemmineR/inst/doc/ChemmineR.html