.. _section_example_oechem_appendringdict:

Append 2D ring dictionary
================================================================================

A program that adds new ring layouts to a ring dictionary that can be plugged into
the 2D coordinates generation system.

.. note::

   If a ring template already exists in the dictionary then the new template
   will be ignored *i.e.* currently ring templates can not be overwritten in
   the :ref:`OE2DRingDictionary <OEChem_OE2DRingDictionary>` object.

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

.. oe:language:: c++

   .. only:: oehtml

      .. admonition:: Download code

         :download:`appendringdict.cpp <../../../../../sublibs/tklibs/oechem/examples/appendringdict.cpp>`

   .. only:: oepdf

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

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

         :download:`appendringdict.py <../../../../../wrappers/python/examples/oechem/appendringdict.py>`

      .. literalinclude:: ../../../../../wrappers/python/examples/oechem/appendringdict.py

   .. only:: oepdf

      .. oe:source:: appendringdict.py
         :language: python

.. oe:language:: java

   .. only:: oehtml

      .. admonition:: Download code

         :download:`AppendRingDict.java <../../../../../wrappers/java/examples/openeye/examples/oechem/AppendRingDict.java>`

   .. only:: oepdf

      .. oe:source:: AppendRingDict.java
         :language: java

.. oe:language:: csharp

   .. only:: oehtml

      .. admonition:: Download code

         :download:`AppendRingDict.cs <../../../../../wrappers/csharp/Csharp-Examples/OEChem/AppendRingDict.cs>`

   .. only:: oepdf

      .. oe:source:: AppendRingDict.cs
         :language: csharp

.. seealso::

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