.. include:: ../substitutions

.. oe:namespace:: OEBio

.. meta::
   :keywords: OEGetAlignments

.. oe:function:: OEGetAlignments

   .. oe:language:: c++ java csharp

      .. oe:api::

         OESystem::OEIterBase<OEBio::OESequenceAlignment>* OEGetAlignments(OEChem::OEMolBase& mol1,
                                                                           OEChem::OEMolBase& mol2,
                                                                           unsigned int assume = OEAssumption::Default,
                                                                           unsigned int method = OESeqAlignmentMethod::PAM250,
                                                                           int gap = -10,
                                                                           int extend = -2,
                                                                           bool nonStdToX = false)

   .. oe:language:: python

      .. oe:api:: python

         OEGetAlignments(m1: Union[OEGraphMol,OEMol,OEQMol],
                         m2: Union[OEGraphMol,OEMol,OEQMol], assume: int,
                         method: int, gap: int = -10, extend: int = -2,
                         nonStdToX: bool = False) -> OESequenceAlignmentIter

   Returns an iterator over all pairwise chain alignments of two proteins. 
   The returned alignments are not sorted.

   **mol1, mol2**
     The two proteins of which alignment is being calculated.
     No 3D coordinates are required for sequence alignment; however, if the
     returned :ref:`OESequenceAlignment <OEBio_OESequenceAlignment>` is passed
     to :oe:func:`OEBio::OERMSD`, both molecules must have 3D coordinates assigned.

   **assume**
      A bitmask that indicates whether the algorithm can assume that the given proteins 
      have perceived residues, have PDB ordered atoms, or have bonded residues.
      See the :oe:constns:`OEBio::OEAssumption` namespace for more information.

   **method**
      This value has to be from the :oe:constns:`OEBio::OESeqAlignmentMethod`
      namespace and it defines the algorithm that is used to generate the 
      molecule alignment.

   **gap**, **extend**
      The gap and extension penalty to be used in the alignment.
      See also `Gap penalty <https://en.wikipedia.org/wiki/Gap_penalty>`_ in Wikipedia.

   **nonStdToX**
      Option to convert non-standard residues to an X, default is false.

   .. seealso::

      * :oe:func:`OEBio::OEGetAlignment` function
      * :oe:func:`OEBio::OEGetSimpleAlignment` function
      * :oe:func:`OEBio::OERMSD` function
