-
The proposed refactoring to allow input of other chemical representations besides molfiles means that we have two categories of possible inputs that are pretty different. The mol format exists either as a text file on disk or as a "SDFset" S4 object in R when it gets read in by I don't think I've ever encountered an R function that accepts either a character vector or an R object or one that takes a character vector that could be a literal input but might be a file path. I'm not sure what the best way to handle this is. Some options:
calc_vol(input = "Clc(c(Cl)c(Cl)c1C(=O)O)c(Cl)c1Cl", from = "smiles")
calc_vol(input = "data/map00361/C16181.mol", from = "mol_path")
calc_vol(id_string = "Clc(c(Cl)c(Cl)c1C(=O)O)c(Cl)c1Cl", from = "smiles")
calc_vol(mol_path = "data/map00361/C16181.mol") We would still need
calc_vol_file("data/map00361/C16181.mol")
calc_vol_id("Clc(c(Cl)c(Cl)c1C(=O)O)c(Cl)c1Cl", from = "smiles") I think I like the first option best, personally, but I want to make sure I get user input on this. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
We could also make the user read in the .mol file and supply an SDFset object as input rather than a file path. This would be advantageous if people work with SDFset objects a lot in-memory so they wouldn't have to write them to a file before passing to |
Beta Was this translation helpful? Give feedback.
-
Because the only options in |
Beta Was this translation helpful? Give feedback.
Because the only options in
ChemmineR
are to read .mol or convert smiles (i.e. no InChI option), better to do this for the user and go with method 1.