\section{Constraint  Class Reference}
\label{class_Constraint}\index{Constraint@{Constraint}}
{\tt \#include $<$constraint.h$>$}

Inheritance diagram for Constraint\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=272pt]{class_Constraint_inherit_graph}
\end{center}
\end{figure}
Collaboration diagram for Constraint:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=280pt]{class_Constraint_coll_graph}
\end{center}
\end{figure}
\subsection*{Public Methods}
\begin{CompactItemize}
\item 
virtual {\bf $\sim$Constraint} ()
\item 
int {\bf ID} () const
\begin{CompactList}\small\item\em Returns the id assigned by the {\bf Constraint\-Manager} {\rm (p.\,\pageref{class_ConstraintManager})}.\item\end{CompactList}\item 
{\bf Dyn\-String} {\bf Type} () const
\begin{CompactList}\small\item\em Returns the string type.\item\end{CompactList}\item 
int {\bf Int\-Type} () const
\begin{CompactList}\small\item\em Returns the string type.\item\end{CompactList}\item 
double {\bf stress} ()
\begin{CompactList}\small\item\em Returns how dissatisfied this constraint is with the current molecule (stored in the {\bf Constraint\-Manager} {\rm (p.\,\pageref{class_ConstraintManager})}).\item\end{CompactList}\item 
double {\bf stress} (int a, const {\bf j\-Vector} \&pos\_\-a) const
\item 
virtual {\bf j\-Vector} {\bf d\-Stress} (int k, const {\bf j\-Vector} \&pos\_\-a) const=0
\item 
const {\bf Int\-Vec}\& {\bf atom\-Support} () const
\begin{CompactList}\small\item\em Returns the id's of the atoms (wrt the constraint manager) this constraint uses to compute its {\bf stress}() {\rm (p.\,\pageref{class_Constraint_a4})}.\item\end{CompactList}\item 
const {\bf Int\-Vec}\& {\bf constraint\-Support} () const
\begin{CompactList}\small\item\em Returns the id's of the constraints this constraint uses to compute its {\bf stress}() {\rm (p.\,\pageref{class_Constraint_a4})}.\item\end{CompactList}\item 
int {\bf arity} () const
\begin{CompactList}\small\item\em The number of atoms and/or constraints this constraint uses to compute its {\bf stress}() {\rm (p.\,\pageref{class_Constraint_a4})}.\item\end{CompactList}\item 
{\bf MAKECOMPARISONS\_\-NO\_\-COMPARE} (Constraint)
\begin{CompactList}\small\item\em Give me all the comparison operators.\item\end{CompactList}\item 
virtual int {\bf Output} (ostream \&os) const
\item 
virtual int {\bf Input} (istream \&is)
\item 
virtual int {\bf Output\-Binary} (ostream \&os) const
\item 
virtual int {\bf Input\-Binary} (istream \&is)
\item 
{\bf MAKE\_\-IO\_\-STREAM\_\-OPERATORS} (Constraint)
\item 
{\bf MAKE\_\-BIN\_\-STREAM\_\-OPERATORS} (Constraint)
\item 
void {\bf set\-Manager} ({\bf Constraint\-Manager} \&cm)
\item 
const {\bf Molecule}\& {\bf get\-Molecule} () const
\item 
const {\bf Constraint\-Manager}\& {\bf get\-Manager} () const
\item 
bool {\bf is\-Off} () const
\begin{CompactList}\small\item\em Returns true if the constraint is off and is being ignored during molecular manipulations.\item\end{CompactList}\item 
virtual void {\bf switch\-Off} (bool to\_\-off=true)
\item 
bool {\bf is\-Valid} () const
\item 
virtual bool {\bf assert\-Validity} (bool validity)
\item 
virtual void {\bf add\-Atom\-Support} (int Id)
\item 
virtual void {\bf add\-Constraint\-Support} (int Id)
\item 
virtual double {\bf compute\-Stress} () const=0
\item 
virtual double {\bf compute\-Stress} (int a, const {\bf j\-Vector} \&pos\_\-a) const=0
\item 
virtual double {\bf compute\-Abs\-Res} () const
\item 
{\bf Dyn\-String} {\bf Label} () const
\end{CompactItemize}
\subsection*{Static Public Attributes}
\begin{CompactItemize}
\item 
{\bf Dyn\-String} {\bf Identifier} = "undefined"
\end{CompactItemize}
\subsection*{Protected Methods}
\begin{CompactItemize}
\item 
{\bf Constraint} ({\bf Constraint\-Manager} \&cm, const {\bf Int\-Vec} \&support\-AIndices={\bf Int\-Vec}(0),$\backslash$const {\bf Int\-Vec} \&support\-CIndices={\bf Int\-Vec}(0))
\item 
virtual void {\bf notify\-Off} (Constraint $\ast$child, bool to\_\-off=true)
\item 
virtual void {\bf notify\-Valid} (Constraint $\ast$child, bool validity)
\item 
virtual void {\bf notify\-Remove} ()
\begin{CompactList}\small\item\em I'm about to be removed from the constraint graph.\item\end{CompactList}\item 
virtual int {\bf Read} (istream \&is)=0
\item 
virtual int {\bf Read\-Binary} (istream \&is)=0
\begin{CompactList}\small\item\em Same scenerio as {\bf Read}() {\rm (p.\,\pageref{class_Constraint_b4})} only binary version.\item\end{CompactList}\item 
virtual void {\bf Pre\-Setup} (void)
\item 
virtual void {\bf Post\-Setup} (void)
\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf Constraint\-Manager}$\ast$ {\bf CM}
\item 
{\bf Int\-Vec} {\bf support\-A}
\item 
{\bf Int\-Vec} {\bf support\-C}
\item 
int {\bf my\-ID}
\item 
{\bf Dyn\-String} {\bf my\-Type}
\begin{CompactList}\small\item\em String representation of this constraint type.\item\end{CompactList}\item 
int {\bf my\-Int\-Type}
\begin{CompactList}\small\item\em Int representation of this constraint type.\item\end{CompactList}\item 
double {\bf cached}
\item 
bool {\bf valid}
\item 
bool {\bf off}
\item 
const {\bf j\-Vector} {\bf JVzero3}
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf Constraint\-Manager}
\item 
class {\bf Constraint\-Registry}
\end{CompactItemize}


