ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/tengDissertation/Appendix.tex
(Generate patch)

Comparing trunk/tengDissertation/Appendix.tex (file contents):
Revision 2805 by tim, Tue Jun 6 20:33:28 2006 UTC vs.
Revision 2842 by tim, Fri Jun 9 04:07:13 2006 UTC

# Line 1 | Line 1
1   \appendix
2 < \chapter{\label{chapt:appendix}APPENDIX}
2 > \chapter{\label{chapt:oopse}Object-Oriented Parallel Simulation Engine}
3  
4 < Designing object-oriented software is hard, and designing reusable
5 < object-oriented scientific software is even harder. Absence of
6 < applying modern software development practices is the bottleneck of
7 < Scientific Computing community\cite{wilson}. For instance, in the
8 < last 20 years , there are quite a few MD packages that were
9 < developed to solve common MD problems and perform robust simulations
10 < . However, many of the codes are legacy programs that are either
11 < poorly organized or extremely complex. Usually, these packages were
12 < contributed by scientists without official computer science
13 < training. The development of most MD applications are lack of strong
14 < coordination to enforce design and programming guidelines. Moreover,
15 < most MD programs also suffer from missing design and implement
16 < documents which is crucial to the maintenance and extensibility.
4 > Absence of applying modern software development practices is the
5 > bottleneck of Scientific Computing community\cite{Wilson2006}. In
6 > the last 20 years , there are quite a few MD
7 > packages\cite{Brooks1983, Vincent1995, Kale1999} that were developed
8 > to solve common MD problems and perform robust simulations .
9 > Unfortunately, most of them are commercial programs that are either
10 > poorly written or extremely complicate. Consequently, it prevents
11 > the researchers to reuse or extend those packages to do cutting-edge
12 > research effectively. Along the way of studying structural and
13 > dynamic processes in condensed phase systems like biological
14 > membranes and nanoparticles, we developed an open source
15 > Object-Oriented Parallel Simulation Engine ({\sc OOPSE}). This new
16 > molecular dynamics package has some unique features
17 > \begin{enumerate}
18 >  \item {\sc OOPSE} performs Molecular Dynamics (MD) simulations on non-standard
19 > atom types (transition metals, point dipoles, sticky potentials,
20 > Gay-Berne ellipsoids, or other "lumpy"atoms with orientational
21 > degrees of freedom), as well as rigid bodies.
22 >  \item {\sc OOPSE} uses a force-based decomposition algorithm using MPI on cheap
23 > Beowulf clusters to obtain very efficient parallelism.
24 >  \item {\sc OOPSE} integrates the equations of motion using advanced methods for
25 > orientational dynamics in NVE, NVT, NPT, NPAT, and NP$\gamma$T
26 > ensembles.
27 >  \item {\sc OOPSE} can carry out simulations on metallic systems using the
28 > Embedded Atom Method (EAM) as well as the Sutton-Chen potential.
29 >  \item {\sc OOPSE} can perform simulations on Gay-Berne liquid crystals.
30 >  \item  {\sc OOPSE} can simulate systems containing the extremely efficient
31 > extended-Soft Sticky Dipole (SSD/E) model for water.
32 > \end{enumerate}
33  
34 + \section{\label{appendixSection:architecture }Architecture}
35 +
36 + Mainly written by \texttt{C/C++} and \texttt{Fortran90}, {\sc OOPSE}
37 + uses C++ Standard Template Library (STL) and fortran modules as the
38 + foundation. As an extensive set of the STL and Fortran90 modules,
39 + {\sc Base Classes} provide generic implementations of mathematical
40 + objects (e.g., matrices, vectors, polynomials, random number
41 + generators) and advanced data structures and algorithms(e.g., tuple,
42 + bitset, generic data, string manipulation). The molecular data
43 + structures for the representation of atoms, bonds, bends, torsions,
44 + rigid bodies and molecules \textit{etc} are contained in the {\sc
45 + Kernel} which is implemented with {\sc Base Classes} and are
46 + carefully designed to provide maximum extensibility and flexibility.
47 + The functionality required for applications is provide by the third
48 + layer which contains Input/Output, Molecular Mechanics and Structure
49 + modules. Input/Output module not only implements general methods for
50 + file handling, but also defines a generic force field interface.
51 + Another important component of Input/Output module is the meta-data
52 + file parser, which is rewritten using ANother Tool for Language
53 + Recognition(ANTLR)\cite{Parr1995, Schaps1999} syntax. The Molecular
54 + Mechanics module consists of energy minimization and a wide
55 + varieties of integration methods(see Chap.~\ref{chapt:methodology}).
56 + The structure module contains a flexible and powerful selection
57 + library which syntax is elaborated in
58 + Sec.~\ref{appendixSection:syntax}. The top layer is made of the main
59 + program of the package, \texttt{oopse} and it corresponding parallel
60 + version \texttt{oopse\_MPI}, as well as other useful utilities, such
61 + as \texttt{StatProps} (see Sec.~\ref{appendixSection:StaticProps}),
62 + \texttt{DynamicProps} (see Sec.~\ref{appendixSection:DynamicProps}),
63 + \texttt{Dump2XYZ} (see Sec.~\ref{appendixSection:Dump2XYZ}),
64 + \texttt{Hydro} (see Sec.~\ref{appendixSection:hydrodynamics})
65 + \textit{etc}.
66 +
67 + \begin{figure}
68 + \centering
69 + \includegraphics[width=\linewidth]{architecture.eps}
70 + \caption[The architecture of {\sc OOPSE}] {Overview of the structure
71 + of {\sc OOPSE}} \label{appendixFig:architecture}
72 + \end{figure}
73 +
74   \section{\label{appendixSection:desginPattern}Design Pattern}
75  
76   Design patterns are optimal solutions to commonly-occurring problems
77   in software design. Although originated as an architectural concept
78 < for buildings and towns by Christopher Alexander \cite{alexander},
79 < software patterns first became popular with the wide acceptance of
80 < the book, Design Patterns: Elements of Reusable Object-Oriented
81 < Software \cite{gamma94}. Patterns reflect the experience, knowledge
82 < and insights of developers who have successfully used these patterns
83 < in their own work. Patterns are reusable. They provide a ready-made
84 < solution that can be adapted to different problems as necessary.
85 < Pattern are expressive. they provide a common vocabulary of
86 < solutions that can express large solutions succinctly.
78 > for buildings and towns by Christopher Alexander
79 > \cite{Alexander1987}, software patterns first became popular with
80 > the wide acceptance of the book, Design Patterns: Elements of
81 > Reusable Object-Oriented Software \cite{Gamma1994}. Patterns reflect
82 > the experience, knowledge and insights of developers who have
83 > successfully used these patterns in their own work. Patterns are
84 > reusable. They provide a ready-made solution that can be adapted to
85 > different problems as necessary. Pattern are expressive. they
86 > provide a common vocabulary of solutions that can express large
87 > solutions succinctly. As one of the latest advanced techniques
88 > emerged from object-oriented community, design patterns were applied
89 > in some of the modern scientific software applications, such as
90 > JMol, {\sc OOPSE}\cite{Meineke2005} and PROTOMOL\cite{Matthey2004}
91 > \textit{etc}. The following sections enumerates some of the patterns
92 > used in {\sc OOPSE}.
93  
94 < Patterns are usually described using a format that includes the
33 < following information:
34 < \begin{enumerate}
35 <  \item The \emph{name} that is commonly used for the pattern. Good pattern names form a vocabulary for
36 <  discussing conceptual abstractions. a pattern may have more than one commonly used or recognizable name
37 <  in the literature. In this case it is common practice to document these nicknames or synonyms under
38 <  the heading of \emph{Aliases} or \emph{Also Known As}.
39 <  \item The \emph{motivation} or \emph{context} that this pattern applies
40 <  to. Sometimes, it will include some prerequisites that should be satisfied before deciding to use a pattern
41 <  \item The \emph{solution} to the problem that the pattern
42 <  addresses. It describes how to construct the necessary work products. The description may include
43 <  pictures, diagrams and prose which identify the pattern's structure, its participants, and their
44 <  collaborations, to show how the problem is solved.
45 <  \item The \emph{consequences} of using the given solution to solve a
46 <  problem, both positive and negative.
47 < \end{enumerate}
94 > \subsection{\label{appendixSection:singleton}Singleton}
95  
96 < As one of the latest advanced techniques emerged from
97 < object-oriented community, design patterns were applied in some of
98 < the modern scientific software applications, such as JMol, OOPSE
99 < \cite{Meineke05} and PROTOMOL \cite{Matthey05} \textit{etc}.
96 > The Singleton pattern not only provides a mechanism to restrict
97 > instantiation of a class to one object, but also provides a global
98 > point of access to the object. Currently implemented as a global
99 > variable, the logging utility which reports error and warning
100 > messages to the console in {\sc OOPSE} is a good candidate for
101 > applying the Singleton pattern to avoid the global namespace
102 > pollution. Although the singleton pattern can be implemented in
103 > various ways  to account for different aspects of the software
104 > designs, such as lifespan control \textit{etc}, we only use the
105 > static data approach in {\sc OOPSE}. The declaration and
106 > implementation of IntegratorFactory class are given by declared in
107 > List.~\ref{appendixScheme:singletonDeclaration} and
108 > List.~\ref{appendixScheme:singletonImplementation} respectively.
109 > Since constructor is declared as protected, a client can not
110 > instantiate IntegratorFactory directly. Moreover, since the member
111 > function getInstance serves as the only entry of access to
112 > IntegratorFactory, this approach fulfills the basic requirement, a
113 > single instance. Another consequence of this approach is the
114 > automatic destruction since static data are destroyed upon program
115 > termination.
116 > \begin{lstlisting}[float,caption={[A classic Singleton design pattern implementation(I)] The declaration of of simple Singleton pattern.},label={appendixScheme:singletonDeclaration}]
117  
118 < \subsection{\label{appendixSection:singleton}Singleton}
119 < The Singleton pattern ensures that only one instance of a class is
120 < created. All objects that use an instance of that class use the same
121 < instance.
118 > class IntegratorFactory {
119 > public:
120 >  static IntegratorFactory*
121 >  getInstance();
122 > protected:
123 >  IntegratorFactory();
124 > private:
125 >  static IntegratorFactory* instance_;
126 > };
127  
128 + \end{lstlisting}
129 +
130 + \begin{lstlisting}[float,caption={[A classic implementation of Singleton design pattern (II)] The implementation of simple Singleton pattern.},label={appendixScheme:singletonImplementation}]
131 +
132 + IntegratorFactory::instance_ = NULL;
133 +
134 + IntegratorFactory* getInstance() {
135 +  if (instance_ == NULL){
136 +    instance_ = new IntegratorFactory;
137 +  }
138 +  return instance_;
139 + }
140 +
141 + \end{lstlisting}
142 +
143 +
144   \subsection{\label{appendixSection:factoryMethod}Factory Method}
60 The Factory Method pattern is a creational pattern which deals with
61 the problem of creating objects without specifying the exact class
62 of object that will be created. Factory Method solves this problem
63 by defining a separate method for creating the objects, which
64 subclasses can then override to specify the derived type of product
65 that will be created.
145  
146 + Categoried as a creational pattern, the Factory Method pattern deals
147 + with the problem of creating objects without specifying the exact
148 + class of object that will be created. Factory Method is typically
149 + implemented by delegating the creation operation to the subclasses.
150 + Parameterized Factory pattern where factory method (
151 + createIntegrator member function) creates products based on the
152 + identifier (see List.~\ref{appendixScheme:factoryDeclaration}). If
153 + the identifier has been already registered, the factory method will
154 + invoke the corresponding creator (see
155 + List.~\ref{appendixScheme:integratorCreator}) which utilizes the
156 + modern C++ template technique to avoid excess subclassing.
157  
158 < \subsection{\label{appendixSection:visitorPattern}Visitor}
69 < The purpose of the Visitor Pattern is to encapsulate an operation
70 < that you want to perform on the elements of a data structure. In
71 < this way, you can change the operation being performed on a
72 < structure without the need of changing the classes of the elements
73 < that you are operating on.
158 > \begin{lstlisting}[float,caption={[The implementation of Parameterized Factory pattern (I)]Source code of IntegratorFactory class.},label={appendixScheme:factoryDeclaration}]
159  
160 + class IntegratorFactory {
161 + public:
162 +  typedef std::map<string, IntegratorCreator*> CreatorMapType;
163  
164 < \subsection{\label{appendixSection:templateMethod}Template Method}
164 >  bool registerIntegrator(IntegratorCreator* creator) {
165 >    return creatorMap_.insert(creator->getIdent(), creator).second;
166 >  }
167  
168 < \section{\label{appendixSection:analysisFramework}Analysis Framework}
168 >  Integrator* createIntegrator(const string& id, SimInfo* info) {
169 >    Integrator* result = NULL;
170 >    CreatorMapType::iterator i = creatorMap_.find(id);
171 >    if (i != creatorMap_.end()) {
172 >      result = (i->second)->create(info);
173 >    }
174 >    return result;
175 >  }
176  
177 < \section{\label{appendixSection:concepts}Concepts}
177 > private:
178 >  CreatorMapType creatorMap_;
179 > };
180 > \end{lstlisting}
181  
182 < OOPSE manipulates both traditional atoms as well as some objects
83 < that {\it behave like atoms}.  These objects can be rigid
84 < collections of atoms or atoms which have orientational degrees of
85 < freedom.  Here is a diagram of the class heirarchy:
182 > \begin{lstlisting}[float,caption={[The implementation of Parameterized Factory pattern (III)]Source code of creator classes.},label={appendixScheme:integratorCreator}]
183  
184 + class IntegratorCreator {
185 + public:
186 +    IntegratorCreator(const string& ident) : ident_(ident) {}
187 +
188 +    const string& getIdent() const { return ident_; }
189 +
190 +    virtual Integrator* create(SimInfo* info) const = 0;
191 +
192 + private:
193 +    string ident_;
194 + };
195 +
196 + template<class ConcreteIntegrator>
197 + class IntegratorBuilder : public IntegratorCreator {
198 + public:
199 +  IntegratorBuilder(const string& ident)
200 +                   : IntegratorCreator(ident) {}
201 +  virtual  Integrator* create(SimInfo* info) const {
202 +    return new ConcreteIntegrator(info);
203 +  }
204 + };
205 + \end{lstlisting}
206 +
207 + \subsection{\label{appendixSection:visitorPattern}Visitor}
208 +
209 + The visitor pattern is designed to decouple the data structure and
210 + algorithms used upon them by collecting related operation from
211 + element classes into other visitor classes, which is equivalent to
212 + adding virtual functions into a set of classes without modifying
213 + their interfaces. Fig.~\ref{appendixFig:visitorUML} demonstrates the
214 + structure of Visitor pattern which is used extensively in {\tt
215 + Dump2XYZ}. In order to convert an OOPSE dump file, a series of
216 + distinct operations are performed on different StuntDoubles (See the
217 + class hierarchy in Fig.~\ref{oopseFig:hierarchy} and the declaration
218 + in List.~\ref{appendixScheme:element}). Since the hierarchies
219 + remains stable, it is easy to define a visit operation (see
220 + List.~\ref{appendixScheme:visitor}) for each class of StuntDouble.
221 + Note that using Composite pattern\cite{Gamma1994}, CompositVisitor
222 + manages a priority visitor list and handles the execution of every
223 + visitor in the priority list on different StuntDoubles.
224 +
225   \begin{figure}
226   \centering
227 < \includegraphics[width=3in]{heirarchy.eps}
228 < \caption[Class heirarchy for StuntDoubles in {\sc oopse}-3.0]{ \\
229 < The class heirarchy of StuntDoubles in {\sc oopse}-3.0. The
92 < selection syntax allows the user to select any of the objects that
93 < are descended from a StuntDouble.} \label{oopseFig:heirarchy}
227 > \includegraphics[width=\linewidth]{visitor.eps}
228 > \caption[The UML class diagram of Visitor patten] {The UML class
229 > diagram of Visitor patten.} \label{appendixFig:visitorUML}
230   \end{figure}
231 +
232 + \begin{figure}
233 + \centering
234 + \includegraphics[width=\linewidth]{hierarchy.eps}
235 + \caption[Class hierarchy for ojects in {\sc OOPSE}]{ A diagram of
236 + the class hierarchy. } \label{oopseFig:hierarchy}
237 + \end{figure}
238 +
239 + \begin{lstlisting}[float,caption={[The implementation of Visitor pattern (II)]Source code of the element classes.},label={appendixScheme:element}]
240 +
241 + class StuntDouble { public:
242 +  virtual void accept(BaseVisitor* v) = 0;
243 + };
244 +
245 + class Atom: public StuntDouble { public:
246 +  virtual void accept{BaseVisitor* v*} {
247 +    v->visit(this);
248 +  }
249 + };
250  
251 + class DirectionalAtom: public Atom { public:
252 +  virtual void accept{BaseVisitor* v*} {
253 +    v->visit(this);
254 +  }
255 + };
256 +
257 + class RigidBody: public StuntDouble { public:
258 +  virtual void accept{BaseVisitor* v*} {
259 +    v->visit(this);
260 +  }
261 + };
262 +
263 + \end{lstlisting}
264 +
265 + \begin{lstlisting}[float,caption={[The implementation of Visitor pattern (I)]Source code of the visitor classes.},label={appendixScheme:visitor}]
266 +
267 + class BaseVisitor{
268 + public:
269 +  virtual void visit(Atom* atom);
270 +  virtual void visit(DirectionalAtom* datom);
271 +  virtual void visit(RigidBody* rb);
272 + };
273 +
274 + class BaseAtomVisitor:public BaseVisitor{ public:
275 +  virtual void visit(Atom* atom);
276 +  virtual void visit(DirectionalAtom* datom);
277 +  virtual void visit(RigidBody* rb);
278 + };
279 +
280 + class SSDAtomVisitor:public BaseAtomVisitor{ public:
281 +  virtual void visit(Atom* atom);
282 +  virtual void visit(DirectionalAtom* datom);
283 +  virtual void visit(RigidBody* rb);
284 + };
285 +
286 + class CompositeVisitor: public BaseVisitor {
287 + public:
288 +
289 +  typedef list<pair<BaseVisitor*, int> > VistorListType;
290 +  typedef VistorListType::iterator VisitorListIterator;
291 +  virtual void visit(Atom* atom) {
292 +    VisitorListIterator i;
293 +    BaseVisitor* curVisitor;
294 +    for(i = visitorList.begin();i != visitorList.end();++i) {
295 +      atom->accept(*i);
296 +    }
297 +  }
298 +
299 +  virtual void visit(DirectionalAtom* datom) {
300 +    VisitorListIterator i;
301 +    BaseVisitor* curVisitor;
302 +    for(i = visitorList.begin();i != visitorList.end();++i) {
303 +      atom->accept(*i);
304 +    }
305 +  }
306 +
307 +  virtual void visit(RigidBody* rb) {
308 +    VisitorListIterator i;
309 +    std::vector<Atom*> myAtoms;
310 +    std::vector<Atom*>::iterator ai;
311 +    myAtoms = rb->getAtoms();
312 +    for(i = visitorList.begin();i != visitorList.end();++i) {{
313 +      rb->accept(*i);
314 +      for(ai = myAtoms.begin(); ai != myAtoms.end(); ++ai){
315 +        (*ai)->accept(*i);
316 +    }
317 +  }
318 +
319 +  void addVisitor(BaseVisitor* v, int priority);
320 +
321 +  protected:
322 +    VistorListType visitorList;
323 + };
324 +
325 + \end{lstlisting}
326 +
327 + \section{\label{appendixSection:concepts}Concepts}
328 +
329 + OOPSE manipulates both traditional atoms as well as some objects
330 + that {\it behave like atoms}.  These objects can be rigid
331 + collections of atoms or atoms which have orientational degrees of
332 + freedom.  A diagram of the class hierarchy is illustrated in
333 + Fig.~\ref{oopseFig:hierarchy}. Every Molecule, Atom and
334 + DirectionalAtom in {\sc OOPSE} have their own names which are
335 + specified in the {\tt .md} file. In contrast, RigidBodies are
336 + denoted by their membership and index inside a particular molecule:
337 + [MoleculeName]\_RB\_[index] (the contents inside the brackets depend
338 + on the specifics of the simulation). The names of rigid bodies are
339 + generated automatically. For example, the name of the first rigid
340 + body in a DMPC molecule is DMPC\_RB\_0.
341   \begin{itemize}
342   \item A {\bf StuntDouble} is {\it any} object that can be manipulated by the
343   integrators and minimizers.
# Line 102 | Line 347 | Every Molecule, Atom and DirectionalAtom in {\sc oopse
347   DirectionalAtom}s which behaves as a single unit.
348   \end{itemize}
349  
105 Every Molecule, Atom and DirectionalAtom in {\sc oopse} have their
106 own names which are specified in the {\tt .md} file. In contrast,
107 RigidBodies are denoted by their membership and index inside a
108 particular molecule: [MoleculeName]\_RB\_[index] (the contents
109 inside the brackets depend on the specifics of the simulation). The
110 names of rigid bodies are generated automatically. For example, the
111 name of the first rigid body in a DMPC molecule is DMPC\_RB\_0.
112
350   \section{\label{appendixSection:syntax}Syntax of the Select Command}
351  
352 < The most general form of the select command is: {\tt select {\it
353 < expression}}
352 > {\sc OOPSE} provides a powerful selection utility to select
353 > StuntDoubles. The most general form of the select command is:
354  
355 + {\tt select {\it expression}}.
356 +
357   This expression represents an arbitrary set of StuntDoubles (Atoms
358 < or RigidBodies) in {\sc oopse}. Expressions are composed of either
358 > or RigidBodies) in {\sc OOPSE}. Expressions are composed of either
359   name expressions, index expressions, predefined sets, user-defined
360   expressions, comparison operators, within expressions, or logical
361   combinations of the above expression types. Expressions can be
# Line 203 | Line 442 | expression}}
442   Users can define arbitrary terms to represent groups of
443   StuntDoubles, and then use the define terms in select commands. The
444   general form for the define command is: {\bf define {\it term
445 < expression}}
445 > expression}}. Once defined, the user can specify such terms in
446 > boolean expressions
447  
208 Once defined, the user can specify such terms in boolean expressions
209
448   {\tt define SSDWATER SSD or SSD1 or SSDRF}
449  
450   {\tt select SSDWATER}
# Line 242 | Line 480 | atoms.
480   select all StuntDoubles which are within 2.5 angstroms of PO4 or NC4
481   atoms.
482  
245 \section{\label{appendixSection:tools}Tools which use the selection command}
483  
484 < \subsection{\label{appendixSection:Dump2XYZ}Dump2XYZ}
484 > \section{\label{appendixSection:analysisFramework}Analysis Framework}
485  
249 Dump2XYZ can transform an OOPSE dump file into a xyz file which can
250 be opened by other molecular dynamics viewers such as Jmol and VMD.
251 The options available for Dump2XYZ are as follows:
252
253
254 \begin{longtable}[c]{|EFG|}
255 \caption{Dump2XYZ Command-line Options}
256 \\ \hline
257 {\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline
258 \endhead
259 \hline
260 \endfoot
261  -h & {\tt -{}-help} &                        Print help and exit \\
262  -V & {\tt -{}-version} &                     Print version and exit \\
263  -i & {\tt -{}-input=filename}  &             input dump file \\
264  -o & {\tt -{}-output=filename} &             output file name \\
265  -n & {\tt -{}-frame=INT}   &                 print every n frame  (default=`1') \\
266  -w & {\tt -{}-water}       &                 skip the the waters  (default=off) \\
267  -m & {\tt -{}-periodicBox} &                 map to the periodic box  (default=off)\\
268  -z & {\tt -{}-zconstraint}  &                replace the atom types of zconstraint molecules  (default=off) \\
269  -r & {\tt -{}-rigidbody}  &                  add a pseudo COM atom to rigidbody  (default=off) \\
270  -t & {\tt -{}-watertype} &                   replace the atom type of water model (default=on) \\
271  -b & {\tt -{}-basetype}  &                   using base atom type  (default=off) \\
272     & {\tt -{}-repeatX=INT}  &                 The number of images to repeat in the x direction  (default=`0') \\
273     & {\tt -{}-repeatY=INT} &                 The number of images to repeat in the y direction  (default=`0') \\
274     &  {\tt -{}-repeatZ=INT}  &                The number of images to repeat in the z direction  (default=`0') \\
275  -s & {\tt -{}-selection=selection script} & By specifying {\tt -{}-selection}=``selection command'' with Dump2XYZ, the user can select an arbitrary set of StuntDoubles to be
276 converted. \\
277     & {\tt -{}-originsele} & By specifying {\tt -{}-originsele}=``selection command'' with Dump2XYZ, the user can re-center the origin of the system around a specific StuntDouble \\
278     & {\tt -{}-refsele} &  In order to rotate the system, {\tt -{}-originsele} and {\tt -{}-refsele} must be given to define the new coordinate set. A StuntDouble which contains a dipole (the direction of the dipole is always (0, 0, 1) in body frame) is specified by {\tt -{}-originsele}. The new x-z plane is defined by the direction of the dipole and the StuntDouble is specified by {\tt -{}-refsele}.
279 \end{longtable}
280
281
486   \subsection{\label{appendixSection:StaticProps}StaticProps}
487  
488   {\tt StaticProps} can compute properties which are averaged over
489   some or all of the configurations that are contained within a dump
490   file. The most common example of a static property that can be
491   computed is the pair distribution function between atoms of type $A$
492 < and other atoms of type $B$, $g_{AB}(r)$.  StaticProps can also be
493 < used to compute the density distributions of other molecules in a
494 < reference frame {\it fixed to the body-fixed reference frame} of a
495 < selected atom or rigid body.
492 > and other atoms of type $B$, $g_{AB}(r)$.  {\tt StaticProps} can
493 > also be used to compute the density distributions of other molecules
494 > in a reference frame {\it fixed to the body-fixed reference frame}
495 > of a selected atom or rigid body. Due to the fact that the selected
496 > StuntDoubles from two selections may be overlapped, {\tt
497 > StaticProps} performs the calculation in three stages which are
498 > illustrated in Fig.~\ref{oopseFig:staticPropsProcess}.
499  
500 + \begin{figure}
501 + \centering
502 + \includegraphics[width=\linewidth]{staticPropsProcess.eps}
503 + \caption[A representation of the three-stage correlations in
504 + \texttt{StaticProps}]{This diagram illustrates three-stage
505 + processing used by \texttt{StaticProps}. $S_1$ and $S_2$ are the
506 + numbers of selected stuntdobules from {\tt -{}-sele1} and {\tt
507 + -{}-sele2} respectively, while $C$ is the number of stuntdobules
508 + appearing at both sets. The first stage($S_1-C$ and $S_2$) and
509 + second stages ($S_1$ and $S_2-C$) are completely non-overlapping. On
510 + the contrary, the third stage($C$ and $C$) are completely
511 + overlapping} \label{oopseFig:staticPropsProcess}
512 + \end{figure}
513 +
514   There are five seperate radial distribution functions availiable in
515   OOPSE. Since every radial distrbution function invlove the
516   calculation between pairs of bodies, {\tt -{}-sele1} and {\tt
# Line 333 | Line 554 | distribution functions are most easily seen in the fig
554   \end{description}
555  
556   The vectors (and angles) associated with these angular pair
557 < distribution functions are most easily seen in the figure below:
557 > distribution functions are most easily seen in
558 > Fig.~\ref{oopseFig:gofr}
559  
560   \begin{figure}
561   \centering
# Line 354 | Line 576 | The options available for {\tt StaticProps} are as fol
576   \endfoot
577    -h& {\tt -{}-help}                    &  Print help and exit \\
578    -V& {\tt -{}-version}                 &  Print version and exit \\
579 <  -i& {\tt -{}-input=filename}          &  input dump file \\
580 <  -o& {\tt -{}-output=filename}         &  output file name \\
581 <  -n& {\tt -{}-step=INT}                &  process every n frame  (default=`1') \\
582 <  -r& {\tt -{}-nrbins=INT}              &  number of bins for distance  (default=`100') \\
583 <  -a& {\tt -{}-nanglebins=INT}          &  number of bins for cos(angle)  (default= `50') \\
584 <  -l& {\tt -{}-length=DOUBLE}           &  maximum length (Defaults to 1/2 smallest length of first frame) \\
585 <    & {\tt -{}-sele1=selection script}   & select the first StuntDouble set \\
586 <    & {\tt -{}-sele2=selection script}   & select the second StuntDouble set \\
587 <    & {\tt -{}-sele3=selection script}   & select the third StuntDouble set \\
588 <    & {\tt -{}-refsele=selection script} & select reference (can only be used with {\tt -{}-gxyz}) \\
589 <    & {\tt -{}-molname=STRING}           & molecule name \\
590 <    & {\tt -{}-begin=INT}                & begin internal index \\
591 <    & {\tt -{}-end=INT}                  & end internal index \\
579 >  -i& {\tt -{}-input}          &  input dump file \\
580 >  -o& {\tt -{}-output}         &  output file name \\
581 >  -n& {\tt -{}-step}                &  process every n frame  (default=`1') \\
582 >  -r& {\tt -{}-nrbins}              &  number of bins for distance  (default=`100') \\
583 >  -a& {\tt -{}-nanglebins}          &  number of bins for cos(angle)  (default= `50') \\
584 >  -l& {\tt -{}-length}           &  maximum length (Defaults to 1/2 smallest length of first frame) \\
585 >    & {\tt -{}-sele1}   & select the first StuntDouble set \\
586 >    & {\tt -{}-sele2}   & select the second StuntDouble set \\
587 >    & {\tt -{}-sele3}   & select the third StuntDouble set \\
588 >    & {\tt -{}-refsele} & select reference (can only be used with {\tt -{}-gxyz}) \\
589 >    & {\tt -{}-molname}           & molecule name \\
590 >    & {\tt -{}-begin}                & begin internal index \\
591 >    & {\tt -{}-end}                  & end internal index \\
592   \hline
593   \multicolumn{3}{|l|}{One option from the following group of options is required:} \\
594   \hline
# Line 405 | Line 627 | The options available for DynamicProps are as follows:
627   different vectors).  The ability to use two selection scripts to
628   select different types of atoms is already present in the code.
629  
630 + For large simulations, the trajectory files can sometimes reach
631 + sizes in excess of several gigabytes. In order to prevent a
632 + situation where the program runs out of memory due to large
633 + trajectories, \texttt{dynamicProps} will estimate the size of free
634 + memory at first, and determine the number of frames in each block,
635 + which allows the operating system to load two blocks of data
636 + simultaneously without swapping. Upon reading two blocks of the
637 + trajectory, \texttt{dynamicProps} will calculate the time
638 + correlation within the first block and the cross correlations
639 + between the two blocks. This second block is then freed and then
640 + incremented and the process repeated until the end of the
641 + trajectory. Once the end is reached, the first block is freed then
642 + incremented, until all frame pairs have been correlated in time.
643 + This process is illustrated in
644 + Fig.~\ref{oopseFig:dynamicPropsProcess}.
645 +
646 + \begin{figure}
647 + \centering
648 + \includegraphics[width=\linewidth]{dynamicPropsProcess.eps}
649 + \caption[A representation of the block correlations in
650 + \texttt{dynamicProps}]{This diagram illustrates block correlations
651 + processing in \texttt{dynamicProps}. The shaded region represents
652 + the self correlation of the block, and the open blocks are read one
653 + at a time and the cross correlations between blocks are calculated.}
654 + \label{oopseFig:dynamicPropsProcess}
655 + \end{figure}
656 +
657   The options available for DynamicProps are as follows:
658   \begin{longtable}[c]{|EFG|}
659   \caption{DynamicProps Command-line Options}
# Line 415 | Line 664 | The options available for DynamicProps are as follows:
664   \endfoot
665    -h& {\tt -{}-help}                   & Print help and exit \\
666    -V& {\tt -{}-version}                & Print version and exit \\
667 <  -i& {\tt -{}-input=filename}         & input dump file \\
668 <  -o& {\tt -{}-output=filename}        & output file name \\
669 <    & {\tt -{}-sele1=selection script} & select first StuntDouble set \\
670 <    & {\tt -{}-sele2=selection script} & select second StuntDouble set (if sele2 is not set, use script from sele1) \\
667 >  -i& {\tt -{}-input}         & input dump file \\
668 >  -o& {\tt -{}-output}        & output file name \\
669 >    & {\tt -{}-sele1} & select first StuntDouble set \\
670 >    & {\tt -{}-sele2} & select second StuntDouble set (if sele2 is not set, use script from sele1) \\
671   \hline
672   \multicolumn{3}{|l|}{One option from the following group of options is required:} \\
673   \hline
# Line 427 | Line 676 | The options available for DynamicProps are as follows:
676    -d& {\tt -{}-dcorr}                  & compute dipole correlation function
677   \end{longtable}
678  
679 < \subsection{\label{appendixSection:hydrodynamics}Hydrodynamics}
679 > \section{\label{appendixSection:tools}Other Useful Utilities}
680 >
681 > \subsection{\label{appendixSection:Dump2XYZ}Dump2XYZ}
682 >
683 > {\tt Dump2XYZ} can transform an OOPSE dump file into a xyz file
684 > which can be opened by other molecular dynamics viewers such as Jmol
685 > and VMD\cite{Humphrey1996}. The options available for Dump2XYZ are
686 > as follows:
687 >
688 >
689 > \begin{longtable}[c]{|EFG|}
690 > \caption{Dump2XYZ Command-line Options}
691 > \\ \hline
692 > {\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline
693 > \endhead
694 > \hline
695 > \endfoot
696 >  -h & {\tt -{}-help} &                        Print help and exit \\
697 >  -V & {\tt -{}-version} &                     Print version and exit \\
698 >  -i & {\tt -{}-input}  &             input dump file \\
699 >  -o & {\tt -{}-output} &             output file name \\
700 >  -n & {\tt -{}-frame}   &                 print every n frame  (default=`1') \\
701 >  -w & {\tt -{}-water}       &                 skip the the waters  (default=off) \\
702 >  -m & {\tt -{}-periodicBox} &                 map to the periodic box  (default=off)\\
703 >  -z & {\tt -{}-zconstraint}  &                replace the atom types of zconstraint molecules  (default=off) \\
704 >  -r & {\tt -{}-rigidbody}  &                  add a pseudo COM atom to rigidbody  (default=off) \\
705 >  -t & {\tt -{}-watertype} &                   replace the atom type of water model (default=on) \\
706 >  -b & {\tt -{}-basetype}  &                   using base atom type  (default=off) \\
707 >     & {\tt -{}-repeatX}  &                 The number of images to repeat in the x direction  (default=`0') \\
708 >     & {\tt -{}-repeatY} &                 The number of images to repeat in the y direction  (default=`0') \\
709 >     &  {\tt -{}-repeatZ}  &                The number of images to repeat in the z direction  (default=`0') \\
710 >  -s & {\tt -{}-selection} & By specifying {\tt -{}-selection}=``selection command'' with Dump2XYZ, the user can select an arbitrary set of StuntDoubles to be
711 > converted. \\
712 >     & {\tt -{}-originsele} & By specifying {\tt -{}-originsele}=``selection command'' with Dump2XYZ, the user can re-center the origin of the system around a specific StuntDouble \\
713 >     & {\tt -{}-refsele} &  In order to rotate the system, {\tt -{}-originsele} and {\tt -{}-refsele} must be given to define the new coordinate set. A StuntDouble which contains a dipole (the direction of the dipole is always (0, 0, 1) in body frame) is specified by {\tt -{}-originsele}. The new x-z plane is defined by the direction of the dipole and the StuntDouble is specified by {\tt -{}-refsele}.
714 > \end{longtable}
715 >
716 > \subsection{\label{appendixSection:hydrodynamics}Hydro}
717 >
718 > {\tt Hydro} can calculate resistance and diffusion tensors at the
719 > center of resistance. Both tensors at the center of diffusion can
720 > also be reported from the program, as well as the coordinates for
721 > the beads which are used to approximate the arbitrary shapes. The
722 > options available for Hydro are as follows:
723 > \begin{longtable}[c]{|EFG|}
724 > \caption{Hydrodynamics Command-line Options}
725 > \\ \hline
726 > {\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline
727 > \endhead
728 > \hline
729 > \endfoot
730 >  -h & {\tt -{}-help} &                        Print help and exit \\
731 >  -V & {\tt -{}-version} &                     Print version and exit \\
732 >  -i & {\tt -{}-input}  &             input dump file \\
733 >  -o & {\tt -{}-output} &             output file prefix  (default=`hydro') \\
734 >  -b & {\tt -{}-beads}  &                   generate the beads only, hydrodynamics calculation will not be performed (default=off)\\
735 >     & {\tt -{}-model}  &                 hydrodynamics model (supports ``AnalyticalModel'', ``RoughShell'' and ``BeadModel'') \\
736 > \end{longtable}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines