\section{Residue  Class Reference}
\label{class_Residue}\index{Residue@{Residue}}
{\tt \#include $<$residue.h$>$}

Collaboration diagram for Residue:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=108pt]{class_Residue_coll_graph}
\end{center}
\end{figure}
\subsection*{Public Methods}
\begin{CompactItemize}
\item 
const int\& {\bf ID} () const
\begin{CompactList}\small\item\em need residue\_\-registry need to point to atoms need to have atoms point to residue.\item\end{CompactList}\item 
int\& {\bf ID} ()
\item 
const {\bf Dyn\-String}\& {\bf Type} () const
\item 
{\bf Dyn\-String}\& {\bf Type} ()
\item 
const {\bf Dyn\-String}\& {\bf Label} () const
\item 
{\bf Dyn\-String}\& {\bf Label} ()
\item 
const {\bf j\-Vector}\& {\bf operator $\ast$} () const
\item 
{\bf j\-Vector}\& {\bf operator $\ast$} ()
\item 
int {\bf Setup} ({\bf Molecule} \&Mol, int start\_\-atom, Residue $\ast$prev\_\-res\_\-in, Residue $\ast$next\_\-res\_\-in)
\item 
int {\bf Compare} (const Residue \&a) const
\item 
const {\bf Int\-Vec}\& {\bf Get\-Atom\-List} () const
\item 
const Residue\& {\bf operator=} (const Residue \&res)
\item 
int {\bf Output} (ostream \&os) const
\item 
int {\bf Input} (istream \&is)
\item 
int {\bf Output\-Binary} (ostream \&os) const
\item 
int {\bf Input\-Binary} (istream \&is)
\item 
void {\bf Copy} (const Residue \&res)
\item 
{\bf MAKECOMPARISONS\_\-WITH\_\-COMPARE} (Residue)
\item 
{\bf MAKE\_\-IO\_\-STREAM\_\-OPERATORS} (Residue)
\item 
{\bf MAKE\_\-BIN\_\-STREAM\_\-OPERATORS} (Residue)
\end{CompactItemize}
\subsection*{Private Methods}
\begin{CompactItemize}
\item 
{\bf Residue} (int identifier=UNINITIALIZED\_\-RES\_\-ID)
\item 
void {\bf Add\-Atom} ({\bf Molecule} \&Mol, int atom\_\-id, const {\bf Dyn\-String} \&atom\_\-type, const char $\ast$label\_\-end)
\item 
void {\bf Add\-Bond} ({\bf Molecule} \&Mol, int atom\_\-id1, int atom\_\-id2)
\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item 
int {\bf id}
\item 
int {\bf Type\_\-index}
\item 
{\bf Dyn\-String} {\bf label}
\item 
{\bf Dyn\-String} {\bf type}
\item 
int {\bf num\-Atoms}
\item 
int {\bf num\-Bonds}
\item 
{\bf Int\-Vec} {\bf A\_\-index}
\item 
int {\bf N\_\-chain\_\-atom}
\item 
int {\bf CA\_\-chain\_\-atom}
\item 
int {\bf O\_\-chain\_\-atom}
\item 
int {\bf C\_\-chain\_\-atom}
\item 
int {\bf CB\_\-chain\_\-atom}
\item 
Residue$\ast$ {\bf next\_\-res}
\item 
Residue$\ast$ {\bf prev\_\-res}
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf Molecule}
\item 
class {\bf Residue\-Registry}
\end{CompactItemize}


\subsection{Constructor \& Destructor Documentation}
\index{Residue@{Residue}!Residue@{Residue}}
\index{Residue@{Residue}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Residue::Residue (int {\em identifier} = UNINITIALIZED\_\-RES\_\-ID)\hspace{0.3cm}{\tt  [inline, private]}}\label{class_Residue_c0}