\subsection{Constructor \& Destructor Documentation}
\index{Constraint@{Constraint}!~Constraint@{$\sim$Constraint}}
\index{~Constraint@{$\sim$Constraint}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Constraint::$\sim$Constraint ()\hspace{0.3cm}{\tt  [virtual]}}\label{class_Constraint_a0}




Definition at line 16 of file constraint.C.\footnotesize\begin{verbatim}00017   { CM=0; }
00018 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!Constraint@{Constraint}}
\index{Constraint@{Constraint}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Constraint::Constraint ({\bf Constraint\-Manager} \& {\em cm}, const {\bf Int\-Vec} \& {\em support\-AIndices} = {\bf Int\-Vec}(0), $\backslash$const {\bf Int\-Vec} \& {\em support\-CIndices} = {\bf Int\-Vec}(0))\hspace{0.3cm}{\tt  [protected]}}\label{class_Constraint_b0}


Must be constructed with a {\bf Constraint\-Manager} {\rm (p.\,\pageref{class_ConstraintManager})} (for consistency) and a list of indices specifying which atoms and/or constraints this  constraint needs to compute its stress function. 

\subsection{Member Function Documentation}
\index{Constraint@{Constraint}!ID@{ID}}
\index{ID@{ID}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Constraint::ID () const\hspace{0.3cm}{\tt  [inline]}}\label{class_Constraint_a1}


Returns the id assigned by the {\bf Constraint\-Manager} {\rm (p.\,\pageref{class_ConstraintManager})}.



Definition at line 41 of file constraint.h.

Referenced by Bin\-Envelope\-Constraint::Bin\-Envelope\-Constraint(), Atom\-Constraint::Compare(), Constraint\-Manager::Turn\-Envelope\-On(), notify\-Off(), and switch\-Off().\footnotesize\begin{verbatim}00041                  { return myID; }
00042 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!Input@{Input}}
\index{Input@{Input}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Constraint::Input (istream \& {\em is})\hspace{0.3cm}{\tt  [virtual]}}\label{class_Constraint_a12}




Definition at line 446 of file constraint.C.

Referenced by Envelope\-Constraint::Post\-Setup(), and Constraint\-Registry::read\-Constraints().\footnotesize\begin{verbatim}00447   {
00448     //    cerr << "Constratint Input Called" << endl;
00449     // Remove myself from the manager:
00450     CM->remove(*this);
00451 
00452     // Read my own data from the stream:
00453     int result = Read(is);
00454     // FIX may want to check result here -jd 0 means error result ~= number of reads done.
00455     
00456     // Setup any internal stuff the constraint needs to set up before
00457     // being logged with the constraint manager.
00458     PreSetup();
00459 
00460     // Add myself back to the manager.  ** ASSIGN an ID **
00461     CM->add(*this);
00462 
00463     PostSetup();
00464     
00465     // At this point this constraint should be "live" -- ready to go.
00466     // We need to add the existence of this constraint to the
00467     // constraint support of all the atoms in its own atom support.
00468 
00469     CM->makeDynamic();
00470     Constraint * c =0;
00471     for (int i = 0; i < supportA.Length(); i++){
00472       c = CM->dG->GetData(supportA[i]);
00474       c->addConstraintSupport(myID);
00475     }
00476 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!InputBinary@{InputBinary}}
\index{InputBinary@{InputBinary}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Constraint::Input\-Binary (istream \& {\em is})\hspace{0.3cm}{\tt  [virtual]}}\label{class_Constraint_a14}




Definition at line 481 of file constraint.C.\footnotesize\begin{verbatim}00482   {
00483     // Remove myself from the manager:
00484     CM->remove(*this);
00485 
00486     // Read myself in:
00487     
00488     int result = ReadBinary(is);
00489 
00490     // Setup any internal stuff the constraint wants to
00491     PreSetup();
00492     
00493     // Add myself back to the manager:
00494     CM->add(*this);
00495 
00496     PostSetup();
00497     
00498     return result;
00499 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!IntType@{IntType}}
\index{IntType@{IntType}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Constraint::Int\-Type () const\hspace{0.3cm}{\tt  [inline]}}\label{class_Constraint_a3}


Returns the string type.



Definition at line 47 of file constraint.h.

Referenced by Constraint\-Manager::Abs\-Dist\-Residuals().\footnotesize\begin{verbatim}00047                       {return myIntType;}
00048 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!Label@{Label}}
\index{Label@{Label}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Dyn\-String} Constraint::Label () const}\label{class_Constraint_a29}




Definition at line 416 of file constraint.C.\footnotesize\begin{verbatim}00416                                   {
00417   return myType + " " + myID;
00418 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!MAKECOMPARISONS_NO_COMPARE@{MAKECOMPARISONS\_\-NO\_\-COMPARE}}
\index{MAKECOMPARISONS_NO_COMPARE@{MAKECOMPARISONS\_\-NO\_\-COMPARE}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Constraint::MAKECOMPARISONS\_\-NO\_\-COMPARE (Constraint)}\label{class_Constraint_a10}


Give me all the comparison operators.

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


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


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




Reimplemented in {\bf Atom\-Constraint} {\rm (p.\,\pageref{class_AtomConstraint_a8})}, {\bf Bin\-Envelope\-Constraint} {\rm (p.\,\pageref{class_BinEnvelopeConstraint_a5})}, {\bf Distance\-Constraint} {\rm (p.\,\pageref{class_DistanceConstraint_a6})}, {\bf Envelope\-Constraint} {\rm (p.\,\pageref{class_EnvelopeConstraint_a7})}, and {\bf Position\-Constraint} {\rm (p.\,\pageref{class_PositionConstraint_a6})}.

