.. _section_example_oebio_splitmolcomplexfrags:

Split a Macro-molecular Complex Into Fragments
================================================================================

A program that extracts and filters components of a protein structure,
returning individual fragments.

An example command that returns just the ligands for all binding sites would be:

.. oe:language:: c++

   .. code-block:: console

      prompt> splitmolcomplexfrags -waterfilter nothing -proteinfilter nothing -bindingsitenum 0 input.pdb output.sdf

.. oe:language:: python

   .. code-block:: console

      prompt> python splitmolcomplexfrags.py -waterfilter nothing -proteinfilter nothing -bindingsitenum 0 input.pdb output.sdf

.. oe:language:: java

   .. code-block:: console

      prompt> SplitMolComplexFrags -waterfilter nothing -proteinfilter nothing -bindingsitenum 0 input.pdb output.sdf

.. oe:language:: csharp

   .. code-block:: console

      prompt> SplitMolComplexFrags -waterfilter nothing -proteinfilter nothing -bindingsitenum 0 input.pdb output.sdf

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

.. oe:language:: c++

   .. code-block:: console

      prompt> splitmolcomplexfrags --help all

.. oe:language:: python

   .. code-block:: console

      prompt> python splitmolcomplexfrags.py --help all

.. oe:language:: java

   .. code-block:: console

      prompt> SplitMolComplexFrags --help all

.. oe:language:: csharp

   .. code-block:: console

      prompt> SplitMolComplexFrags --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:`splitmolcomplexfrags.cpp <../../../../../sublibs/tklibs/bio/examples/splitmolcomplexfrags.cpp>`
         and
         :download:`splitmolcomplexfrags.txt <../../../../../sublibs/tklibs/bio/examples/splitmolcomplexfrags.txt>`
         interface file

   .. only:: oepdf

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

      with interface file

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

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

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

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

   .. only:: oepdf

      .. oe:source:: splitmolcomplexfrags.py
         :language: python

.. oe:language:: java

   .. only:: oehtml

      .. admonition:: Download code

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

   .. only:: oepdf

      .. oe:source:: SplitMolComplexFrags.java
         :language: java

      with interface file

      .. oe:source:: SplitMolComplexFrags.txt
         :language: java

.. oe:language:: csharp

   .. only:: oehtml

      .. admonition:: Download code

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

   .. only:: oepdf

      .. oe:source:: SplitMolComplexFrags.cs
         :language: csharp

.. seealso::

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