.. _section_example_oechem_basicmolstyle:

Basic example of setting up an OE3DMolStyle on a molecule
================================================================================

A program that is an example for setting an :ref:`OE3DMolStyle <OEChem_OE3DMolStyle>` to a :ref:`OEMolBase <OEChem_OEMolBase>`. 
The style being apply will label and color atoms by element. The atoms will be displayed in ball and stick format. The 
protein structures will be displayed as ribbons and colored based off residue. Hydrogen visibility is set to polar, and 
the interaction style is set to Inter molecular hydrogen bonds.

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

.. oe:language:: c++

    .. code-block:: console

        prompt> basicStyle input.mol2 output.oeb.gz

.. oe:language:: python
    
   .. code-block:: console

      prompt> basicStyle.py input.oeb output.oeb


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

.. oe:language:: c++

    .. only:: oehtml

        .. admonition:: Download code

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

    .. only:: oepdf

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

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

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

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


   .. only:: oepdf

      .. oe:source:: basicStyle.py
         :language: python

.. seealso::

    * :ref:`OE3DMolStyle <OEChem_OE3DMolStyle>` class
    * :ref:`OEMolStyleColorer <OEChem_OEMolStyleColorer>` class