.. _section_example_oechem_catmols:

Concatenating molecules
================================================================================

A program that takes an input molecule file (or files) and
concatenates all the molecules into a single molecule file.

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

.. oe:language:: c++

   .. code-block:: console

      prompt> catmols -i file1.oeb.gz file2.oeb.gz -o output.oeb.gz

.. oe:language:: python

   .. code-block:: console

      prompt> catmols.py -i file1.oeb.gz file2.oeb.gz -o output.oeb.gz

.. oe:language:: java

   .. code-block:: console

      prompt> CatMols -i file1.oeb.gz file2.oeb.gz -o output.oeb.gz

.. oe:language:: csharp

   .. code-block:: console

      prompt> CatMols -i file1.oeb.gz file2.oeb.gz -o output.oeb.gz


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

.. oe:language:: c++

   .. only:: oehtml

      .. admonition:: Download code

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

   .. only:: oepdf

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

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

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

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


   .. only:: oepdf

      .. oe:source:: catmols.py
         :language: python

.. oe:language:: java

   .. only:: oehtml

      .. admonition:: Download code

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

   .. only:: oepdf

      .. oe:source:: CatMols.java
         :language: java

.. oe:language:: csharp

   .. only:: oehtml

      .. admonition:: Download code

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

   .. only:: oepdf

      .. oe:source:: CatMols.cs
         :language: csharp

.. seealso::

  * :oe:func:`OEChem::OEAddMols` function
  * :oe:meth:`OESystem::OEInterface::GetList` method