Definition at line 119 of file residue.h.\footnotesize\begin{verbatim}00119                                       {
00120   id=identifier;
00121   type.Clear();
00122   Type_index = UNINITIALIZED_RES_ID;
00123   label = "uninitialized residue";
00124   numAtoms = -1;
00125   numBonds = -1;
00126   N_chain_atom = UNINITIALIZED_ATOM_ID;
00127   CA_chain_atom = UNINITIALIZED_ATOM_ID;
00128   O_chain_atom = UNINITIALIZED_ATOM_ID;
00129   C_chain_atom = UNINITIALIZED_ATOM_ID;
00130   CB_chain_atom = UNINITIALIZED_ATOM_ID;
00131   next_res = 0;
00132   prev_res = 0;
00133   
00134 \end{verbatim}\normalsize 


\subsection{Member Function Documentation}
\index{Residue@{Residue}!AddAtom@{AddAtom}}
\index{AddAtom@{AddAtom}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Residue::Add\-Atom ({\bf Molecule} \& {\em Mol}, int {\em atom\_\-id}, const {\bf Dyn\-String} \& {\em atom\_\-type}, const char $\ast$ {\em label\_\-end})\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_c1}




Definition at line 13 of file residue.C.

Referenced by Setup().\footnotesize\begin{verbatim}00013                                                                                                     {
00014 
00015 
00016   DynString label = "A:";
00017   label += atom_id;
00018   label += " ";
00019   label += ResidueRegistry::code_3[Type_index];
00020   label += id;
00021   label += " ";
00022   label += label_end;
00023 
00024   //cerr << "residue.C:: Adding atom:"<< atom_id << " as " <<  label << endl;
00025   
00026   A_index.Append(atom_id);  
00027   AtomRegistry::SetType (Mol.A[atom_id],atom_type, label, id);
00028   
00029 \end{verbatim}\normalsize 
\index{Residue@{Residue}!AddBond@{AddBond}}
\index{AddBond@{AddBond}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Residue::Add\-Bond ({\bf Molecule} \& {\em Mol}, int {\em atom\_\-id1}, int {\em atom\_\-id2})\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_c2}




Definition at line 5 of file residue.C.

Referenced by Setup().\footnotesize\begin{verbatim}00005                                                                {
00006   //    cerr << "bonding " <<  Mol[atom_id1].Label() << "  TO  " << Mol[atom_id2].Label() <<endl;
00007   Mol[atom_id1].AddBond(atom_id2);
00008   Mol[atom_id2].AddBond(atom_id1);
00009   
00010 \end{verbatim}\normalsize 
\index{Residue@{Residue}!Compare@{Compare}}
\index{Compare@{Compare}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::Compare (const Residue \& {\em a}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_Residue_a9}




Definition at line 154 of file residue.h.\footnotesize\begin{verbatim}00155 { return (id-a.id); }
00156 \end{verbatim}\normalsize 
\index{Residue@{Residue}!Copy@{Copy}}
\index{Copy@{Copy}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Residue::Copy (const Residue \& {\em res})}\label{class_Residue_a16}




Definition at line 399 of file residue.C.

Referenced by operator=().\footnotesize\begin{verbatim}00399                                       {
00400 
00401   id = res.id;
00402   type = res.type;
00403   Type_index = res.Type_index;
00404   label = res.label;
00405   numAtoms = res.numAtoms;
00406   numBonds = res.numBonds;
00407   A_index = res.A_index;
00408   N_chain_atom = res.N_chain_atom;
00409   CA_chain_atom = res.CA_chain_atom;
00410   O_chain_atom = res.O_chain_atom;
00411   C_chain_atom = res.C_chain_atom;
00412   CB_chain_atom = res.CB_chain_atom;
00413   next_res = res.next_res;
00414   prev_res = res.prev_res;
00415 
00416 \end{verbatim}\normalsize 
\index{Residue@{Residue}!GetAtomList@{GetAtomList}}
\index{GetAtomList@{GetAtomList}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf Int\-Vec} \& Residue::Get\-Atom\-List () const\hspace{0.3cm}{\tt  [inline]}}\label{class_Residue_a10}




Definition at line 136 of file residue.h.\footnotesize\begin{verbatim}00137 {  return A_index; }
00138 \end{verbatim}\normalsize 
\index{Residue@{Residue}!ID@{ID}}
\index{ID@{ID}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int \& Residue::ID ()\hspace{0.3cm}{\tt  [inline]}}\label{class_Residue_a1}




Definition at line 141 of file residue.h.\footnotesize\begin{verbatim}00142 { return id; }
00143 \end{verbatim}\normalsize 
\index{Residue@{Residue}!ID@{ID}}
\index{ID@{ID}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const int \& Residue::ID () const\hspace{0.3cm}{\tt  [inline]}}\label{class_Residue_a0}


need residue\_\-registry need to point to atoms need to have atoms point to residue.



Definition at line 139 of file residue.h.

Referenced by Residue\-Registry::Set\-Type\_\-code\_\-1(), and Molecule::read\-Fasta().\footnotesize\begin{verbatim}00140 { return id; }
00141 \end{verbatim}\normalsize 
\index{Residue@{Residue}!Input@{Input}}
\index{Input@{Input}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::Input (istream \& {\em is})\hspace{0.3cm}{\tt  [inline]}}\label{class_Residue_a13}




Definition at line 161 of file residue.h.\footnotesize\begin{verbatim}00162 { is >> id ; return id; }
00163 \end{verbatim}\normalsize 
\index{Residue@{Residue}!InputBinary@{InputBinary}}
\index{InputBinary@{InputBinary}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::Input\-Binary (istream \& {\em is})\hspace{0.3cm}{\tt  [inline]}}\label{class_Residue_a15}




Definition at line 168 of file residue.h.\footnotesize\begin{verbatim}00169     { is >= id; is >= pos; return id; }
00170 \end{verbatim}\normalsize 
\index{Residue@{Residue}!Label@{Label}}
\index{Label@{Label}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Dyn\-String} \& Residue::Label ()\hspace{0.3cm}{\tt  [inline]}}\label{class_Residue_a5}




Definition at line 151 of file residue.h.\footnotesize\begin{verbatim}00152 { return label; }
00153 \end{verbatim}\normalsize 
\index{Residue@{Residue}!Label@{Label}}
\index{Label@{Label}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf Dyn\-String} \& Residue::Label () const\hspace{0.3cm}{\tt  [inline]}}\label{class_Residue_a4}




Definition at line 149 of file residue.h.

Referenced by Residue\-Registry::Set\-Type\_\-code\_\-1().\footnotesize\begin{verbatim}00150 { return label; }
00151 \end{verbatim}\normalsize 
\index{Residue@{Residue}!MAKECOMPARISONS_WITH_COMPARE@{MAKECOMPARISONS\_\-WITH\_\-COMPARE}}
\index{MAKECOMPARISONS_WITH_COMPARE@{MAKECOMPARISONS\_\-WITH\_\-COMPARE}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Residue::MAKECOMPARISONS\_\-WITH\_\-COMPARE (Residue)}\label{class_Residue_a17}


\index{Residue@{Residue}!MAKE_BIN_STREAM_OPERATORS@{MAKE\_\-BIN\_\-STREAM\_\-OPERATORS}}
\index{MAKE_BIN_STREAM_OPERATORS@{MAKE\_\-BIN\_\-STREAM\_\-OPERATORS}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Residue::MAKE\_\-BIN\_\-STREAM\_\-OPERATORS (Residue)}\label{class_Residue_a19}


\index{Residue@{Residue}!MAKE_IO_STREAM_OPERATORS@{MAKE\_\-IO\_\-STREAM\_\-OPERATORS}}
\index{MAKE_IO_STREAM_OPERATORS@{MAKE\_\-IO\_\-STREAM\_\-OPERATORS}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Residue::MAKE\_\-IO\_\-STREAM\_\-OPERATORS (Residue)}\label{class_Residue_a18}


\index{Residue@{Residue}!Output@{Output}}
\index{Output@{Output}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::Output (ostream \& {\em os}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_Residue_a12}




Definition at line 157 of file residue.h.\footnotesize\begin{verbatim}00158     { os << id << ' ' << pos; return id; }
00159 \end{verbatim}\normalsize 
\index{Residue@{Residue}!OutputBinary@{OutputBinary}}
\index{OutputBinary@{OutputBinary}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::Output\-Binary (ostream \& {\em os}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_Residue_a14}




Definition at line 164 of file residue.h.\footnotesize\begin{verbatim}00165     { os <= id; os <= pos; return id; }
00166 \end{verbatim}\normalsize 
\index{Residue@{Residue}!Setup@{Setup}}
\index{Setup@{Setup}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::Setup ({\bf Molecule} \& {\em Mol}, int {\em start\_\-atom}, Residue $\ast$ {\em prev\_\-res\_\-in}, Residue $\ast$ {\em next\_\-res\_\-in})}\label{class_Residue_a8}


sets up appropraite atoms in {\bf Molecule} {\rm (p.\,\pageref{class_Molecule})} adds bond information within atoms returns last atom handled+1 (the next unhandled atom), UNINITIALIZED\_\-ATOM\_\-ID on err 

Definition at line 31 of file residue.C.

Referenced by Molecule::read\-Fasta().\footnotesize\begin{verbatim}00031                                                                                            {
00032   A_index.Resize(0);
00033   
00034   next_res = next_res_in;
00035   prev_res = prev_res_in;
00036 
00037   DynString N_type_atom('N');
00038   DynString C_type_atom('C');
00039   DynString O_type_atom('O');
00040   DynString S_type_atom('S');
00041   
00042   
00043   if (Type_index >= 20) {
00044     AddAtom(Mol, start_atom+0, C_type_atom, "Dummy Carbon");
00045     N_chain_atom = CA_chain_atom = O_chain_atom = CA_chain_atom =
00046       CB_chain_atom = start_atom+0;
00047 
00048     // connect residues
00049     if (prev_res && prev_res->C_chain_atom >= 0)
00050       AddBond(Mol, prev_res->C_chain_atom, start_atom);
00051   
00052     // doing both to ensure connection in non ordered entry case
00053     if (next_res && next_res->N_chain_atom >= 0) 
00054       AddBond(Mol, start_atom+2, next_res->N_chain_atom);
00055     
00056   } else {
00057 
00058     // add the protein chain atoms
00059     AddAtom(Mol, start_atom+0, N_type_atom, "N_chain");
00060     N_chain_atom = start_atom+0;
00061 
00062     AddAtom(Mol, start_atom+1, C_type_atom, "CA_chain");
00063     CA_chain_atom = start_atom+1;
00064 
00065     AddAtom(Mol, start_atom+2, C_type_atom, "C_chain");
00066     C_chain_atom = start_atom+2;
00067 
00068     AddAtom(Mol, start_atom+3, O_type_atom, "O_chain");
00069     O_chain_atom = start_atom+3;
00070 
00071     CB_chain_atom = start_atom+4; // reset for Glycine
00072 
00073   
00074     // connect residues
00075     if (prev_res && prev_res->C_chain_atom >= 0)
00076       AddBond(Mol, prev_res->C_chain_atom, start_atom); // C(prev) -> N  
00077   
00078     // add the standard chain bonds
00079     AddBond(Mol, start_atom, start_atom+1); // N -> CA
00080     AddBond(Mol, start_atom+1, start_atom+2); // CA -> C
00081     AddBond(Mol, start_atom+2, start_atom+3); // C -> O
00082 
00083     // doing both to ensure connection in non ordered entry case
00084     if (next_res && next_res->N_chain_atom >= 0) 
00085       AddBond(Mol, start_atom+2, next_res->N_chain_atom); // C -> N(next)
00086 
00087   }
00088   
00089   // switch adds stoms and bonds approrpiate for each residue type
00090   // & fixes CB in glycine
00091   
00092   switch (Type_index){ // here we encode residue differences
00093 
00094     //         0   1   2   3   4   5   6   7   8
00095     //       " N   CA  C   O   CB ", /* ala */
00096     //       " N   CA  C   O   CB  SG ", /* cys */
00097     //       " N   CA  C   O   CB  CG  OD1 OD2", /* asp */
00098     //       " N   CA  C   O   CB  CG  CD  OE1 OE2", /* glu */
00099     //       " N   CA  C   O   CB  CG  CD1 CD2 CE1 CE2 CZ ", /* phe */
00100     //       " N   CA  C   O   C  ", /* gly */
00101 
00102     // 0   A  alanine
00103   case 0:
00104     AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom  
00105     AddBond(Mol, CA_chain_atom, CB_chain_atom);    
00106     break;
00107 
00108     // 1   C  cystine  
00109   case 1:
00110     AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00111     AddAtom(Mol, start_atom+5, S_type_atom, "SG");
00112     AddBond(Mol, CA_chain_atom, CB_chain_atom);
00113     AddBond(Mol, start_atom+5, CB_chain_atom);
00114     break;
00115 
00116     // 2   D  aspartate asp
00117   case 2:
00118     AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00119     AddAtom(Mol, start_atom+5, C_type_atom, "CG");  // C_gamma atom
00120     AddAtom(Mol, start_atom+6, O_type_atom, "OD1");  // O_delta1 atom
00121     AddAtom(Mol, start_atom+7, O_type_atom, "OD2");  // O_delta2 atom
00122     AddBond(Mol, CA_chain_atom, CB_chain_atom);
00123     AddBond(Mol, CB_chain_atom, start_atom+5);
00124     AddBond(Mol, start_atom+5, start_atom+6);
00125     AddBond(Mol, start_atom+5, start_atom+7);
00126 
00127     break;
00128     // 3   E  glutamate  
00129   case 3:
00130     AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00131     AddAtom(Mol, start_atom+5, C_type_atom, "CG");  // C_gamma atom
00132     AddAtom(Mol, start_atom+6, C_type_atom, "CD");  // C_delta atom
00133     AddAtom(Mol, start_atom+7, O_type_atom, "OE1");  // O_epsilon1 atom
00134     AddAtom(Mol, start_atom+8, O_type_atom, "OE2");  // O_epsilon2 atom
00135     AddBond(Mol, CA_chain_atom, CB_chain_atom);
00136     AddBond(Mol, CB_chain_atom, start_atom+5);
00137     AddBond(Mol, start_atom+5, start_atom+6);
00138     AddBond(Mol, start_atom+6, start_atom+7);
00139     AddBond(Mol, start_atom+6, start_atom+8);
00140     
00141     break;
00142     // 4   F  phenylalanine
00143   case 4:
00144     AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00145     AddAtom(Mol, start_atom+5, C_type_atom, "CG");  // C_gamma atom
00146     AddAtom(Mol, start_atom+6, C_type_atom, "CD1");  // C_delta atom
00147     AddAtom(Mol, start_atom+7, C_type_atom, "CD2");  // C_delta atom
00148     AddAtom(Mol, start_atom+8, C_type_atom, "CE1");  // C_epsilon atom
00149     AddAtom(Mol, start_atom+9, C_type_atom, "CE2");  // C_epsilon atom
00150     AddAtom(Mol, start_atom+10, C_type_atom, "CZ");  // C_zeta atom
00151     AddBond(Mol, CA_chain_atom, CB_chain_atom);
00152     AddBond(Mol, CB_chain_atom, start_atom+5);
00153     AddBond(Mol, start_atom+5, start_atom+6);
00154     AddBond(Mol, start_atom+5, start_atom+7);
00155     AddBond(Mol, start_atom+6, start_atom+8);
00156     AddBond(Mol, start_atom+7, start_atom+9);
00157     AddBond(Mol, start_atom+8, start_atom+10);
00158     AddBond(Mol, start_atom+9, start_atom+10);        
00159     
00160     break;
00161     // 5   G  glycine
00162   case 5:     
00163     CB_chain_atom = CA_chain_atom; // not perfect, but close.      
00164 
00165     break;
00166     
00167     //         0   1   2   3   4   5   6   7   8   9 
00168     //       " N   CA  C   O   CB  CG  ND1 CD2 CE1 NE2", /* his */
00169     //       " N   CA  C   O   CB  CG1 CG2 CD1", /* ile */
00170     //       " N   CA  C   O   CB  CG  CD  CE  NZ ", /* lys */
00171     //       " N   CA  C   O   CB  CG  CD1 CD2", /* leu */
00172 
00173     // 6   H  histidine
00174   case 6:
00175     AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00176     AddAtom(Mol, start_atom+5, C_type_atom, "CG");  // C_gamma atom
00177     AddAtom(Mol, start_atom+6, N_type_atom, "ND1");  // N_delta atom
00178     AddAtom(Mol, start_atom+7, C_type_atom, "CD2");  // C_delta atom
00179     AddAtom(Mol, start_atom+8, C_type_atom, "CE1");  // C_epsilon atom
00180     AddAtom(Mol, start_atom+9, N_type_atom, "NE2");  // N_epsilon atom
00181     AddBond(Mol, CA_chain_atom, CB_chain_atom);
00182     AddBond(Mol, CB_chain_atom, start_atom+5);
00183     AddBond(Mol, start_atom+5, start_atom+6);
00184     AddBond(Mol, start_atom+5, start_atom+7);
00185     AddBond(Mol, start_atom+6, start_atom+8);
00186     AddBond(Mol, start_atom+7, start_atom+9);
00187     AddBond(Mol, start_atom+8, start_atom+9);    
00188     break;
00189     
00190       // 7   I  isoleucine
00191   case 7:
00192     AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00193     AddAtom(Mol, start_atom+5, C_type_atom, "CG1");  // C_gamma atom
00194     AddAtom(Mol, start_atom+6, C_type_atom, "CG2");  // C_gamma atom
00195     AddAtom(Mol, start_atom+7, C_type_atom, "CD1");  // C_delta atom    
00196     AddBond(Mol, CA_chain_atom, CB_chain_atom);
00197     AddBond(Mol, CB_chain_atom, start_atom+5);
00198     AddBond(Mol, CB_chain_atom, start_atom+6);
00199     AddBond(Mol, start_atom+5, start_atom+7);        
00200     break;
00201     
00202       // 8   K  lysine
00203   case 8:
00204     AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00205     AddAtom(Mol, start_atom+5, C_type_atom, "CG");  // C_gamma atom
00206     AddAtom(Mol, start_atom+6, C_type_atom, "CD");  // C_delta atom
00207     AddAtom(Mol, start_atom+7, C_type_atom, "CE");  // C_epsilon atom
00208     AddAtom(Mol, start_atom+8, N_type_atom, "NZ");  // N_zeta atom
00209     AddBond(Mol, CA_chain_atom, CB_chain_atom);
00210     AddBond(Mol, CB_chain_atom, start_atom+5);
00211     AddBond(Mol, start_atom+5, start_atom+6);    
00212     AddBond(Mol, start_atom+6, start_atom+7);    
00213     AddBond(Mol, start_atom+7, start_atom+8);    
00214     break;
00215     
00216       // 9   L  leucine
00217   case 9:
00218     AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00219     AddAtom(Mol, start_atom+5, C_type_atom, "CG");  // C_gamma atom
00220     AddAtom(Mol, start_atom+6, C_type_atom, "CD1");  // C_delta1 atom
00221     AddAtom(Mol, start_atom+7, C_type_atom, "CD2");  // C_delta2 atom
00222     AddBond(Mol, CA_chain_atom, CB_chain_atom);
00223     AddBond(Mol, CB_chain_atom, start_atom+5);
00224     AddBond(Mol, start_atom+5, start_atom+6);    
00225     AddBond(Mol, start_atom+5, start_atom+7);    
00226     break;
00227     
00228     //       " N   CA  C   O   CB  CG  SD  CE ", /* met */
00229     //       " N   CA  C   O   CB  CG  OD1 ND2", /* asn */
00230       // 10  M  methionine
00231   case 10:
00232     AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00233     AddAtom(Mol, start_atom+5, C_type_atom, "CG");  // C_gamma atom
00234     AddAtom(Mol, start_atom+6, S_type_atom, "SD");  // sulphur
00235     AddAtom(Mol, start_atom+7, C_type_atom, "CE");  // C_epsilon atom
00236     AddBond(Mol, CA_chain_atom, CB_chain_atom);
00237     AddBond(Mol, CB_chain_atom, start_atom+5);
00238     AddBond(Mol, start_atom+5, start_atom+6);    
00239     AddBond(Mol, start_atom+6, start_atom+7);        
00240     break;
00241     
00242       // 11  N  asparagine  asn
00243   case 11:
00244     AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00245     AddAtom(Mol, start_atom+5, C_type_atom, "CG");  // C_gamma atom
00246     AddAtom(Mol, start_atom+6, O_type_atom, "OD1");  // O_delta1 atom
00247     AddAtom(Mol, start_atom+7, N_type_atom, "ND2");  // N_delta2 atom
00248     AddBond(Mol, CA_chain_atom, CB_chain_atom);
00249     AddBond(Mol, CB_chain_atom, start_atom+5);
00250     AddBond(Mol, start_atom+5, start_atom+6);    
00251     AddBond(Mol, start_atom+5, start_atom+7);    
00252     break;
00253       
00254       //         0   1   2   3   4   5   6   7   8   9 
00255       //       " N   CA  C   O   CB  CG  CD ", /* pro */
00256       //       " N   CA  C   O   CB  CG  CD  OE1 NE2", /* gln */
00257       //       " N   CA  C   O   CB  CG  CD  NE  CZ  NH1 NH2", /* arg */
00258       //       " N   CA  C   O   CB  OG ", /* ser */
00259       
00260       //  12  P  proline
00261   case 12:
00262         AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00263         AddAtom(Mol, start_atom+5, C_type_atom, "CG");  // C_gamma atom
00264         AddAtom(Mol, start_atom+6, C_type_atom, "CD");  // C_delta atom    
00265         AddBond(Mol, CA_chain_atom, CB_chain_atom);
00266         AddBond(Mol, CB_chain_atom, start_atom+5);
00267         AddBond(Mol, start_atom+5, start_atom+6);    
00268         AddBond(Mol, start_atom+6, N_chain_atom);    
00269         break;
00270         
00271       //  13  Q  glutamine
00272   case 13:
00273         AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00274         AddAtom(Mol, start_atom+5, C_type_atom, "CG");  // C_gamma atom
00275         AddAtom(Mol, start_atom+6, C_type_atom, "CD");  // C_delta atom
00276         AddAtom(Mol, start_atom+7, O_type_atom, "OE1");  // O_epsilon atom
00277         AddAtom(Mol, start_atom+8, N_type_atom, "NE2");  // N_epsilon atom
00278         AddBond(Mol, CA_chain_atom, CB_chain_atom);
00279         AddBond(Mol, CB_chain_atom, start_atom+5);
00280         AddBond(Mol, start_atom+5, start_atom+6);
00281         AddBond(Mol, start_atom+6, start_atom+7);
00282         AddBond(Mol, start_atom+6, start_atom+8);               
00283         break;
00284         
00285         //  14  R  arginine
00286   case 14:
00287         AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00288         AddAtom(Mol, start_atom+5, C_type_atom, "CG");  // C_gamma atom
00289         AddAtom(Mol, start_atom+6, C_type_atom, "CD");  // C_delta atom
00290         AddAtom(Mol, start_atom+7, N_type_atom, "NE2");  // N_epsilon atom
00291         AddAtom(Mol, start_atom+8, C_type_atom, "CZ");  // C_zeta atom
00292         AddAtom(Mol, start_atom+9, N_type_atom, "NH1");  
00293         AddAtom(Mol, start_atom+10, N_type_atom, "NH2"); 
00294         AddBond(Mol, CA_chain_atom, CB_chain_atom);
00295         AddBond(Mol, CB_chain_atom, start_atom+5);
00296         AddBond(Mol, start_atom+5, start_atom+6);
00297         AddBond(Mol, start_atom+6, start_atom+7);
00298         AddBond(Mol, start_atom+7, start_atom+8);               
00299         AddBond(Mol, start_atom+8, start_atom+9);               
00300         AddBond(Mol, start_atom+8, start_atom+10);
00301         break;
00302 
00303         //   15  S  serine
00304   case 15:
00305         AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00306         AddAtom(Mol, start_atom+5, O_type_atom, "OG");  // O_gamma atom
00307         AddBond(Mol, CA_chain_atom, CB_chain_atom);
00308         AddBond(Mol, CB_chain_atom, start_atom+5);
00309         break;
00310 
00311       //         0   1   2   3   4   5   6   7   8   9   10  11  12  13
00312       //       " N   CA  C   O   CB  OG1 CG2", /* thr */
00313       //       " N   CA  C   O   CB  CG1 CG2", /* val */
00314       //       " N   CA  C   O   CB  CG  CD1 CD2 NE1 CE2 CE3 CZ2 CZ3 CH2", /* trp */
00315       //       " N   CA  C   O   CB  CG  CD1 CD2 CE1 CE2 CZ  OH ", /* tyr */
00316 
00317       
00318       //  16  T  threonine
00319   case 16:
00320         AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00321         AddAtom(Mol, start_atom+5, O_type_atom, "OG1");  // O_gamma atom
00322         AddAtom(Mol, start_atom+6, C_type_atom, "CG2");  // C_gamma atom
00323         AddBond(Mol, CA_chain_atom, CB_chain_atom);
00324         AddBond(Mol, CB_chain_atom, start_atom+5);
00325         AddBond(Mol, CB_chain_atom, start_atom+6);
00326         break;
00327         
00328       //  17  V  valine
00329   case 17:
00330         AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00331         AddAtom(Mol, start_atom+5, C_type_atom, "CG1");  // C_gamma atom
00332         AddAtom(Mol, start_atom+6, C_type_atom, "CG2");  // C_gamma atom
00333         AddBond(Mol, CA_chain_atom, CB_chain_atom);
00334         AddBond(Mol, CB_chain_atom, start_atom+5);
00335         AddBond(Mol, CB_chain_atom, start_atom+6);      
00336         break;
00337         
00338       //   18  W  tryptophan
00339   case 18:
00340         AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00341         AddAtom(Mol, start_atom+5, C_type_atom, "CG");
00342         AddAtom(Mol, start_atom+6, C_type_atom, "CD1");
00343         AddAtom(Mol, start_atom+7, C_type_atom, "CD2");
00344         AddAtom(Mol, start_atom+8, N_type_atom, "NE1");
00345         AddAtom(Mol, start_atom+9, C_type_atom, "CE2");
00346         AddAtom(Mol, start_atom+10, C_type_atom, "CE3");
00347         AddAtom(Mol, start_atom+11, C_type_atom, "CZ2");
00348         AddAtom(Mol, start_atom+12, C_type_atom, "CZ3");
00349         AddAtom(Mol, start_atom+13, C_type_atom, "CH2");        
00350         
00351         AddBond(Mol, CA_chain_atom, CB_chain_atom);
00352         AddBond(Mol, CB_chain_atom, start_atom+5);
00353         AddBond(Mol, start_atom+5, start_atom+6);
00354         AddBond(Mol, start_atom+5, start_atom+7);
00355         AddBond(Mol, start_atom+6, start_atom+8);
00356         AddBond(Mol, start_atom+8, start_atom+10);
00357         AddBond(Mol, start_atom+7, start_atom+10);
00358         AddBond(Mol, start_atom+7, start_atom+9);
00359         AddBond(Mol, start_atom+10, start_atom+12);
00360         AddBond(Mol, start_atom+9, start_atom+11);
00361         AddBond(Mol, start_atom+11, start_atom+13);
00362         AddBond(Mol, start_atom+12, start_atom+13);             
00363         
00364         break;
00365       //   19  Y  tyrosine
00366   case 19:
00367         AddAtom(Mol, start_atom+4, C_type_atom, "CB");  // C_beta atom
00368         AddAtom(Mol, start_atom+5, C_type_atom, "CG");
00369         AddAtom(Mol, start_atom+6, C_type_atom, "CD1");
00370         AddAtom(Mol, start_atom+7, C_type_atom, "CD2");
00371         AddAtom(Mol, start_atom+8, C_type_atom, "CE1");
00372         AddAtom(Mol, start_atom+9, C_type_atom, "CE2");
00373         AddAtom(Mol, start_atom+10, C_type_atom, "CZ");
00374         AddAtom(Mol, start_atom+11, O_type_atom, "OH");
00375 
00376         AddBond(Mol, CA_chain_atom, CB_chain_atom);
00377         AddBond(Mol, CB_chain_atom, start_atom+5);
00378         AddBond(Mol, start_atom+5, start_atom+6);
00379         AddBond(Mol, start_atom+5, start_atom+7);       
00380         AddBond(Mol, start_atom+6, start_atom+8);
00381         AddBond(Mol, start_atom+7, start_atom+9);
00382         AddBond(Mol, start_atom+8, start_atom+10);
00383         AddBond(Mol, start_atom+9, start_atom+10);
00384         AddBond(Mol, start_atom+10, start_atom+11);
00385   
00386       break;
00387       //  20  X  Dummy
00388   case 20:
00389     // do nothing
00390       break;
00391   }
00392 \end{verbatim}\normalsize 
\index{Residue@{Residue}!Type@{Type}}
\index{Type@{Type}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Dyn\-String} \& Residue::Type ()\hspace{0.3cm}{\tt  [inline]}}\label{class_Residue_a3}




Definition at line 146 of file residue.h.\footnotesize\begin{verbatim}00147 { return type; }
00148 \end{verbatim}\normalsize 
\index{Residue@{Residue}!Type@{Type}}
\index{Type@{Type}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf Dyn\-String} \& Residue::Type () const\hspace{0.3cm}{\tt  [inline]}}\label{class_Residue_a2}




Definition at line 144 of file residue.h.

Referenced by Residue\-Registry::Set\-Type\_\-code\_\-1().\footnotesize\begin{verbatim}00145 { return type; }
00146 \end{verbatim}\normalsize 
\index{Residue@{Residue}!operator *@{operator $\ast$}}
\index{operator *@{operator $\ast$}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf j\-Vector}\& Residue::operator $\ast$ ()}\label{class_Residue_a7}


\index{Residue@{Residue}!operator *@{operator $\ast$}}
\index{operator *@{operator $\ast$}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf j\-Vector}\& Residue::operator $\ast$ () const}\label{class_Residue_a6}


\index{Residue@{Residue}!operator=@{operator=}}
\index{operator=@{operator=}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const Residue \& Residue::operator= (const Residue \& {\em res})}\label{class_Residue_a11}




Definition at line 396 of file residue.C.\footnotesize\begin{verbatim}00397   { Copy(res); return *this; }
00398 \end{verbatim}\normalsize 


\subsection{Friends And Related Function Documentation}
\index{Residue@{Residue}!Molecule@{Molecule}}
\index{Molecule@{Molecule}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}class Molecule\hspace{0.3cm}{\tt  [friend]}}\label{class_Residue_l0}




Definition at line 29 of file residue.h.\index{Residue@{Residue}!ResidueRegistry@{ResidueRegistry}}
\index{ResidueRegistry@{ResidueRegistry}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}class Residue\-Registry\hspace{0.3cm}{\tt  [friend]}}\label{class_Residue_l1}




Definition at line 30 of file residue.h.

\subsection{Member Data Documentation}
\index{Residue@{Residue}!A_index@{A\_\-index}}
\index{A_index@{A\_\-index}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Int\-Vec} Residue::A\_\-index\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o6}




Definition at line 102 of file residue.h.\index{Residue@{Residue}!CA_chain_atom@{CA\_\-chain\_\-atom}}
\index{CA_chain_atom@{CA\_\-chain\_\-atom}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::CA\_\-chain\_\-atom\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o8}




Definition at line 108 of file residue.h.\index{Residue@{Residue}!CB_chain_atom@{CB\_\-chain\_\-atom}}
\index{CB_chain_atom@{CB\_\-chain\_\-atom}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::CB\_\-chain\_\-atom\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o11}




Definition at line 111 of file residue.h.\index{Residue@{Residue}!C_chain_atom@{C\_\-chain\_\-atom}}
\index{C_chain_atom@{C\_\-chain\_\-atom}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::C\_\-chain\_\-atom\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o10}