Definition at line 99 of file constraint.h.\footnotesize\begin{verbatim}00100        { os << Constraint::Identifier << supportA << ',' << supportC; return support; }
00101 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!OutputBinary@{OutputBinary}}
\index{OutputBinary@{OutputBinary}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Constraint::Output\-Binary (ostream \& {\em os}) const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{class_Constraint_a13}




Reimplemented in {\bf Atom\-Constraint} {\rm (p.\,\pageref{class_AtomConstraint_a9})}, {\bf Bin\-Envelope\-Constraint} {\rm (p.\,\pageref{class_BinEnvelopeConstraint_a6})}, {\bf Distance\-Constraint} {\rm (p.\,\pageref{class_DistanceConstraint_a7})}, {\bf Envelope\-Constraint} {\rm (p.\,\pageref{class_EnvelopeConstraint_a8})}, and {\bf Position\-Constraint} {\rm (p.\,\pageref{class_PositionConstraint_a7})}.

Definition at line 112 of file constraint.h.\footnotesize\begin{verbatim}00113     { return 0; }
00114 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!PostSetup@{PostSetup}}
\index{PostSetup@{PostSetup}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Constraint::Post\-Setup (void)\hspace{0.3cm}{\tt  [inline, protected, virtual]}}\label{class_Constraint_b7}


constraints get their ID when added to the constraint graph. this addition is done in the Input function between the pre- and post setup functions. constraint setup that needs to occur with an ID and an added constraint go in post setup. (like adding parent constraints, etc.) 

Reimplemented in {\bf Bin\-Envelope\-Constraint} {\rm (p.\,\pageref{class_BinEnvelopeConstraint_b5})}, and {\bf Envelope\-Constraint} {\rm (p.\,\pageref{class_EnvelopeConstraint_a22})}.

Definition at line 284 of file constraint.h.

Referenced by Input(), and Input\-Binary().\footnotesize\begin{verbatim}00284                               {}
00285 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!PreSetup@{PreSetup}}
\index{PreSetup@{PreSetup}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Constraint::Pre\-Setup (void)\hspace{0.3cm}{\tt  [inline, protected, virtual]}}\label{class_Constraint_b6}


The setup function is called if the uninialized constraint method is used to create the constraint to allow different data representations within the constraint. Without this, only data read in from the input file will be available to the member functions. For simple constraints, this is really not very useful. However for multi-atom constraints that need to be a little 'smarter' about data representations, the Setup function will be helpful. 

Reimplemented in {\bf Bin\-Envelope\-Constraint} {\rm (p.\,\pageref{class_BinEnvelopeConstraint_b4})}, {\bf Distance\-Constraint} {\rm (p.\,\pageref{class_DistanceConstraint_b5})}, {\bf Envelope\-Constraint} {\rm (p.\,\pageref{class_EnvelopeConstraint_a21})}, and {\bf Position\-Constraint} {\rm (p.\,\pageref{class_PositionConstraint_b4})}.

Definition at line 275 of file constraint.h.

Referenced by Input(), and Input\-Binary().\footnotesize\begin{verbatim}00275                              {}
00276 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!Read@{Read}}
\index{Read@{Read}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Constraint::Read (istream \& {\em is})\hspace{0.3cm}{\tt  [protected, pure virtual]}}\label{class_Constraint_b4}


Derived classes need to define here how to read  themselves in. Notice that the base class defines {\bf Input}() {\rm (p.\,\pageref{class_Constraint_a12})} as a wrapper around this virtual function. Subclasses should typically overwrite just the {\bf Read}() {\rm (p.\,\pageref{class_Constraint_b4})} function (and not the {\bf Input}() {\rm (p.\,\pageref{class_Constraint_a12})} function).

In the {\bf Read}() {\rm (p.\,\pageref{class_Constraint_b4})} function, the derived class should $\ast$not$\ast$ log itself with the constraint manager since this is taken care of in the base classes {\bf Input}() {\rm (p.\,\pageref{class_Constraint_a12})} function. 

Reimplemented in {\bf Atom\-Constraint} {\rm (p.\,\pageref{class_AtomConstraint_b0})}, {\bf Bin\-Envelope\-Constraint} {\rm (p.\,\pageref{class_BinEnvelopeConstraint_b2})}, {\bf Distance\-Constraint} {\rm (p.\,\pageref{class_DistanceConstraint_b3})}, {\bf Envelope\-Constraint} {\rm (p.\,\pageref{class_EnvelopeConstraint_a18})}, and {\bf Position\-Constraint} {\rm (p.\,\pageref{class_PositionConstraint_b2})}.

Referenced by Input().\index{Constraint@{Constraint}!ReadBinary@{ReadBinary}}
\index{ReadBinary@{ReadBinary}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Constraint::Read\-Binary (istream \& {\em is})\hspace{0.3cm}{\tt  [protected, pure virtual]}}\label{class_Constraint_b5}


Same scenerio as {\bf Read}() {\rm (p.\,\pageref{class_Constraint_b4})} only binary version.



Reimplemented in {\bf Atom\-Constraint} {\rm (p.\,\pageref{class_AtomConstraint_b1})}, {\bf Bin\-Envelope\-Constraint} {\rm (p.\,\pageref{class_BinEnvelopeConstraint_b3})}, {\bf Distance\-Constraint} {\rm (p.\,\pageref{class_DistanceConstraint_b4})}, {\bf Envelope\-Constraint} {\rm (p.\,\pageref{class_EnvelopeConstraint_a19})}, and {\bf Position\-Constraint} {\rm (p.\,\pageref{class_PositionConstraint_b3})}.

Referenced by Input\-Binary().\index{Constraint@{Constraint}!Type@{Type}}
\index{Type@{Type}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Dyn\-String} Constraint::Type () const\hspace{0.3cm}{\tt  [inline]}}\label{class_Constraint_a2}


Returns the string type.



