\newcommand{\CHAINScod}{{\tt modlib/CHAINS\_3.0\_40\_XN.cod}}
\newcommand{\CHAINSseq}{{\tt modlib/CHAINS\_all.seq}}
\newcommand{\CHAINSgrp}{{\tt modlib/CHAINS\_3.0\_40\_XN.grp}}

\section{Comparative protein modeling primer}\index{primer, modeling}
\label{SECTION:primer}

This section outlines all the stages in a comprehensive comparative modeling
session. In contrast, the tutorial section
(Section~\ref{SECTION:tutorial}) describes a hands-on example illustrating 
a very simple modeling case. Many ``frequently-asked-questions'' (FAQ)
are answered in Section~\ref{SECTION:faq}. An introductory, hands-on
primer to comparative modeling with several \MODELLER\ examples can 
be found in \citen{SanSalRev98}. With a convenient structure display and 
manipulation program, it should be possible to do even the difficult
modeling cases in only a few days. To find sample script files for all
the \MODELLER\ tasks discussed in this section, read file {\tt
examples/all-steps/README}. To obtain additional examples of \TOP\ scripts
using a certain command, explore the {\tt examples} directory, especially
the {\tt examples/commands} sub-directory.

\subsection{Finding structures and sequences related to the target sequence}\index{templates}

Before any modeling can begin, the sequences and segments with known
3D structures that are related to the sequence being modeled must be
found. This can be achieved by the \MODELLER\ \C{SEQUENCE\_SEARCH}
command. The search relies on a database of structures that are
representative \cite{SalPotYua95} 
of the whole Protein Data Bank (PDB) \cite{AboBerBry87,PDB2000}.
The PDB codes of these representative structures (about 3,000 codes) are 
listed in file \CHAINScod\ and their sequences are stored in file
\CHAINSseq, which includes approximately 16,000 sequences for 
all the unique non-model chains in PDB longer than 25 amino acid 
residues. The representative structures are likely to have less than 40\%
sequence identity to each other and the length difference that is
at least 30\% of the shorter chain or 30 amino acid residues, 
whichever is smaller. The codes of other known PDB
structures related to the representative structures at $>$40\%
sequence identity are listed in file \CHAINSgrp.
A sample \TOP\ script for searching by \C{SEQUENCE\_SEARCH} is in {\tt
examples/all-steps/search.top}.  Sequences related to the target are
identified by their Z-scores that are larger than 4 or 5 
(\logf\ file column {\tt SIGNIF}).

For more difficult modeling problems when \C{SEQUENCE\_SEARCH} does
not find any homologs, template matching or threading methods can be
used. Widely used programs for threading include 
\PROFIT \cite{FloBraLac95}, \THREADER \cite{JonTayTho92},
and the Web server of the David Eisenberg 
group at UCLA (\htmladdnormallink{{\tt http://www.mbi.\-ucla.edu/\-people/frsvr/frsvr}}
{http://www.mbi.ucla.edu/people/frsvr/frsvr.html}).

It may be beneficial to identify related sequences without known 3D 
structures at this stage. This is most conveniently achieved by 
PSI-BLAST \cite{AltMadScha97}. Using as many sequences as possible may 
improve the quality of the alignment prepared in the next two stages.


\subsection{Preparing an initial family alignment of all structures 
and sequences}\index{alignment}

The second stage is to prepare a multiple alignment of all the
structures and sequences in the family of interest. An initial
structural alignment of the structures can be obtained by the
\MODELLER's \C{MALIGN3D} command. A very robust protein structure alignment
program is CE \cite{ShiBou98}. It is usually better to include all the
structures related to the representative PDB structures, as listed in
the \CHAINSgrp\ file.  Using the \C{ALIGN2D}, \C{ALIGN} or \C{MALIGN} commands, 
the multiple structural alignment can then be aligned as one block with
all the related sequences. Unfortunately, in most cases, automatically
derived alignments have to be manually edited to optimize the quality
of the model derived from the alignment. This is the task for the next
stage.


\subsection{Becoming familiar with the family fold and improving the alignment}\index{alignment}
\label{SECTION:editalignment}

This is a very important stage because it may result in a
significantly improved model. It mostly involves visual inspection of
the superposed structures on a graphics terminal, using a program
such as \RASMOL\ (Roger Sayle, Glaxo, 
\htmladdnormallink{{\tt http://www.umass.edu/microbio/rasmol/}}
{http://www.umass.edu/microbio/rasmol/}), \QUANTA\ or \INSIGHT. However, 
the \C{CHECK\_ALIGNMENT} 
command of \MODELLER\ should also be used. You can obtain files with multiply
superposed structures by using the \K{MALIGN3D} command with
\K{WRITE\_FIT} set to \V{on} (you can use any alignment for
this purpose). The aim at this stage is to study the family fold, to
establish the relationships between various members of the family, and
to determine which regions are more conserved and which regions are
more variable.  This information is used to improve the initial
automatically derived alignment. For example, if necessary, gaps are
removed from helices and strands; they should be moved into those
exposed regions that show large variations in the family of known
structures and to the tips of loops. The role of disulfides and {\it
cis}-prolines, if any, is noted. \MODELLER\ will try to deal with
those two features automatically but it is prudent to be careful. It
has to be decided whether or not to build models for multi-subunit assemblies
and whether or not to include various ligands, such as water molecules,
cofactors, metal ions, inhibitors, or substrates. \QUANTA\ and
\INSIGHT\ have a set of tools that facilitate inspection and editing
of multiple alignments.

In order to obtain the best possible model, it is very important to
understand how the alignment is used by \MODELLER \cite{SalBlu93}. In outline, for 
the aligned regions, \MODELLER\ tries to derive a 3D model for the target
sequence that is as close to one or the other of the template structures as
possible while also satisfying stereochemical restraints (\eg, bond
lengths, angles, non-bonded atom contacts, \ldots); the inserted
regions, which do not have any equivalent segments in any of the
templates, are modeled in the context of the whole molecule, but using
their sequence alone. This way of deriving a model means that whenever
a user aligns a target residue with a template residue, he tells
\MODELLER\ to treat the aligned residues as {\bf structurally}
equivalent. 


\subsection{Selecting the templates}\index{templates}

The new improved alignment is input to the \C{ID\_TABLE} or
\C{COMPARE\_SEQUENCES} commands to construct a matrix of pairwise
sequence distances. This matrix is then used either to prepare an
`evolutionary' tree for the whole family or to cluster the proteins by
the principal components technique available through the
\C{PRINCIPAL\_COMPONENTS} command of \MODELLER. For evolutionary
trees, the \C{DENDROGRAM} command of \MODELLER\ or the \PHYLIP\ program 
written by Joe Felsenstein can be used
(you can get \PHYLIP\ by anonymous FTP from 
\htmladdnormallink{{\tt evolution.genetics.washington.edu/pub/phylip}}
{ftp://evolution.genetics.washington.edu/pub/phylip}) \cite{Fel85}. The clustering is
then examined to decide which known structures are suitable templates
for model building in the next stage. Usually, all significantly
different structures in the cluster that contains the target sequence
are used.  It is not always best to use all related 3D structures as
templates because the objective function may become too rugged,
sometimes resulting in sub-optimal solutions (\eg, six templates is a
large number of templates). It also does not make sense to include two
relatively similar templates solved at a high and low resolution; use
only the high resolution template.  Depending on the modeling problem
at hand, other factors can be considered in the selection of
templates, such as ligands bound to the template and/or target,
whether the template structure was solved in solution or in a crystal,
\etc.  Moreover, more experienced users can try to use a smaller
number of templates for mainchain distance restraints and a larger
number of templates for sidechain conformation, but that involves
editing the \TOP\ scripts for comparative modeling. Also,
templates can be very short, such as loops from unrelated protein 
structures that fit on the given framework regions; for example,
canonical loops \cite{ChoLes87} could be used as templates in modeling 
a complementarity determining region of an immunoglobulin. However,
\MODELLER's \abinitio\ loop modeling facility is the preferred way to 
model loops (Section~\ref{SECTION:loops}).

\subsection{Model building}

The alignment and the list of templates are used by \MODELLER\ to
derive several slightly different models automatically. 
This stage is straightforward and is described in the tutorial
(Section~\ref{SECTION:tutorial}).  However, do check the \logf\ file for
error messages by searching for the `{\tt \_E>}' string.  Usually,
the representative model is that which has the lowest value of the
molecular pdf. If the models are constructed by the standard
procedure, this value is reported in the \logf\ file as well as in the
\V{REMARK} record of the output PDB files with the models.

\subsection{Evaluating the models}\index{evaluation, model}

The model is evaluated internally and externally. The internal
self-consistency check is that the model has to satisfy most
restraints used to calculate it, especially the stereochemical
restraints.  If some restraints are grossly violated in all the models
it is likely that the alignment in the corresponding region is
incorrect.  The restraint violations are reported by the \C{ENERGY}
command and can be found at the end of the \logf\ file. External tests
include programs such as \PROCHECK\ by Roman Laskowski and Janet
Thornton (anonymous FTP at
\htmladdnormallink{{\tt ftp.biochem.ucl.ac.uk}}{ftp://ftp.biochem.ucl.ac.uk}) 
\cite{LasMcAMos93}, 
the EEF1 web server by Themis Lazaridis 
(\htmladdnormallink{{\tt http://mingus.sci.ccny.cuny.edu/server/}}
{http://mingus.sci.ccny.cuny.edu/server/}) 
and various 3D profile
tests including the {\sc Profile3D} program written in the David
Eisenberg group (e-mail \htmladdnormallink{{\tt david@uclaue.mbi.ucla.edu}}
{mailto:david@uclaue.mbi.ucla.edu}) \cite{LutBowEis92} and
{\sc ProsaII} written in the Manfred Sippl group (anonymous FTP at
\htmladdnormallink{{\tt gundi.came.sbg.ac.at}}{ftp://gundi.came.sbg.ac.at}) 
\cite{SipProsa93}. \QUANTA\ and \INSIGHT\ also offer various test options.

It is useful to compare the models among themselves because those
regions that are most variable are also likely to be most in error.
Another useful comparison is between the representative model and the
templates. Start by comparing the \Calpha\ traces, then continue with
the backbone comparison and finally include the sidechains.

The aim of evaluations is to determine whether or not the model is
acceptable. If it is not acceptable, that is if the current model
violates some restraints, fails the profile tests, or simply does not
appear satisfactory, these evaluations should help to re-align the
target sequence and the templates for the next cycle of modeling.  It
may also be that the model violates restraints because the optimizer
did not find a good optimum of the objective function. In such a case,
you could make the optimization more thorough using options to
the {\tt `model'} routine (Section~\ref{model-script}).


\subsection{Repeat the cycle}

The cycle of template selection, alignment, modeling, and evaluation 
should be repeated until the model is good enough or until no further 
improvement is possible.