Definition at line 110 of file residue.h.\index{Residue@{Residue}!N_chain_atom@{N\_\-chain\_\-atom}}
\index{N_chain_atom@{N\_\-chain\_\-atom}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::N\_\-chain\_\-atom\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o7}




Definition at line 107 of file residue.h.\index{Residue@{Residue}!O_chain_atom@{O\_\-chain\_\-atom}}
\index{O_chain_atom@{O\_\-chain\_\-atom}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::O\_\-chain\_\-atom\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o9}




Definition at line 109 of file residue.h.\index{Residue@{Residue}!Type_index@{Type\_\-index}}
\index{Type_index@{Type\_\-index}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::Type\_\-index\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o1}




Definition at line 94 of file residue.h.\index{Residue@{Residue}!id@{id}}
\index{id@{id}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::id\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o0}




Definition at line 91 of file residue.h.\index{Residue@{Residue}!label@{label}}
\index{label@{label}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Dyn\-String} Residue::label\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o2}




Definition at line 96 of file residue.h.\index{Residue@{Residue}!next_res@{next\_\-res}}
\index{next_res@{next\_\-res}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Residue $\ast$ Residue::next\_\-res\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o12}




Definition at line 113 of file residue.h.\index{Residue@{Residue}!numAtoms@{numAtoms}}
\index{numAtoms@{numAtoms}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::num\-Atoms\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o4}




Definition at line 99 of file residue.h.\index{Residue@{Residue}!numBonds@{numBonds}}
\index{numBonds@{numBonds}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Residue::num\-Bonds\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o5}




Definition at line 100 of file residue.h.\index{Residue@{Residue}!prev_res@{prev\_\-res}}
\index{prev_res@{prev\_\-res}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Residue $\ast$ Residue::prev\_\-res\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o13}




Definition at line 114 of file residue.h.\index{Residue@{Residue}!type@{type}}
\index{type@{type}!Residue@{Residue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Dyn\-String} Residue::type\hspace{0.3cm}{\tt  [private]}}\label{class_Residue_o3}




Definition at line 97 of file residue.h.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
{\bf residue.h}\item 
{\bf residue.C}\end{CompactItemize}