Definition at line 44 of file constraint.h.

Referenced by switch\-Off().\footnotesize\begin{verbatim}00044                          {return myType;}
00045 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!addAtomSupport@{addAtomSupport}}
\index{addAtomSupport@{addAtomSupport}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Constraint::add\-Atom\-Support (int {\em Id})\hspace{0.3cm}{\tt  [virtual]}}\label{class_Constraint_a24}


adds an Id to support\-A' ; checks to make sure that the Id is not already in the list. 

Definition at line 420 of file constraint.C.\footnotesize\begin{verbatim}00420                                      {
00421   if (myID != UNINITIALIZED_CONSTRAINT_ID) {
00422     // I am already in graph, need to add edge:
00423     CM->dG->AddEdge(this, CM->dG->GetData(Id));
00424     
00425     printf ("Constraint::addAtomSupport-> added atom support from constraint %d to %d\n SHOULD THIS OCCUR?", myID, Id );
00426     
00427   }
00428 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!addConstraintSupport@{addConstraintSupport}}
\index{addConstraintSupport@{addConstraintSupport}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Constraint::add\-Constraint\-Support (int {\em Id})\hspace{0.3cm}{\tt  [virtual]}}\label{class_Constraint_a25}


adds an Id to support\-C' ; checks to make sure that the Id is not already in the list. 

Definition at line 433 of file constraint.C.

Referenced by Input(), and Bin\-Envelope\-Constraint::Pre\-Setup().\footnotesize\begin{verbatim}00433                                            {
00434   if (myID != UNINITIALIZED_CONSTRAINT_ID) {    
00435     // I am already in graph, need to add edge:
00436     CM->dG->AddEdge(this, CM->dG->GetData(Id));
00437 
00438     //    printf ("Constraint::addConstraintSupport-> added constraint support from constraint %d to %d\n", myID, Id );
00439 
00440   }
00441 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!arity@{arity}}
\index{arity@{arity}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Constraint::arity () const\hspace{0.3cm}{\tt  [inline]}}\label{class_Constraint_a9}


The number of atoms and/or constraints this constraint uses to compute its {\bf stress}() {\rm (p.\,\pageref{class_Constraint_a4})}.



Definition at line 93 of file constraint.h.

Referenced by Output().\footnotesize\begin{verbatim}00093                     { return supportA.Length() + supportC.Length(); }
00094 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!assertValidity@{assertValidity}}
\index{assertValidity@{assertValidity}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Constraint::assert\-Validity (bool {\em validity})\hspace{0.3cm}{\tt  [virtual]}}\label{class_Constraint_a23}


If validity' is true, the constraint is guaranteed to have the correct stress value cached. It will first make sure its supports are valid by calling assert\-Validity(true) on them (if they're constraints as well). If validity' is false, it notifies its parents that it has been invalidated. The next call to {\bf stress}() {\rm (p.\,\pageref{class_Constraint_a4})} will force a recomputation of the cached value. Returns true if the constraint is valid after the call and false if it is invalid. (!!!) This function writes the cached value from the output of compute\-Stress 

Definition at line 305 of file constraint.C.

Referenced by Constraint\-Manager::Invalidate\-Atoms(), Constraint\-Manager::Invalidate\-Envelope(), notify\-Off(), notify\-Valid(), Constraint\-Manager::set\-Molecule(), Constraint\-Manager::set\-Position(), stress(), and switch\-Off().\footnotesize\begin{verbatim}00306 {
00307   // There is no way to become valid since I'm sleeping.
00308   if(off) {
00309 #ifdef NOISY_CONSTRAINTS
00310     cerr  << "assertValidity:  " << myID <<"(" << myType
00311           <<").  I'm off -- cannot change valid flag " << endl;
00312 #endif
00313     
00314     return false;
00315   }
00316     // We agree.
00317   if(valid == validity){
00318 
00319 #ifdef NOISY_CONSTRAINTS
00320     cerr  << "assertValidity:  " << myID <<"(" << myType
00321           <<") -- my valid flag is already "<< validity << endl;
00322 #endif
00323 
00324     return valid;
00325   }
00326   
00327     //
00328     // We disagree. Valid flag will change.
00329     //
00330 
00331     // I'm supposed to validate myself; i.e. recompute my stress with valid
00332     // supports.  I need to make sure all the supports are valid first.
00333     // 
00334   Constraint * child =0;
00335   if(validity)
00336     {
00337       for(int i=0; i<supportC.Length(); ++i)
00338         {
00339           child = CM->getConstraint(supportC[i]);
00340           if (! child->isOff()){
00341 #ifdef NOISY_CONSTRAINTS
00342             cerr  << "assertValidity:  " << myID <<"(" << myType
00343                   <<"). I'm trying to validate my supports => now I call assertValidity on " << child->myID
00344                   <<"(" << child->myType << ")" << endl;
00345 #endif
00346             if(child->assertValidity(true) == false){
00347 #ifdef NOISY_CONSTRAINTS
00348               cerr << endl << child->myID << " cannot be made valid. " ; 
00349 #endif
00350               return false;
00351             } //make child valid
00352           } // if child is on
00353         } // over all child constraints
00354 
00355 
00356       // Here we're sure that all our supports are valid and we can
00357       // gleefully compute stress().  After this call, I am valid too.
00358       cached = computeStress();
00359       valid = true;
00360     }
00361 
00362   // I'm supposed to invalidate myself (perhaps my support has become
00363   // invalid or something).  I need to also notify my parents...
00364   else
00365     {
00366       valid = false;
00367 //      
00368 //      if (CM->dG){
00369 //      cout << "\n\nDYNAMIC VERSION" << endl;
00370 //      for (int i = 0; i <CM->dG->NumVertices();i++){
00371 //        cout << "i=" << i << "\tmyID=" << CM->dG->GetData(i)->ID()<<endl;
00372 //      }
00373 //      cout << endl;
00374 //      }
00375       if (CM->dG){
00376         if(!CM->makeStatic())
00377           {
00378             DIE("Unable to create static graph (constraint.C).\n");
00379           }
00380       }
00381 
00382 //      if (CM->sG){
00383 //      cout << "\n\nSTATIC VERSION" << endl;
00384 //      for (int i = 0; i <CM->sG->NumVertices();i++){
00385 //        cout << "i=" << i << "\tmyID=" << CM->sG->GetData(i)->ID()<<endl;
00386 //      }
00387 //      cout << endl;
00388 //      }
00389 
00390 
00391       // when I am set to false, I must notify the atoms which depend on me
00392       // that I am now invalid
00393       // this is poor, and breaks the assumption about directedness in
00394       // the graph structure.  However, because atoms acually depend
00395       // on constraints up the graph -- this notification is required.
00396       // possibly fix this.
00397       for(int i=0; i<supportA.Length(); ++i)
00398         {
00399           child = CM->getConstraint(supportA[i]);
00400           child->notifyValid(this,false);
00401         }
00402             
00403       Constraint * parent=0;
00404       sdGraph<Constraint*>::neighbor_iterator it;
00405       // Iterate over my parents (who I'm a support for):
00406       for(it = CM->sG->begin_neighbor(myID,1); it; ++it)
00407         {
00408           parent = CM->sG->GetData(*it);
00409           parent->notifyValid(this,false);
00410         }
00411     }
00412 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!atomSupport@{atomSupport}}
\index{atomSupport@{atomSupport}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf Int\-Vec} \& Constraint::atom\-Support () const\hspace{0.3cm}{\tt  [inline]}}\label{class_Constraint_a7}


