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

.. _fred_input:

.. program:: fred

=================
Input Preparation
=================

.. note ::

   It is not required to calculate the ligand charges and protein charges explicitly. The
   scoring functions do not utilize partial charges.

.. _fred_ligand_preparation:

Ligand Preparation
------------------

The most common use of :ref:`chapter_fred` is to dock a large collection of molecules into the
active site of a target protein.  For the purposes of this document, we'll call
the file(s) of molecules the database file(s), or dbase file(s).  The most
common format for database file(s) is a multi-conformer OEBinary file created
by OpenEye's **OMEGA** program, however, this file can be one of several 3D formats.
These formats include SDF, MOL2 and PDB. :ref:`chapter_fred` determines the database file
format from the file extension, :file:`.sdf` or :file:`.mol` for SDF,
:file:`.mol2` for MOL2, :file:`.pdb` or :file:`.ent` for PDB. Gzip compressed
files of these same formats are allowed as well. :ref:`chapter_fred` will interpret
:file:`infile.sdf.gz` as a gzip'ed SDF file.

.. note::

   Note that even though all these formats are supported, using SDF, PDB or MOL2
   can result in a loss of speed due to the I/O penalty of these formats.

:ref:`chapter_fred` has no provision for conversion of 1D/2D molecules to 3D. **The database
file(s) must be in a conformationally expanded 3D format**.  Within the OpenEye
tool chain the program OMEGA can be used to generate conformers.

By default :ref:`chapter_fred` will interpret conformers in the database file(s) as part of a
single multi-conformer molecule as long as they:

* Are contiguous in the input file.
* Have the same numbers of atoms and bonds in the same order
* Have identical atom and bond properties with their order
  correspondent in the subsequent connection table
* Have the same atom and bond stereochemistry

While this may appear to be a restrictive list, many programs write
multi-conformer molecules into SDF or MOL2 files such that the above rules
will be satisfied. If the conformers are named differently, (*i.e.* they
have a conformer number appended to the base name like acetsali_1,
acetsali_2), :ref:`chapter_fred` will still consider them part of a single multi-conformer
molecule if the criteria above are met.

.. _fred_receptor_preparation:

Receptor Preparation
--------------------

.. note::

  Beginning with :ref:`chapter_fred` 4.0.0,  :ref:`chapter_fred` now only accepts an OEDU with receptor as the
  receptor input file.

:ref:`chapter_fred` requires a single :ref:`receptor<receptor_theory>` to dock ligands
into.  The contents of a receptor are described in the
:ref:`receptor theory<receptor_theory>` section.  Receptors can be created with
the following programs

.. tabularcolumns:: |l|l|p{10cm}|

=======================================  ============  ==========================================
Program                                  Type          Description
=======================================  ============  ==========================================
:ref:`chapter_makereceptor`              GUI           Interactive GUI for creating a receptor.
---------------------------------------  ------------  ------------------------------------------
:ref:`ReceptorInDU`                      Command Line  Generates a receptor inside a prepared
                                                       OEDesignUnit in an OEDU file.
---------------------------------------  ------------  ------------------------------------------
:ref:`OEB2DUReceptor`                    Command Line  Converts a molecule based receptor OEB or
                                                       OEB.GZ file into a receptor inside
                                                       an OEDesignUnit, in an OEDU file
=======================================  ============  ==========================================

.. note::

   Receptors can also be created using the Docking Toolkit (see the Docking Toolkit
   documentation).
