.. _section_example_oechem_randomizeatoms:

Randomize atoms of molecules
================================================================================

A program that randomizes the order of the atoms within the molecule file. The
structure of the molecule is not changed.

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

.. oe:language:: c++

   .. code-block:: console

      prompt> randomizeatoms dbase.oeb.gz output.oeb.gz

.. oe:language:: python

   .. code-block:: console

      prompt> randomizeatoms.py dbase.oeb.gz output.oeb.gz

.. oe:language:: java

   .. code-block:: console

      prompt> RandomizeAtoms dbase.oeb.gz output.oeb.gz

.. oe:language:: csharp

   .. code-block:: console

      prompt> RandomizeAtoms dbase.oeb.gz output.oeb.gz

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

.. oe:language:: c++

   .. only:: oehtml

      .. admonition:: Download code

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

   .. only:: oepdf

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

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

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

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


   .. only:: oepdf

      .. oe:source:: randomizeatoms.py
         :language: python

.. oe:language:: java

   .. only:: oehtml

      .. admonition:: Download code

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

   .. only:: oepdf

      .. oe:source:: RandomizeAtoms.java
         :language: java

.. oe:language:: csharp

   .. only:: oehtml

      .. admonition:: Download code

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

   .. only:: oepdf

      .. oe:source:: RandomizeAtoms.cs
         :language: csharp

.. seealso::

   * :oe:func:`OEChem::OEScrambleMolecule` function
