.. include:: substitutions
.. include:: ../apps-substitutions

.. program:: aligngrid

.. _chapter_aligngrid:

***************
AlignGrid
***************

====================
Overview
====================

The **AlignGrid** utility aligns proteins with electron-density maps on a single reference.


=================
Example Commands
=================

.. code-block:: console

   > aligngrid -grid input.ccp4 -query protein1.pdb \
               -target protein2.pdb -out output.ccp4

Take the input grid in ccp4 format and protein.  Align protein1 to
protein2 and rotate and translate the input grid using the same
alignment outputting the result to *output.ccp4*.


====================
Command Line Help
====================

A description of the command line interface can be obtained by executing **AlignGrid**
with the `--help` option.

.. code-block:: console

   > aligngrid --help


will generate the following output:

::

  Help functions:
    aligngrid --help simple      : Get a list of simple parameters
    aligngrid --help all         : Get a complete list of parameters
    aligngrid --help <parameter> : Get detailed help on a parameter
    aligngrid --help html        : Create an html help file for this program

====================
Required Parameters
====================

.. option:: -grid

   Input density grid.  This is the grid that is to
   be rotated and translated into the new reference frame.

   [Aliases=**-density**]

.. option:: -out

   The output grid in any writable format.  These
   include **.ccp4**, **.map** and **.grd**

.. option:: -protein

   The query protein that corresponds to the input grid.

   [Aliases=**-query**]

.. option:: -target

   The target protein that the grid and query
   protein will be aligned toward.


====================
Optional Parameters
====================

.. option:: -outprot

   An optional file to output the query protein
   after it is translated and rotated into the new reference frame.

.. option:: -padding

   When writing out a **.grd** file, this
   indicates the added extents (in |Angstroms| around the protein when outputting the density.
   [Default=4.0]

   [Aliases=**-pad**]

.. option:: -scale

   The final map spacing in |Angstroms|.  [Default=1.0]

.. option:: -verbose

   Triggers copious logging output. [Default=false]

The allowed MTZ map types and the corresponding column conventions are
documented in :ref:`OESystem_OEReadMTZ` in the **OEChem TK** manual.

.. option:: -autoMTZ

   Automatically try to open the mtz file using the DELWT and
   FDELWT columns from REFMAC5 mtz files.

   See :ref:`OESystem::OEMTZMapType::Fdelwt <OESystem_OEMTZMapType_Fdelwt>` for the corresponding
   difference-map type in **OEChem TK**.

   [Default=true]

.. option:: -Fc <columnname>

   Column to use for Fc.  *Note, to load arbitrary columns, you can use the **-Fc**
   and **-Phic** columns and the **Fc** maptype.*

   [Default=FC]

.. option:: -Fdelwt <columnname>

   Column to use for Fdelwt or difference map amplitudes

   See :ref:`OESystem::OEMTZMapType::Fdelwt <OESystem_OEMTZMapType_Fdelwt>` in **OEChem TK** for map
   type details.

   [Default=DELFWT]

.. option:: -Fobs <columnname>

   Column to use for FObs.

   [Default=F]

   [Aliases=**-Fo**]

.. option:: -Phi <columnname>

   Column to use for Phi.

   [Default=PHI]

.. option:: -Fwt <columnname>

   Column to use for Fwt or regular map amplitudes.

   See :ref:`OESystem::OEMTZMapType::Fwt <OESystem_OEMTZMapType_Fwt>` in **OEChem TK** for map
   type details.

   [Default=FWT]

.. option:: -Phic <columnname>

   Column to use for Phic.

   [Default=PHIC]

.. option:: -Phidelwt <columnname>

   Column to use for Phdelwt or difference map phases.

   [Default=PHDELWT]


.. option:: -Phiwt <columnname>

   Column to use for Phwt or regular map phases.

   [Default=PHWT]

.. option:: -mtype

   The map type to use for fitting. Fo-Fc, Fc, 2Fo-Fc, 3Fo-Fc, Fwt,
               Fdelwt...

   See :ref:`OESystem_OEReadMTZ` for the full list of map types and
   their MTZ-column interpretation.

   [Default=Fdelwt]

