Learn R Programming

Rcpi (version 1.8.0)

convMolFormat: Chemical File Formats Conversion

Description

Chemical File Formats Conversion

Usage

convMolFormat(infile, outfile, from, to)

Arguments

infile
A character string. Indicating the input file location.
outfile
A character string. Indicating the output file location.
from
The format of infile. A character string supported by OpenBabel. See the note section for the supported formats.
to
The desired format of outfile. A character string supported by OpenBabel. See the note section for the supported formats.

Value

NULL

Details

This function converts between various chemical file formats via OpenBabel. The complete supported file format list could be found at http://openbabel.org/docs/dev/FileFormats/Overview.html.

Examples

Run this code

convMolFormat(infile = system.file('sysdata/OptAA3d.sdf', package = 'Rcpi'),
              outfile = 'aa.smi', from = 'sdf', to = 'smiles')  # SDF to SMILES
convMolFormat(infile = 'aa.smi', outfile = 'aa.mop',
              from = 'smiles', to = 'mop')  # SMILES to MOPAC Cartesian format

Run the code above in your browser using DataLab