Returns the id's of the atoms (wrt the constraint manager) this constraint uses to compute its {\bf stress}() {\rm (p.\,\pageref{class_Constraint_a4})}.



Definition at line 87 of file constraint.h.

Referenced by Constraint\-Manager::add().\footnotesize\begin{verbatim}00087                                     { return supportA; }
00088 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!computeAbsRes@{computeAbsRes}}
\index{computeAbsRes@{computeAbsRes}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double Constraint::compute\-Abs\-Res (void) const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{class_Constraint_a28}


returns abs residual as a Z score, if supported, constraint overwrites 

Reimplemented in {\bf Distance\-Constraint} {\rm (p.\,\pageref{class_DistanceConstraint_b2})}.

Definition at line 191 of file constraint.h.

Referenced by Constraint\-Manager::Abs\-Dist\-Residuals().\footnotesize\begin{verbatim}00191                                       {return 0;}
00192 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!computeStress@{computeStress}}
\index{computeStress@{computeStress}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double Constraint::compute\-Stress (int {\em k}, const {\bf j\-Vector} \& {\em pos\_\-k}) const\hspace{0.3cm}{\tt  [pure virtual]}}\label{class_Constraint_a27}


Returns the stress on this constraint after "pretending" the atom with index a' moved to position pos\_\-a'. This also must be overwitten by all constraints that inherit from this class 

Reimplemented in {\bf Atom\-Constraint} {\rm (p.\,\pageref{class_AtomConstraint_a4})}, {\bf Bin\-Envelope\-Constraint} {\rm (p.\,\pageref{class_BinEnvelopeConstraint_b1})}, {\bf Distance\-Constraint} {\rm (p.\,\pageref{class_DistanceConstraint_b1})}, {\bf Envelope\-Constraint} {\rm (p.\,\pageref{class_EnvelopeConstraint_a17})}, and {\bf Position\-Constraint} {\rm (p.\,\pageref{class_PositionConstraint_b1})}.\index{Constraint@{Constraint}!computeStress@{computeStress}}
\index{computeStress@{computeStress}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double Constraint::compute\-Stress () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{class_Constraint_a26}


One of the only functions that $\ast$must$\ast$ be overwritten by subclasses. Returns a value reflecting how dissatisfied this constraint is with the current molecule residing in CM'. 

Reimplemented in {\bf Atom\-Constraint} {\rm (p.\,\pageref{class_AtomConstraint_a3})}, {\bf Bin\-Envelope\-Constraint} {\rm (p.\,\pageref{class_BinEnvelopeConstraint_b0})}, {\bf Distance\-Constraint} {\rm (p.\,\pageref{class_DistanceConstraint_b0})}, {\bf Envelope\-Constraint} {\rm (p.\,\pageref{class_EnvelopeConstraint_a16})}, and {\bf Position\-Constraint} {\rm (p.\,\pageref{class_PositionConstraint_b0})}.

Referenced by assert\-Validity(), and stress().\index{Constraint@{Constraint}!constraintSupport@{constraintSupport}}
\index{constraintSupport@{constraintSupport}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf Int\-Vec} \& Constraint::constraint\-Support () const\hspace{0.3cm}{\tt  [inline]}}\label{class_Constraint_a8}


Returns the id's of the constraints this constraint uses to compute its {\bf stress}() {\rm (p.\,\pageref{class_Constraint_a4})}.



Definition at line 90 of file constraint.h.

Referenced by Constraint\-Manager::add().\footnotesize\begin{verbatim}00090                                           { return supportC; }
00091 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!dStress@{dStress}}
\index{dStress@{dStress}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf j\-Vector} Constraint::d\-Stress (int {\em k}, const {\bf j\-Vector} \& {\em pos\_\-k}) const\hspace{0.3cm}{\tt  [pure virtual]}}\label{class_Constraint_a6}


asking constraint number k for its 12 element d\-Stress vector we pass in pos\_\-a vector -- corresponding to the atom position if the constraint is an atom, and corresponding to the position of the atom k in question if the call is to a non-atom constraint. EG for a distance constraint atom 12 needs the d\-Stress from the d-constraint, so it will call d\-Stress on the d-constraint(12, atom\_\-pos) so the d\_\-constr can answer the question if atom 12 were in atom\_\-pos, I would say my d\-Stress is blah. 

Reimplemented in {\bf Atom\-Constraint} {\rm (p.\,\pageref{class_AtomConstraint_a5})}, {\bf Bin\-Envelope\-Constraint} {\rm (p.\,\pageref{class_BinEnvelopeConstraint_a2})}, {\bf Distance\-Constraint} {\rm (p.\,\pageref{class_DistanceConstraint_a3})}, {\bf Envelope\-Constraint} {\rm (p.\,\pageref{class_EnvelopeConstraint_a2})}, and {\bf Position\-Constraint} {\rm (p.\,\pageref{class_PositionConstraint_a3})}.

Referenced by Constraint\-Manager::d\-Stress().\index{Constraint@{Constraint}!getManager@{getManager}}
\index{getManager@{getManager}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf Constraint\-Manager} \& Constraint::get\-Manager () const}\label{class_Constraint_a19}




Definition at line 134 of file constraint.C.\footnotesize\begin{verbatim}00135 { return *CM; }
00136 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!getMolecule@{getMolecule}}
\index{getMolecule@{getMolecule}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf Molecule} \& Constraint::get\-Molecule () const}\label{class_Constraint_a18}




Definition at line 131 of file constraint.C.

Referenced by Distance\-Constraint::compute\-Abs\-Res(), Position\-Constraint::compute\-Stress(), Distance\-Constraint::compute\-Stress(), Bin\-Envelope\-Constraint::compute\-Stress(), and Distance\-Constraint::d\-Stress().\footnotesize\begin{verbatim}00132 { return CM->getMolecule(); }
00133 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!isOff@{isOff}}
\index{isOff@{isOff}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Constraint::is\-Off () const}\label{class_Constraint_a20}


Returns true if the constraint is off and is being ignored during molecular manipulations.



Definition at line 138 of file constraint.C.

Referenced by assert\-Validity(), Constraint\-Manager::constraint\-ON(), and notify\-Off().\footnotesize\begin{verbatim}00139   { return off; }
00140 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!isValid@{isValid}}
\index{isValid@{isValid}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Constraint::is\-Valid () const}\label{class_Constraint_a22}


{\bf is\-Valid}() {\rm (p.\,\pageref{class_Constraint_a22})} returns true if the cached' value computed from the last {\bf compute\-Stress}() {\rm (p.\,\pageref{class_Constraint_a26})} call would equal the value returned by another call to the {\bf compute\-Stress}() {\rm (p.\,\pageref{class_Constraint_a26})} function. 

Definition at line 302 of file constraint.C.\footnotesize\begin{verbatim}00303   { return valid; }
00304 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!notifyOff@{notifyOff}}
\index{notifyOff@{notifyOff}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Constraint::notify\-Off (Constraint $\ast$ {\em child}, bool {\em to\_\-off} = true)\hspace{0.3cm}{\tt  [protected, virtual]}}\label{class_Constraint_b1}


Informs me that one of the atoms/constraints I depend on has been turned off/on depending on the to\_\-off' flag. 

Definition at line 253 of file constraint.C.

Referenced by switch\-Off().\footnotesize\begin{verbatim}00253                                                          {
00254 
00255   // default behavior:
00256 
00257   if (child->ID() < CM->numAtoms()){
00258     if (to_off){     // a child atom was just turned off
00259       assertValidity(false);
00260       switchOff(true);
00261       DIE ("This should not be called -- instead, atoms should turn off constraints when turned off");
00262       
00263     } else { // a child atom I need was just turned on
00264       if (isOff()) {  
00265         // and I am off
00266         // if all my other children constraints (atoms) are on, I turn back on      
00267       Constraint * c=0;
00268       sdGraph<Constraint*>::neighbor_iterator it;
00269       for(it = CM->sG->begin_neighbor(myID,0);it; ++it)
00270         {
00271           c = CM->sG->GetData(*it);
00272           if (c->isOff())
00273             return;
00274         }
00275       switchOff(false); // turn back on      
00276       } else {
00277         // I am already on
00278         // and one of my child atoms just turned on
00279         DIE("constraint error!");       
00280       }
00281     } // end child atom on
00282   }
00283 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!notifyRemove@{notifyRemove}}
\index{notifyRemove@{notifyRemove}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Constraint::notify\-Remove (void)\hspace{0.3cm}{\tt  [protected, virtual]}}\label{class_Constraint_b3}


I'm about to be removed from the constraint graph.



Reimplemented in {\bf Atom\-Constraint} {\rm (p.\,\pageref{class_AtomConstraint_b3})}.

Definition at line 290 of file constraint.C.

Referenced by Constraint\-Manager::remove().\footnotesize\begin{verbatim}00291 {
00292   Constraint * child;
00293   for(int i=0; i<supportC.Length(); ++i)
00294     {
00295       child = CM->dG->GetData(supportC[i]);
00296       CM->remove(*child);
00297       // Recursively calls notifyRemove() on child''s children.
00298     }
00299 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!notifyValid@{notifyValid}}
\index{notifyValid@{notifyValid}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Constraint::notify\-Valid (Constraint $\ast$ {\em child}, bool {\em validity})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{class_Constraint_b2}


Informs me that one of my supports now contains valid/invalid  information depending on the validity' flag. 

Reimplemented in {\bf Atom\-Constraint} {\rm (p.\,\pageref{class_AtomConstraint_b2})}.

Definition at line 239 of file constraint.C.

Referenced by assert\-Validity(), and Constraint\-Manager::set\-Position().\footnotesize\begin{verbatim}00239                                                              {
00240   // this is DEFAULT behavior.  Many Contraints will overwrite this
00241   // especially complex constraints with many deepndancies.
00242   // This behavior allows doesnot permit ANY intelligent parsing of
00243   // invalid subsets of children constraints.
00244   
00245   // no problem if we match
00246   if (validity == valid) return;
00247 
00248   // otherwise fix the problem
00249   if (valid) assertValidity(false);
00250   
00251 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!setManager@{setManager}}
\index{setManager@{setManager}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Constraint::set\-Manager ({\bf Constraint\-Manager} \& {\em cm})}\label{class_Constraint_a17}




Definition at line 113 of file constraint.C.\footnotesize\begin{verbatim}00114   {
00115     if(CM == &cm) return;
00116     
00117     // requierd to check CM because most constraints will be
00118     // constructed w/ CM=0 initially and the have their manager set
00119     // with this fntn
00120     if (CM) CM->remove(*this);
00121     CM = &cm;
00122     CM->add(*this);
00123 
00124     cached = INF;
00125     valid = false;
00126     off = false;
00127 
00128     // My Id has now been set by the ConstraintManager.
00129 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!stress@{stress}}
\index{stress@{stress}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double Constraint::stress (int {\em a}, const {\bf j\-Vector} \& {\em pos\_\-a}) const}\label{class_Constraint_a5}


Computes the stress after simulating atom a' has moved to the new position pos\_\-a'. This function makes sense for values of a' that reference atoms (not other constraints) in the {\bf Constraint\-Manager} {\rm (p.\,\pageref{class_ConstraintManager})}. 

Definition at line 105 of file constraint.C.\footnotesize\begin{verbatim}00106   {
00107     if(a<0 || a>=CM->numAtoms())
00108         return INF;
00109     if (off) return 0;
00110     return computeStress(a,pos_a); // subclass
00111 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!stress@{stress}}
\index{stress@{stress}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double Constraint::stress ()}\label{class_Constraint_a4}


Returns how dissatisfied this constraint is with the current molecule (stored in the {\bf Constraint\-Manager} {\rm (p.\,\pageref{class_ConstraintManager})}).



Definition at line 21 of file constraint.C.

Referenced by Constraint\-Manager::stress().\footnotesize\begin{verbatim}00022   { 
00023     if(off)
00024       return 0;
00025       //       {
00026 // #ifdef NOISY_CONSTRAINTS
00027 //          cerr  << "Constraint::Stress:  " << myID <<"(" << myType
00028 //                <<"). my off value is " << off << endl;
00029 // #endif
00030 //      DIE("stress() called on an inactive constraint.\n");
00031 //       }
00032     //    cerr << "called stress() on constraint" << Label() << endl;
00033     
00034     if (assertValidity(true)) return cached;
00035     else {
00036       DIE("Called Constraint::stress() and unable to validate.");
00037       return 0; // removes compiler warning re:control to end of non-void fntn
00038     }
00039 \end{verbatim}\normalsize 
\index{Constraint@{Constraint}!switchOff@{switchOff}}
\index{switchOff@{switchOff}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Constraint::switch\-Off (bool {\em to\_\-off} = true)\hspace{0.3cm}{\tt  [virtual]}}\label{class_Constraint_a21}


Turn the constraint on or off. If the constraint is off, it is ignored during subsequent molecular manipulations. Subclasses may want to overwrite these to propigate on/off states to children (constraints they've constructed) when being switched on/off. By default, 

Definition at line 141 of file constraint.C.

Referenced by Constraint\-Manager::Turn\-Atom\-On(), Constraint\-Manager::Turn\-Atoms\-Off(), Constraint\-Manager::Turn\-Constraint\-On(), and notify\-Off().\footnotesize\begin{verbatim}00141                                       { 
00142   
00143   if(off == to_off) {
00144 #ifdef NOISY_CONSTRAINTS
00145     cerr  << "Turning off value for  " << myID <<"(" << myType
00146           <<").  to " << to_off << "  no change. " << endl;
00147 #endif
00148     
00149     return;
00150   }
00151   
00152   // I'm turning off
00153   if (to_off) assertValidity(false);
00154 
00155 #ifdef NOISY_CONSTRAINTS
00156   cerr  << "I'm  " << myID <<"(" << myType
00157         << ") My off value is now " << to_off << endl;
00158 #endif
00159 
00160   off = to_off;
00161 
00162   // I just truned on
00163   if (! to_off) assertValidity(false);
00164 
00165 
00166   
00167   CM->makeStatic();
00168   Constraint * c; // Some (child or parent) constraint.
00169   sdGraph<Constraint*>::neighbor_iterator it;
00170 
00171   
00172   if (myID < CM->numAtoms()){
00173     // I'm an atom
00174 
00175     // Switch our child constraints on/off to match our own on/off status.
00176     for(it = CM->sG->begin_neighbor(myID,0);it; ++it)
00177       {
00178         c = CM->sG->GetData(*it);
00179 
00180 
00181         if (to_off){ // I'm an atom and just got turned off
00182 #ifdef NOISY_CONSTRAINTS
00183           cerr  << "Atom Constraint  " << myID <<"(" << myType
00184                 <<") now switching  " << c->ID() <<" "  << c->Type()
00185                 << " off value to " << to_off << endl;
00186 #endif
00187           c->switchOff(to_off);
00188 
00189         }         else { // I'm an atom and just got turned on
00190 #ifdef NOISY_CONSTRAINTS
00191           cerr  << "Atom Constraint  " << myID <<"(" << myType
00192                 <<") now notifying  " << c->ID() <<" "  << c->Type()
00193                 << " that my off value is now " << to_off << endl;
00194 #endif
00195           c->notifyOff(this, to_off);
00196 
00197         
00198         }
00199       }
00200           
00201   } else {
00202     // I'm a constraint on atoms or on other constraints
00203 
00204         
00205   
00206         // Switch our child constraints on/off to match our own on/off status.
00207     for(it = CM->sG->begin_neighbor(myID,0);it; ++it)
00208       {
00209         c = CM->sG->GetData(*it);
00210 
00211         if (c->ID() >= CM->numAtoms()){
00212 #ifdef NOISY_CONSTRAINTS
00213           cerr  << "I'm  " << myID <<"(" << myType
00214                 <<") turning  " << c->ID() <<" "  << c->Type()
00215                 << " off value to " << to_off << endl;
00216 #endif
00217           c->switchOff(to_off); 
00218         } else {// else child is an atom, and don't turn off an atom (no loops)
00219           c->assertValidity(false);
00220           // atom must now be invalid b/c a parent turned on
00221         }
00222       }
00223 
00224     // Notify the parents that our on/off state has switched.  
00225     for(it = CM->sG->begin_neighbor(myID,1);it; ++it)
00226       {
00227         c = CM->sG->GetData(*it);
00228 #ifdef NOISY_CONSTRAINTS
00229         cerr  << "I'm  " << myID <<"(" << myType
00230               <<") notifying  " << c->ID() << " " << c->Type()
00231               << " that my off val is now " << to_off << endl;
00232 #endif
00233         c->notifyOff(this, to_off);
00234       }
00235   }
00236 \end{verbatim}\normalsize 


\subsection{Friends And Related Function Documentation}
\index{Constraint@{Constraint}!ConstraintManager@{ConstraintManager}}
\index{ConstraintManager@{ConstraintManager}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}class Constraint\-Manager\hspace{0.3cm}{\tt  [friend]}}\label{class_Constraint_l0}




Definition at line 33 of file constraint.h.\index{Constraint@{Constraint}!ConstraintRegistry@{ConstraintRegistry}}
\index{ConstraintRegistry@{ConstraintRegistry}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}class Constraint\-Registry\hspace{0.3cm}{\tt  [friend]}}\label{class_Constraint_l1}




Definition at line 34 of file constraint.h.

\subsection{Member Data Documentation}
\index{Constraint@{Constraint}!CM@{CM}}
\index{CM@{CM}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Constraint\-Manager} $\ast$ Constraint::CM\hspace{0.3cm}{\tt  [protected]}}\label{class_Constraint_n0}


Pointer to the manager handling me. If I want to reference a molecule, I must get to it through my constraint manager. This extra abstraction step is meant to guarantee that the manager and I agree on which molecule we're viewing. 

Definition at line 204 of file constraint.h.\index{Constraint@{Constraint}!Identifier@{Identifier}}
\index{Identifier@{Identifier}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Dyn\-String} Constraint::Identifier = "undefined"\hspace{0.3cm}{\tt  [static]}}\label{class_Constraint_p0}




