3.1 Command Line Interface

A description of the command line interface can be obtained by executing mol2nam with no arguments.

prompt> mol2nam

will generate the following output:

mol2nam v1.8  Structure to Name Conversion
OpenEye Scientific Software, May 2008

usage:  mol2nam [options] <infile> [<outfile>]
        -iupac: Generate IUPAC200x-like names
        -cas: Generate Chemical Abstracts CAS-like names
        -traditional: Generate traditional common names
        -systematic: Generate fully systematic names
        -delim: Append name to title with delimiter
        -tag: Set name as SD data with tag

        -uk: Generate British spellings
        -de: Generate German compound names
        -es: Generate Spanish compound names
        -fr: Generate French compound names
        -it: Generate Italian compound names
        -ja: Generate Japanese compound names
        -nl: Generate Dutch compound names
        -pl: Generate Polish compound names
        -sv: Generate Swedish compound names

        -ascii: Encode using 7-bit ASCII
        -utf8: Encode using Unicode UTF-8
        -html: Encode using HTML
        -sjis: Encode using Shift-JIS
        -eucjp: Encode using EUC-JP

Command line options are distinguished from filenames by having a `-' prefix. Options can appear anywhere on the command line, i.e. before, after or in between filenames. When incompatible options are specified, the last one given on the command line takes effect.

The first file on the command line is assumed to be the input molecule file in any of a number of popular connection table formats. If no output file is specified, the program writes a name per line, for each connection table in the input file to standard output, stdout. If a second filename is specified, it treated as the output molecule files, and each of the input molecules is written to it, with the title of each record set to the assigned name.

A minus character may be used in place of the input filename to specify that the input is to be read from standard input, stdin, and in place of the output filename to specify that the output is to be written to standard output, stdout.

The file format of the input file is automatically determined from the file extension. The extensions .smi, .can and .ism may be used to specify SMILES format, .sdf, .mdl and .mol can be used to specify MDL connection table file formats, .sln for Sybyl line notation, .mol2 for Tripos .mol2 files, .pdb for PDB format files, etc...