File: iload.molecules.Rd

package info (click to toggle)
r-cran-rcdk 3.8.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 888 kB
  • sloc: makefile: 14; sh: 13
file content (62 lines) | stat: -rwxr-xr-x 1,951 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/io.R
\name{iload.molecules}
\alias{iload.molecules}
\title{Load molecules using an iterator.}
\usage{
iload.molecules(
  molfile,
  type = "smi",
  aromaticity = TRUE,
  typing = TRUE,
  isotopes = TRUE,
  skip = TRUE
)
}
\arguments{
\item{molfile}{A string containing the filename to load. Must be a local file}

\item{type}{Indicates whether the input file is SMILES or SDF. Valid values are
`"smi"` or `"sdf"`}

\item{aromaticity}{If `TRUE` then aromaticity detection is
performed on all loaded molecules. If this fails for a given
molecule, then the molecule is set to `NA` in the return list}

\item{typing}{If `TRUE` then atom typing is
performed on all loaded molecules. The assigned types will be CDK
internal types. If this fails for a given molecule, then the molecule 
is set to `NA` in the return list}

\item{isotopes}{If `TRUE` then atoms are configured with isotopic masses}

\item{skip}{If `TRUE`, then the reader will continue reading even when 
faced with an invalid molecule. If `FALSE`, the reader will stop at 
the fist invalid molecule}
}
\description{
The CDK can read a variety of molecular structure formats. Some file
formats support multiple molecules in a single file. If read using
\code{\link{load.molecules}}, all are read into memory. For very large
structure files, this can lead to out of memory errors. Instead it is 
recommended to use the iterating version of the loader so that only a
single molecule is read at a time.
}
\details{
Note that the iterating loader only supports SDF and SMILES file formats.
}
\examples{
\dontrun{
moliter <- iload.molecules("big.sdf", type="sdf")
while(hasNext(moliter)) {
mol <- nextElem(moliter)
  print(get.property(mol, "cdk:Title"))
}
}
}
\seealso{
\code{\link{write.molecules}}, \code{\link{load.molecules}}, \code{\link{parse.smiles}}
}
\author{
Rajarshi Guha (\email{rajarshi.guha@gmail.com})
}