Reimplemented in {\bf Atom\-Constraint} {\rm (p.\,\pageref{class_AtomConstraint_p0})}, {\bf Bin\-Envelope\-Constraint} {\rm (p.\,\pageref{class_BinEnvelopeConstraint_p0})}, {\bf Distance\-Constraint} {\rm (p.\,\pageref{class_DistanceConstraint_p0})}, {\bf Envelope\-Constraint} {\rm (p.\,\pageref{class_EnvelopeConstraint_p0})}, and {\bf Position\-Constraint} {\rm (p.\,\pageref{class_PositionConstraint_p0})}.

Definition at line 88 of file globals.C.\index{Constraint@{Constraint}!JVzero3@{JVzero3}}
\index{JVzero3@{JVzero3}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf j\-Vector} Constraint::JVzero3\hspace{0.3cm}{\tt  [protected]}}\label{class_Constraint_n9}




Definition at line 317 of file constraint.h.\index{Constraint@{Constraint}!cached@{cached}}
\index{cached@{cached}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double Constraint::cached\hspace{0.3cm}{\tt  [protected]}}\label{class_Constraint_n6}




Definition at line 299 of file constraint.h.\index{Constraint@{Constraint}!myID@{myID}}
\index{myID@{myID}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Constraint::my\-ID\hspace{0.3cm}{\tt  [protected]}}\label{class_Constraint_n3}


This id is assigned by the {\bf Constraint\-Manager} {\rm (p.\,\pageref{class_ConstraintManager})} when the constraint is added (during construction). 

Definition at line 290 of file constraint.h.\index{Constraint@{Constraint}!myIntType@{myIntType}}
\index{myIntType@{myIntType}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Constraint::my\-Int\-Type\hspace{0.3cm}{\tt  [protected]}}\label{class_Constraint_n5}


Int representation of this constraint type.



Definition at line 296 of file constraint.h.\index{Constraint@{Constraint}!myType@{myType}}
\index{myType@{myType}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Dyn\-String} Constraint::my\-Type\hspace{0.3cm}{\tt  [protected]}}\label{class_Constraint_n4}


String representation of this constraint type.



Definition at line 293 of file constraint.h.\index{Constraint@{Constraint}!off@{off}}
\index{off@{off}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Constraint::off\hspace{0.3cm}{\tt  [protected]}}\label{class_Constraint_n8}




Definition at line 308 of file constraint.h.\index{Constraint@{Constraint}!supportA@{supportA}}
\index{supportA@{supportA}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Int\-Vec} Constraint::support\-A\hspace{0.3cm}{\tt  [protected]}}\label{class_Constraint_n1}


Stores the id's of the atoms that this constraint needs in order to compute its {\bf stress}() {\rm (p.\,\pageref{class_Constraint_a4})} function. It should retrieve these ID's from the constraint manager. The constraint manager assigns integers 0...(N-1) to atoms (where N is the number of atoms in the molecule) and the remainder to constraints. 

Definition at line 213 of file constraint.h.\index{Constraint@{Constraint}!supportC@{supportC}}
\index{supportC@{supportC}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Int\-Vec} Constraint::support\-C\hspace{0.3cm}{\tt  [protected]}}\label{class_Constraint_n2}


Stores the id's of the other constraints that this constraint needs in order to compute its {\bf stress}() {\rm (p.\,\pageref{class_Constraint_a4})} function. It should retrieve these ID's from the constraint manager. The constraint manager assigns integers 0...(N-1) to atoms (where N is the number of atoms in the molecule) and the remainder to constraints. 

Definition at line 222 of file constraint.h.\index{Constraint@{Constraint}!valid@{valid}}
\index{valid@{valid}!Constraint@{Constraint}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Constraint::valid\hspace{0.3cm}{\tt  [protected]}}\label{class_Constraint_n7}




Definition at line 304 of file constraint.h.

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