convertFormatFile {ChemmineOB} | R Documentation

## Convert Format of Files

### Description

Convert a file from one format to another

### Usage

    convertFormatFile(from, to, fromFile, toFile,options=data.frame(names="gen2D",args=""))

### Arguments

`from` | The format that `fromFile` is in. This should be a string supported by OpenBabel.
`to` | The format to convert `toFile` to.
`fromFile` | The name of the file to be converted
`toFile` | The name of the new file to be created or overwritten
`options` | This is a data frame listing OpenBabel Options that should be applied while converting each compound. The "names" column should be the name of each option and the "args" column sould be the arguments to the corresponding option. For example, the default value shown above will cause 2D coordinates to be generated from the input compound and saved in the output compound, assuming the ouptut format supports it. A full list of available options can be found by executing "obabel -L ops" at the command line. The current list is: 0xout <file.xxx> Additional file output AddInIndex Append input index to title AddPolarH Adds hydrogen to polar atoms only canonical Canonicalize the atom order energy ForceField Energy Evaluation (not displayed in GUI) fillUC <param> Fill the unit cell (strict or keepconnect) gen2D Generate 2D coordinates gen3D Generate 3D coordinates minimize ForceField Energy Minimization (not displayed in GUI) partialcharge <method> Calculate partial charges by specified method readconformer Adjacent conformers combined into a single molecule s Isomorphism filter(-s, -v options replacement)(not displayed in GUI) sort <desc> Sort by descriptor(~desc for reverse) unique [param] remove duplicates by descriptor;default inchi v Isomorphism filter(-s, -v options replacement)(not displayed in GUI)

### Value

No value is returned. `toFile` will be created with the compound in the new format.

### Author(s)

Kevin Horan

### References

OpenBabel http://openbabel.org

### See Also

`convertFormat`

### Examples

    	## Not run:
    		convertFormatFile("SMI","SDF","test.smiles","test.sdf")

    ## End(Not run)

[Package ChemmineOB version 1.30.0 Index]