.. _section_examples_summary_ringdict2pdf:

Generating 2D Ring Dictionary Report
================================================================================


A program that generate a multi-page PDF report of the 2D ring
dictionary.


Command Line Interface
--------------------------------------------------------------------------------

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

.. oe:language:: c++

   .. code-block:: console

      prompt> ringdict2pdf --help

.. oe:language:: python

   .. code-block:: console

      prompt> python ringdict2pdf.py --help

.. oe:language:: java

   .. code-block:: console

      prompt> java RingDict2PDF --help

.. oe:language:: csharp

   .. code-block:: console

      prompt> RingSict2PDF --help


Will generate the following output:

.. code-block:: console

    Simple parameter list
        input/output options :
          -out : Output filename
          -ringdict : Input ring dictionary filename

        report options :
          -colsperpage : Number of columns per page
          -pageheight : Page height
          -pageorientation : Page orientation
          -pagesize : Page size
          -pagewidth : Page width
          -rowsperpage : Number of rows per page


Code
--------------------------------------------------------------------------------

.. oe:language:: c++

   .. only:: oehtml

      .. admonition:: Download code

         :download:`ringdict2pdf.cpp <../../../../sublibs/tklibs/depict/examples/ringdict2pdf.cpp>`
         and
         :download:`ringdict2pdf.txt <../../../../sublibs/tklibs/depict/examples/ringdict2pdf.txt>`
         interface file

   .. only:: oepdf

      .. oe:source:: ringdict2pdf.cpp
         :language: c++

      with interface file

      .. oe:source:: ringdict2pdf.txt
         :language: c++

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

         :download:`ringdict2pdf.py <../../../../wrappers/python/examples/depict/ringdict2pdf.py>`

      .. literalinclude:: ../../../../wrappers/python/examples/depict/ringdict2pdf.py


   .. only:: oepdf

      .. oe:source:: ringdict2pdf.py
         :language: python


.. oe:language:: java

   .. only:: oehtml

      .. admonition:: Download code

         :download:`RingDict2PDF.java <../../../../wrappers/java/examples/openeye/examples/oedepict/RingDict2PDF.java>`
         and
         :download:`RingDict2PDF.txt <../../../../wrappers/java/examples/openeye/examples/oedepict/RingDict2PDF.txt>`
         interface file

   .. only:: oepdf

      .. oe:source:: RingDict2PDF.java
         :language: java

      with interface file

      .. oe:source:: RingDict2PDF.txt
         :language: java

.. oe:language:: csharp

   .. only:: oehtml

      .. admonition:: Download code

         :download:`RingDict2PDF.cs <../../../../wrappers/csharp/Csharp-Examples/OEDepict/RingDict2PDF.cs>`

   .. only:: oepdf

      .. oe:source:: RingDict2PDF.cs
         :language: csharp


.. seealso::

   * :ref:`section_example_oechem_2D_coordinate_generation` section in the **OEChem TK** manual

   * :ref:`OE2DRingDictionary <OEChem_OE2DRingDictionary>` class
   * :oe:func:`OEChem::OEIsValid2DRingDictionary` function
   * :oe:func:`OEDepict::OEWrite2DRingDictionaryReport` function

Example
--------------------------------------------------------------------------------

.. oe:language:: c++

   .. code-block:: console

      prompt> ringdict2pdf -ringdict rtd.oeb -out rtd.pdf

.. oe:language:: python

   .. code-block:: console

      prompt> python ringdict2pdf.py -ringdict rtd.oeb -out rtd.pdf

.. oe:language:: java

   .. code-block:: console

      prompt> java RingDict2PDF -ringdict rtd.oeb -out rtd.pdf

.. oe:language:: csharp

   .. code-block:: console

      prompt> RingDict2PDF -ringdict rtd.oeb -out rtd.pdf

will generate a multi-page PDF report similar to the one shown in
:ref:`Table: Example of ring dictionary report <table_OEWrite2DRingDictionaryReport_example>`.

.. _table_OEWrite2DRingDictionaryReport_example:

.. list-table:: **Example of ring dictionary report** (The pages are reduced here for visualization convenience)

   * - cover page
     - page 1
     - page 2

   * -  .. image:: images/rtd-example-report-1.*
     -  .. image:: images/rtd-example-report-2.*
     -  .. image:: images/rtd-example-report-3.*

.. seealso::

   * :ref:`OE2DRingDictionary <OEChem_OE2DRingDictionary>` class in the **OEChem TK** manual
   * :ref:`section_example_oechem_2D_coordinate_generation` section in the **OEChem TK** manual that shows examples
     about how to create and manipulate user-defined ring dictionaries.
