\section{Cycle\-All  Class Reference}
\label{class_CycleAll}\index{CycleAll@{Cycle\-All}}
{\tt \#include $<$cycle\_\-all.h$>$}

Inheritance diagram for Cycle\-All\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=56pt]{class_CycleAll_inherit_graph}
\end{center}
\end{figure}
Collaboration diagram for Cycle\-All:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=347pt]{class_CycleAll_coll_graph}
\end{center}
\end{figure}
\subsection*{Public Methods}
\begin{CompactItemize}
\item 
{\bf Cycle\-All} (const Cycle\-All \&ca)
\item 
{\bf Cycle\-All} ({\bf Constraint\-Manager} \&cm)
\item 
{\bf $\sim$Cycle\-All} ()
\item 
int {\bf run} ()
\end{CompactItemize}


\subsection{Detailed Description}
//////////////////////////////////////////////////////////

File: {\bf cycle\_\-all.h}

Created by: Jon Dugan

This is a 'job' that works in the GRAPE system. It touches each atom once and relaxes its position.

////////////////////////////////////////////////////////// 



Definition at line 21 of file cycle\_\-all.h.

\subsection{Constructor \& Destructor Documentation}
\index{CycleAll@{Cycle\-All}!CycleAll@{CycleAll}}
\index{CycleAll@{CycleAll}!CycleAll@{Cycle\-All}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Cycle\-All::Cycle\-All (const Cycle\-All \& {\em ca})}\label{class_CycleAll_a0}




Definition at line 5 of file cycle\_\-all.C.\footnotesize\begin{verbatim}00006   : SatisfyMolecule(*(ca.CM)){}
00007 \end{verbatim}\normalsize 
\index{CycleAll@{Cycle\-All}!CycleAll@{CycleAll}}
\index{CycleAll@{CycleAll}!CycleAll@{Cycle\-All}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Cycle\-All::Cycle\-All ({\bf Constraint\-Manager} \& {\em cm})}\label{class_CycleAll_a1}




Definition at line 9 of file cycle\_\-all.C.\footnotesize\begin{verbatim}00010   : SatisfyMolecule(cm)
00011   {
00012     // Create one child process for each atom in the molecule:
00013     numC = CM->numAtoms();
00014     Children = new Process*[numC];
00015 
00016     // Create a new relaxation process for every atom in the molecule:
00017     for(int i=0; i<numC; ++i)
00018       Children[i] = new gwRelaxAtom(*CM,i);
00019 
00020 \end{verbatim}\normalsize 
\index{CycleAll@{Cycle\-All}!~CycleAll@{$\sim$CycleAll}}
\index{~CycleAll@{$\sim$CycleAll}!CycleAll@{Cycle\-All}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Cycle\-All::$\sim$Cycle\-All ()}\label{class_CycleAll_a2}




Definition at line 22 of file cycle\_\-all.C.\footnotesize\begin{verbatim}00023   { 
00024     // Don't delete my children (since Process takes care of it).
00025     // i.e. dont do for(int i=0; i<numChildren; ++i) delete Children[i].
00026     // or delete[] Children.
00027 \end{verbatim}\normalsize 


\subsection{Member Function Documentation}
\index{CycleAll@{Cycle\-All}!run@{run}}
\index{run@{run}!CycleAll@{Cycle\-All}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Cycle\-All::run ()\hspace{0.3cm}{\tt  [virtual]}}\label{class_CycleAll_a3}


Execute this process. Returns the exit status of the process (0 is success, non-zero is error). 

Reimplemented from {\bf Process} {\rm (p.\,\pageref{class_Process_a1})}.

Definition at line 29 of file cycle\_\-all.C.\footnotesize\begin{verbatim}00029                   {
00030 #ifdef JOB_VERBOSE
00031   cerr << "Start: \tCycleAll::run()" << endl;
00032 #endif
00033 
00034     // save the largest current distance residual to statics
00035     CM->AbsDistResiduals(gwNumerics::MaxAbsDistRes,
00036                            gwNumerics::AveAbsDistRes);  
00037 
00038     // Force Envelope update next update
00039     CM->InvalidateEnvelope();
00040 
00041 
00042   
00043 #ifdef JOB_VERBOSE2
00044         cerr << setprecision(50) << "ORDER:  \t" << "MaxAbsDistRes = "<< gwNumerics::MaxAbsDistRes << endl;
00045 #endif
00046 
00047   
00048   //      if(*maxcyclerr<0.0001) break;
00049   if (gwNumerics::MaxAbsDistRes < 0.0001)
00050     return 1; // stop now
00051   
00052   // Compute the priorities of the children, based on their
00053   // residuals
00054   double tempPriority;
00055   for(int i=0; i<numC; ++i)
00056     {
00057       if (CM->constraintON(i)){
00058         tempPriority = CM->stress(i);
00059 
00060 #ifdef JOB_VERBOSE2
00061         cerr << setprecision(50) << "Set ORDER:  \t" << "Priority for atom " <<i<<"="<< tempPriority << endl;
00062 #endif
00063           
00064       Children[i]->setPriority(tempPriority);
00065 
00066       }
00067     }
00068   
00069   CM->resetMoved();
00070     
00071     // Queue all the children to run queue
00072   //        for(int i=0; i<numC; ++i)    {
00073         for(int i=numC-1; i>=0; i--)    {
00074           if (CM->constraintON(i))
00075             addChild(Children[i]);
00076     }
00077 \end{verbatim}\normalsize 


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