Read Molecules from SMILES Files and Return Parsed Java Molecular Object or Plain Text List
Source:R/504-readMolFromSmi.R
readMolFromSmi.Rd
Read Molecules from SMILES Files and Return Parsed Java Molecular Object or Plain Text List
Usage
readMolFromSmi(smifile, type = c("mol", "text"))
Arguments
- smifile
Character vector, containing SMILES file location(s).
- type
'mol'
or'text'
.'mol'
returns parsed Java molecular object, used for'text'
returns (plain-text) character string list. For common molecular descriptors and fingerprints, use'mol'
. For descriptors and fingerprints calculated by OpenBabel, i.e. functions namedextractDrugOB...()
, use'text'
.
Details
This function reads molecules from SMILES strings and return
parsed Java molecular object or plain text list
needed by extractDrug...()
functions.
See also
See readMolFromSDF
for reading molecules
from SDF files and returning parsed Java molecular object.
Examples
smi = system.file('vignettedata/FDAMDD.smi', package = 'Rcpi')
# \donttest{
mol1 = readMolFromSmi(smi, type = 'mol')
#> Error in parseSmiles(smi): The package "rcdk" is required to parse SMILES
mol2 = readMolFromSmi(smi, type = 'text')# }