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 2693 by tim, Wed Apr 5 03:44:32 2006 UTC vs.
Revision 2809 by tim, Wed Jun 7 02:02:44 2006 UTC

# Line 1 | Line 1
1 + \appendix
2   \chapter{\label{chapt:appendix}APPENDIX}
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
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
# Line 18 | Line 19 | for buildings and towns by Christopher Alexander \cite
19  
20   Design patterns are optimal solutions to commonly-occurring problems
21   in software design. Although originated as an architectural concept
22 < for buildings and towns by Christopher Alexander \cite{alexander},
23 < software patterns first became popular with the wide acceptance of
24 < the book, Design Patterns: Elements of Reusable Object-Oriented
25 < Software \cite{gamma94}. Patterns reflect the experience, knowledge
26 < and insights of developers who have successfully used these patterns
27 < in their own work. Patterns are reusable. They provide a ready-made
28 < solution that can be adapted to different problems as necessary.
29 < Pattern are expressive. they provide a common vocabulary of
30 < solutions that can express large solutions succinctly.
22 > for buildings and towns by Christopher Alexander
23 > \cite{Alexander1987}, software patterns first became popular with
24 > the wide acceptance of the book, Design Patterns: Elements of
25 > Reusable Object-Oriented Software \cite{Gamma1994}. Patterns reflect
26 > the experience, knowledge and insights of developers who have
27 > successfully used these patterns in their own work. Patterns are
28 > reusable. They provide a ready-made solution that can be adapted to
29 > different problems as necessary. Pattern are expressive. they
30 > provide a common vocabulary of solutions that can express large
31 > solutions succinctly.
32  
33   Patterns are usually described using a format that includes the
34   following information:
# Line 76 | Line 78 | that you are operating on.
78  
79   \section{\label{appendixSection:analysisFramework}Analysis Framework}
80  
81 < \section{\label{appendixSection:hierarchy}Hierarchy}
81 > \section{\label{appendixSection:concepts}Concepts}
82  
83 < \subsection{\label{appendixSection:selectionSyntax}Selection Syntax}
83 > OOPSE manipulates both traditional atoms as well as some objects
84 > that {\it behave like atoms}.  These objects can be rigid
85 > collections of atoms or atoms which have orientational degrees of
86 > freedom.  Here is a diagram of the class heirarchy:
87  
88 < \subsection{\label{appendixSection:hydrodynamics}Hydrodynamics}
88 > %\begin{figure}
89 > %\centering
90 > %\includegraphics[width=3in]{heirarchy.eps}
91 > %\caption[Class heirarchy for StuntDoubles in {\sc oopse}-3.0]{ \\
92 > %The class heirarchy of StuntDoubles in {\sc oopse}-3.0. The
93 > %selection syntax allows the user to select any of the objects that
94 > %are descended from a StuntDouble.} \label{oopseFig:heirarchy}
95 > %\end{figure}
96  
97 < \subsection{\label{appendixSection:staticProps}Static Properties}
97 > \begin{itemize}
98 > \item A {\bf StuntDouble} is {\it any} object that can be manipulated by the
99 > integrators and minimizers.
100 > \item An {\bf Atom} is a fundamental point-particle that can be moved around during a simulation.
101 > \item A {\bf DirectionalAtom} is an atom which has {\it orientational} as well as translational degrees of freedom.
102 > \item A {\bf RigidBody} is a collection of {\bf Atom}s or {\bf
103 > DirectionalAtom}s which behaves as a single unit.
104 > \end{itemize}
105  
106 < \subsection{\label{appendixSection:dynamicProps}Dynamics Properties}
106 > Every Molecule, Atom and DirectionalAtom in {\sc oopse} have their
107 > own names which are specified in the {\tt .md} file. In contrast,
108 > RigidBodies are denoted by their membership and index inside a
109 > particular molecule: [MoleculeName]\_RB\_[index] (the contents
110 > inside the brackets depend on the specifics of the simulation). The
111 > names of rigid bodies are generated automatically. For example, the
112 > name of the first rigid body in a DMPC molecule is DMPC\_RB\_0.
113 >
114 > \section{\label{appendixSection:syntax}Syntax of the Select Command}
115 >
116 > The most general form of the select command is: {\tt select {\it
117 > expression}}
118 >
119 > This expression represents an arbitrary set of StuntDoubles (Atoms
120 > or RigidBodies) in {\sc oopse}. Expressions are composed of either
121 > name expressions, index expressions, predefined sets, user-defined
122 > expressions, comparison operators, within expressions, or logical
123 > combinations of the above expression types. Expressions can be
124 > combined using parentheses and the Boolean operators.
125 >
126 > \subsection{\label{appendixSection:logical}Logical expressions}
127 >
128 > The logical operators allow complex queries to be constructed out of
129 > simpler ones using the standard boolean connectives {\bf and}, {\bf
130 > or}, {\bf not}. Parentheses can be used to alter the precedence of
131 > the operators.
132 >
133 > \begin{center}
134 > \begin{tabular}{|ll|}
135 > \hline
136 > {\bf logical operator} & {\bf equivalent operator}  \\
137 > \hline
138 > and & ``\&'', ``\&\&'' \\
139 > or & ``$|$'', ``$||$'', ``,'' \\
140 > not & ``!''  \\
141 > \hline
142 > \end{tabular}
143 > \end{center}
144 >
145 > \subsection{\label{appendixSection:name}Name expressions}
146 >
147 > \begin{center}
148 > \begin{tabular}{|llp{2in}|}
149 > \hline {\bf type of expression} & {\bf examples} & {\bf translation
150 > of
151 > examples} \\
152 > \hline expression without ``.'' & select DMPC & select all
153 > StuntDoubles
154 > belonging to all DMPC molecules \\
155 > & select C* & select all atoms which have atom types beginning with C
156 > \\
157 > & select DMPC\_RB\_* & select all RigidBodies in DMPC molecules (but
158 > only select the rigid bodies, and not the atoms belonging to them). \\
159 > \hline expression has one ``.'' & select TIP3P.O\_TIP3P & select the
160 > O\_TIP3P
161 > atoms belonging to TIP3P molecules \\
162 > & select DMPC\_RB\_O.PO4 & select the PO4 atoms belonging to
163 > the first
164 > RigidBody in each DMPC molecule \\
165 > & select DMPC.20 & select the twentieth StuntDouble in each DMPC
166 > molecule \\
167 > \hline expression has two ``.''s & select DMPC.DMPC\_RB\_?.* &
168 > select all atoms
169 > belonging to all rigid bodies within all DMPC molecules \\
170 > \hline
171 > \end{tabular}
172 > \end{center}
173 >
174 > \subsection{\label{appendixSection:index}Index expressions}
175 >
176 > \begin{center}
177 > \begin{tabular}{|lp{4in}|}
178 > \hline
179 > {\bf examples} & {\bf translation of examples} \\
180 > \hline
181 > select 20 & select all of the StuntDoubles belonging to Molecule 20 \\
182 > select 20 to 30 & select all of the StuntDoubles belonging to
183 > molecules which have global indices between 20 (inclusive) and 30
184 > (exclusive) \\
185 > \hline
186 > \end{tabular}
187 > \end{center}
188 >
189 > \subsection{\label{appendixSection:predefined}Predefined sets}
190 >
191 > \begin{center}
192 > \begin{tabular}{|ll|}
193 > \hline
194 > {\bf keyword} & {\bf description} \\
195 > \hline
196 > all & select all StuntDoubles \\
197 > none & select none of the StuntDoubles \\
198 > \hline
199 > \end{tabular}
200 > \end{center}
201 >
202 > \subsection{\label{appendixSection:userdefined}User-defined expressions}
203 >
204 > Users can define arbitrary terms to represent groups of
205 > StuntDoubles, and then use the define terms in select commands. The
206 > general form for the define command is: {\bf define {\it term
207 > expression}}
208 >
209 > Once defined, the user can specify such terms in boolean expressions
210 >
211 > {\tt define SSDWATER SSD or SSD1 or SSDRF}
212 >
213 > {\tt select SSDWATER}
214 >
215 > \subsection{\label{appendixSection:comparison}Comparison expressions}
216 >
217 > StuntDoubles can be selected by using comparision operators on their
218 > properties. The general form for the comparison command is: a
219 > property name, followed by a comparision operator and then a number.
220 >
221 > \begin{center}
222 > \begin{tabular}{|l|l|}
223 > \hline
224 > {\bf property} & mass, charge \\
225 > {\bf comparison operator} & ``$>$'', ``$<$'', ``$=$'', ``$>=$'',
226 > ``$<=$'', ``$!=$'' \\
227 > \hline
228 > \end{tabular}
229 > \end{center}
230 >
231 > For example, the phrase {\tt select mass > 16.0 and charge < -2}
232 > would select StuntDoubles which have mass greater than 16.0 and
233 > charges less than -2.
234 >
235 > \subsection{\label{appendixSection:within}Within expressions}
236 >
237 > The ``within'' keyword allows the user to select all StuntDoubles
238 > within the specified distance (in Angstroms) from a selection,
239 > including the selected atom itself. The general form for within
240 > selection is: {\tt select within(distance, expression)}
241 >
242 > For example, the phrase {\tt select within(2.5, PO4 or NC4)} would
243 > select all StuntDoubles which are within 2.5 angstroms of PO4 or NC4
244 > atoms.
245 >
246 > \section{\label{appendixSection:tools}Tools which use the selection command}
247 >
248 > \subsection{\label{appendixSection:Dump2XYZ}Dump2XYZ}
249 >
250 > Dump2XYZ can transform an OOPSE dump file into a xyz file which can
251 > be opened by other molecular dynamics viewers such as Jmol and VMD.
252 > The options available for Dump2XYZ are as follows:
253 >
254 >
255 > \begin{longtable}[c]{|EFG|}
256 > \caption{Dump2XYZ Command-line Options}
257 > \\ \hline
258 > {\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline
259 > \endhead
260 > \hline
261 > \endfoot
262 >  -h & {\tt -{}-help} &                        Print help and exit \\
263 >  -V & {\tt -{}-version} &                     Print version and exit \\
264 >  -i & {\tt -{}-input}  &             input dump file \\
265 >  -o & {\tt -{}-output} &             output file name \\
266 >  -n & {\tt -{}-frame}   &                 print every n frame  (default=`1') \\
267 >  -w & {\tt -{}-water}       &                 skip the the waters  (default=off) \\
268 >  -m & {\tt -{}-periodicBox} &                 map to the periodic box  (default=off)\\
269 >  -z & {\tt -{}-zconstraint}  &                replace the atom types of zconstraint molecules  (default=off) \\
270 >  -r & {\tt -{}-rigidbody}  &                  add a pseudo COM atom to rigidbody  (default=off) \\
271 >  -t & {\tt -{}-watertype} &                   replace the atom type of water model (default=on) \\
272 >  -b & {\tt -{}-basetype}  &                   using base atom type  (default=off) \\
273 >     & {\tt -{}-repeatX}  &                 The number of images to repeat in the x direction  (default=`0') \\
274 >     & {\tt -{}-repeatY} &                 The number of images to repeat in the y direction  (default=`0') \\
275 >     &  {\tt -{}-repeatZ}  &                The number of images to repeat in the z direction  (default=`0') \\
276 >  -s & {\tt -{}-selection} & By specifying {\tt -{}-selection}=``selection command'' with Dump2XYZ, the user can select an arbitrary set of StuntDoubles to be
277 > converted. \\
278 >     & {\tt -{}-originsele} & By specifying {\tt -{}-originsele}=``selection command'' with Dump2XYZ, the user can re-center the origin of the system around a specific StuntDouble \\
279 >     & {\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}.
280 > \end{longtable}
281 >
282 >
283 > \subsection{\label{appendixSection:StaticProps}StaticProps}
284 >
285 > {\tt StaticProps} can compute properties which are averaged over
286 > some or all of the configurations that are contained within a dump
287 > file. The most common example of a static property that can be
288 > computed is the pair distribution function between atoms of type $A$
289 > and other atoms of type $B$, $g_{AB}(r)$.  StaticProps can also be
290 > used to compute the density distributions of other molecules in a
291 > reference frame {\it fixed to the body-fixed reference frame} of a
292 > selected atom or rigid body.
293 >
294 > There are five seperate radial distribution functions availiable in
295 > OOPSE. Since every radial distrbution function invlove the
296 > calculation between pairs of bodies, {\tt -{}-sele1} and {\tt
297 > -{}-sele2} must be specified to tell StaticProps which bodies to
298 > include in the calculation.
299 >
300 > \begin{description}
301 > \item[{\tt -{}-gofr}] Computes the pair distribution function,
302 > \begin{equation*}
303 > g_{AB}(r) = \frac{1}{\rho_B}\frac{1}{N_A} \langle \sum_{i \in A}
304 > \sum_{j \in B} \delta(r - r_{ij}) \rangle
305 > \end{equation*}
306 > \item[{\tt -{}-r\_theta}] Computes the angle-dependent pair distribution
307 > function. The angle is defined by the intermolecular vector
308 > $\vec{r}$ and $z$-axis of DirectionalAtom A,
309 > \begin{equation*}
310 > g_{AB}(r, \cos \theta) = \frac{1}{\rho_B}\frac{1}{N_A} \langle
311 > \sum_{i \in A} \sum_{j \in B} \delta(r - r_{ij}) \delta(\cos
312 > \theta_{ij} - \cos \theta)\rangle
313 > \end{equation*}
314 > \item[{\tt -{}-r\_omega}] Computes the angle-dependent pair distribution
315 > function. The angle is defined by the $z$-axes of the two
316 > DirectionalAtoms A and B.
317 > \begin{equation*}
318 > g_{AB}(r, \cos \omega) = \frac{1}{\rho_B}\frac{1}{N_A} \langle
319 > \sum_{i \in A} \sum_{j \in B} \delta(r - r_{ij}) \delta(\cos
320 > \omega_{ij} - \cos \omega)\rangle
321 > \end{equation*}
322 > \item[{\tt -{}-theta\_omega}] Computes the pair distribution in the angular
323 > space $\theta, \omega$ defined by the two angles mentioned above.
324 > \begin{equation*}
325 > g_{AB}(\cos\theta, \cos \omega) = \frac{1}{\rho_B}\frac{1}{N_A}
326 > \langle \sum_{i \in A} \sum_{j \in B} \langle \delta(\cos
327 > \theta_{ij} - \cos \theta) \delta(\cos \omega_{ij} - \cos
328 > \omega)\rangle
329 > \end{equation*}
330 > \item[{\tt -{}-gxyz}] Calculates the density distribution of particles of type
331 > B in the body frame of particle A. Therefore, {\tt -{}-originsele}
332 > and {\tt -{}-refsele} must be given to define A's internal
333 > coordinate set as the reference frame for the calculation.
334 > \end{description}
335 >
336 > The vectors (and angles) associated with these angular pair
337 > distribution functions are most easily seen in the figure below:
338 >
339 > \begin{figure}
340 > \centering
341 > \includegraphics[width=3in]{definition.eps}
342 > \caption[Definitions of the angles between directional objects]{ \\
343 > Any two directional objects (DirectionalAtoms and RigidBodies) have
344 > a set of two angles ($\theta$, and $\omega$) between the z-axes of
345 > their body-fixed frames.} \label{oopseFig:gofr}
346 > \end{figure}
347 >
348 > The options available for {\tt StaticProps} are as follows:
349 > \begin{longtable}[c]{|EFG|}
350 > \caption{StaticProps Command-line Options}
351 > \\ \hline
352 > {\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline
353 > \endhead
354 > \hline
355 > \endfoot
356 >  -h& {\tt -{}-help}                    &  Print help and exit \\
357 >  -V& {\tt -{}-version}                 &  Print version and exit \\
358 >  -i& {\tt -{}-input}          &  input dump file \\
359 >  -o& {\tt -{}-output}         &  output file name \\
360 >  -n& {\tt -{}-step}                &  process every n frame  (default=`1') \\
361 >  -r& {\tt -{}-nrbins}              &  number of bins for distance  (default=`100') \\
362 >  -a& {\tt -{}-nanglebins}          &  number of bins for cos(angle)  (default= `50') \\
363 >  -l& {\tt -{}-length}           &  maximum length (Defaults to 1/2 smallest length of first frame) \\
364 >    & {\tt -{}-sele1}   & select the first StuntDouble set \\
365 >    & {\tt -{}-sele2}   & select the second StuntDouble set \\
366 >    & {\tt -{}-sele3}   & select the third StuntDouble set \\
367 >    & {\tt -{}-refsele} & select reference (can only be used with {\tt -{}-gxyz}) \\
368 >    & {\tt -{}-molname}           & molecule name \\
369 >    & {\tt -{}-begin}                & begin internal index \\
370 >    & {\tt -{}-end}                  & end internal index \\
371 > \hline
372 > \multicolumn{3}{|l|}{One option from the following group of options is required:} \\
373 > \hline
374 >    &  {\tt -{}-gofr}                    &  $g(r)$ \\
375 >    &  {\tt -{}-r\_theta}                 &  $g(r, \cos(\theta))$ \\
376 >    &  {\tt -{}-r\_omega}                 &  $g(r, \cos(\omega))$ \\
377 >    &  {\tt -{}-theta\_omega}             &  $g(\cos(\theta), \cos(\omega))$ \\
378 >    &  {\tt -{}-gxyz}                    &  $g(x, y, z)$ \\
379 >    &  {\tt -{}-p2}                      &  $P_2$ order parameter ({\tt -{}-sele1} and {\tt -{}-sele2} must be specified) \\
380 >    &  {\tt -{}-scd}                     &  $S_{CD}$ order parameter(either {\tt -{}-sele1}, {\tt -{}-sele2}, {\tt -{}-sele3} are specified or {\tt -{}-molname}, {\tt -{}-begin}, {\tt -{}-end} are specified) \\
381 >    &  {\tt -{}-density}                 &  density plot ({\tt -{}-sele1} must be specified) \\
382 >    &  {\tt -{}-slab\_density}           &  slab density ({\tt -{}-sele1} must be specified)
383 > \end{longtable}
384 >
385 > \subsection{\label{appendixSection:DynamicProps}DynamicProps}
386 >
387 > {\tt DynamicProps} computes time correlation functions from the
388 > configurations stored in a dump file.  Typical examples of time
389 > correlation functions are the mean square displacement and the
390 > velocity autocorrelation functions.   Once again, the selection
391 > syntax can be used to specify the StuntDoubles that will be used for
392 > the calculation.  A general time correlation function can be thought
393 > of as:
394 > \begin{equation}
395 > C_{AB}(t) = \langle \vec{u}_A(t) \cdot \vec{v}_B(0) \rangle
396 > \end{equation}
397 > where $\vec{u}_A(t)$ is a vector property associated with an atom of
398 > type $A$ at time $t$, and $\vec{v}_B(t^{\prime})$ is a different
399 > vector property associated with an atom of type $B$ at a different
400 > time $t^{\prime}$.  In most autocorrelation functions, the vector
401 > properties ($\vec{v}$ and $\vec{u}$) and the types of atoms ($A$ and
402 > $B$) are identical, and the three calculations built in to {\tt
403 > DynamicProps} make these assumptions.  It is possible, however, to
404 > make simple modifications to the {\tt DynamicProps} code to allow
405 > the use of {\it cross} time correlation functions (i.e. with
406 > different vectors).  The ability to use two selection scripts to
407 > select different types of atoms is already present in the code.
408 >
409 > The options available for DynamicProps are as follows:
410 > \begin{longtable}[c]{|EFG|}
411 > \caption{DynamicProps Command-line Options}
412 > \\ \hline
413 > {\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline
414 > \endhead
415 > \hline
416 > \endfoot
417 >  -h& {\tt -{}-help}                   & Print help and exit \\
418 >  -V& {\tt -{}-version}                & Print version and exit \\
419 >  -i& {\tt -{}-input}         & input dump file \\
420 >  -o& {\tt -{}-output}        & output file name \\
421 >    & {\tt -{}-sele1} & select first StuntDouble set \\
422 >    & {\tt -{}-sele2} & select second StuntDouble set (if sele2 is not set, use script from sele1) \\
423 > \hline
424 > \multicolumn{3}{|l|}{One option from the following group of options is required:} \\
425 > \hline
426 >  -r& {\tt -{}-rcorr}                  & compute mean square displacement \\
427 >  -v& {\tt -{}-vcorr}                  & compute velocity correlation function \\
428 >  -d& {\tt -{}-dcorr}                  & compute dipole correlation function
429 > \end{longtable}
430 >
431 > \subsection{\label{appendixSection:hydrodynamics}Hydrodynamics}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines