.. _section_example_oebio_splitmolcomplex:

Splitting a Macro-molecular Complex
================================================================================

A program that splits components of a protein structure,
returning separate *ligand, protein-complex, waters,*
and *other* molecules.

An example command that limits the protein-complex output to just
the binding site residues would be:

.. oe:language:: c++

   .. code-block:: console

      prompt> splitmolcomplex -separateresidues input.pdb output.oeb.gz

.. oe:language:: python

   .. code-block:: console

      prompt> python splitmolcomplex.py -separateresidues input.pdb output.oeb.gz

.. oe:language:: java

   .. code-block:: console

      prompt> SplitMolComplex -separateresidues input.pdb output.oeb.gz

.. oe:language:: csharp

   .. code-block:: console

      prompt> SplitMolComplex -separateresidues input.pdb output.oeb.gz



Help is available for all the supported
:ref:`OESplitMolComplexOptions <OEBio_OESplitMolComplexOptions>` parameters:

.. oe:language:: c++

   .. code-block:: console

      prompt> splitmolcomplex --help all

.. oe:language:: python

   .. code-block:: console

      prompt> python splitmolcomplex.py --help all

.. oe:language:: java

   .. code-block:: console

      prompt> SplitMolComplex --help all

.. oe:language:: csharp

   .. code-block:: console

      prompt> SplitMolComplex --help all

::

   Complete parameter list
    Display options :
      -verbose : If true, return more verbose output

    SplitMolComplex options :
      -bindingsitenum : Select this binding site
      -covalentbondtreatment : Covalent bond treatment
      -covalentligand : Split covalent ligands
      -ligandfilter : Ligand filter category
      -ligandname : Ligand name
      -maxsitedistance : Maximum distance to be associated with the binding site
      -maxsurfacedistance : Maximum distance to be associated with the protein
                            surface
      -modelnum : Select this NMR model number
      -proteinfilter : Protein filter category
      -separateresidues : Separate individual residues before selection
      -surfacewaters : Select surface waters
      -waterfilter : Water filter category

    input/output options :
      -in : Input molecule (usually a pdb file)
      -out : Output molecule (usually an oeb)


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

.. oe:language:: c++

   .. only:: oehtml

      .. admonition:: Download code

         :download:`splitmolcomplex.cpp <../../../../../sublibs/tklibs/bio/examples/splitmolcomplex.cpp>`
         and
         :download:`splitmolcomplex.txt <../../../../../sublibs/tklibs/bio/examples/splitmolcomplex.txt>`
         interface file

   .. only:: oepdf

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

      with interface file

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

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

         :download:`splitmolcomplex.py <../../../../../wrappers/python/examples/bio/splitmolcomplex.py>`

      ..    literalinclude:: ../../../../../wrappers/python/examples/bio/splitmolcomplex.py

   .. only:: oepdf

      .. oe:source:: splitmolcomplex.py
         :language: python

.. oe:language:: java

   .. only:: oehtml

      .. admonition:: Download code

         :download:`SplitMolComplex.java <../../../../../wrappers/java/examples/openeye/examples/oebio/SplitMolComplex.java>`
         and
         :download:`SplitMolComplex.txt <../../../../../wrappers/java/examples/openeye/examples/oebio/SplitMolComplex.txt>`
         interface file

   .. only:: oepdf

      .. oe:source:: SplitMolComplex.java
         :language: java

      with interface file

      .. oe:source:: SplitMolComplex.txt
         :language: java

.. oe:language:: csharp

   .. only:: oehtml

      .. admonition:: Download code

         :download:`SplitMolComplex.cs <../../../../../wrappers/csharp/Csharp-Examples/OEBio/SplitMolComplex.cs>`

   .. only:: oepdf

      .. oe:source:: SplitMolComplex.cs
         :language: csharp

.. seealso::

   * :oe:func:`OEBio::OESplitMolComplex` function
   * :ref:`OESplitMolComplexOptions <OEBio_OESplitMolComplexOptions>` object
   * :oe:func:`OEBio::OEConfigureSplitMolComplexOptions` function
   * :oe:func:`OEBio::OESplitMolComplexSetup` function

