Generating 2D coordinates

A program that assigns 2D coordinates to molecule(s).

Command Line Interface

A description of the command line interface can be obtained by executing the program with the –help argument.

prompt> depict --help

will generate the following output:

Simple parameter list
input/output options :
   -in : Input filename
   -out : Output filename
   -ringdict : User-defined 2D ring dictionary

 prepare depiction options :
   -orientation : Set the preferred orientation of 2D coordinates
   -suppressH : Suppress explicit hydrogens of molecule(s)

Code

Download code

depict.cpp and depict.txt interface file

Example

prompt> depict .ism .mol

C(=O)N

will generate the following output:

  -OEChem-07031123462D

  3  2  0     0  0  0  0  0  0999 V2000
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.0000    0.0000    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
   -0.5000   -0.8660    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  2  0  0  0  0
  1  3  1  0  0  0  0
M  END

Note

The above program can generate 2D coordinates with user-defined 2D ring layouts when using the -ringdict parameter.

See also the 2D coordinate generation examples section of the OEChem TK manual that shows examples about how to generate and utilize user-defined ring dictionaries.