.. _section_example_oebio_splitmolcomplexlowlevel:

Splitting a Macro-molecular Complex Efficiently and Flexibly
================================================================================

A program that splits components of a protein structure,
returning separate *ligand, protein-complex, waters,*
and *other* molecules. This version uses the low-level API to fragment
and then combine selected components.

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

.. oe:language:: c++

   .. code-block:: console

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

.. oe:language:: python

   .. code-block:: console

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

.. oe:language:: java

   .. code-block:: console

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

.. oe:language:: csharp

   .. code-block:: console

      prompt> SplitMolComplexLowLevel -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> splitmolcomplexlowlevel --help all

.. oe:language:: python

   .. code-block:: console

      prompt> python splitmolcomplexlowlevel.py --help all

.. oe:language:: java

   .. code-block:: console

      prompt> SplitMolComplexLowLevel --help all

.. oe:language:: csharp

   .. code-block:: console

      prompt> SplitMolComplexLowLevel --help all

::

   splitmolcomplexlowlevel <inmol> [<outmol>]
   Complete parameter list
       Display options :
         -verbose : If true, show molecule titles and number of binding sites

       SplitMolComplex options :
         -bindingsitenum : Select this binding site
         -covalentbondtreatment : Covalent bond treatment
         -covalentcofactor : Split covalent cofactors
         -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:`splitmolcomplexlowlevel.cpp <../../../../../sublibs/tklibs/bio/examples/splitmolcomplexlowlevel.cpp>`
         and
         :download:`splitmolcomplexlowlevel.txt <../../../../../sublibs/tklibs/bio/examples/splitmolcomplexlowlevel.txt>`
         interface file

   .. only:: oepdf

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

      with interface file

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

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

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

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

   .. only:: oepdf

      .. oe:source:: splitmolcomplexlowlevel.py
         :language: python

.. oe:language:: java

   .. only:: oehtml

      .. admonition:: Download code

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

   .. only:: oepdf

      .. oe:source:: SplitMolComplexLowLevel.java
         :language: java

      with interface file

      .. oe:source:: SplitMolComplexLowLevel.txt
         :language: java

.. oe:language:: csharp

   .. only:: oehtml

      .. admonition:: Download code

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

   .. only:: oepdf

      .. oe:source:: SplitMolComplexLowLevel.cs
         :language: csharp

.. seealso::

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