--- trunk/tengDissertation/Appendix.tex 2006/06/06 20:49:05 2806 +++ trunk/tengDissertation/Appendix.tex 2006/06/08 07:27:56 2822 @@ -1,11 +1,11 @@ \appendix -\chapter{\label{chapt:appendix}APPENDIX} +\chapter{\label{chapt:oopse}Object-Oriented Parallel Simulation Engine} Designing object-oriented software is hard, and designing reusable object-oriented scientific software is even harder. Absence of applying modern software development practices is the bottleneck of -Scientific Computing community\cite{wilson}. For instance, in the -last 20 years , there are quite a few MD packages that were +Scientific Computing community\cite{Wilson2006}. For instance, in +the last 20 years , there are quite a few MD packages that were developed to solve common MD problems and perform robust simulations . However, many of the codes are legacy programs that are either poorly organized or extremely complex. Usually, these packages were @@ -14,20 +14,84 @@ documents which is crucial to the maintenance and exte coordination to enforce design and programming guidelines. Moreover, most MD programs also suffer from missing design and implement documents which is crucial to the maintenance and extensibility. +Along the way of studying structural and dynamic processes in +condensed phase systems like biological membranes and nanoparticles, +we developed and maintained an Object-Oriented Parallel Simulation +Engine ({\sc OOPSE}). This new molecular dynamics package has some +unique features +\begin{enumerate} + \item {\sc OOPSE} performs Molecular Dynamics (MD) simulations on non-standard +atom types (transition metals, point dipoles, sticky potentials, +Gay-Berne ellipsoids, or other "lumpy"atoms with orientational +degrees of freedom), as well as rigid bodies. + \item {\sc OOPSE} uses a force-based decomposition algorithm using MPI on cheap +Beowulf clusters to obtain very efficient parallelism. + \item {\sc OOPSE} integrates the equations of motion using advanced methods for +orientational dynamics in NVE, NVT, NPT, NPAT, and NP$\gamma$T +ensembles. + \item {\sc OOPSE} can carry out simulations on metallic systems using the +Embedded Atom Method (EAM) as well as the Sutton-Chen potential. + \item {\sc OOPSE} can perform simulations on Gay-Berne liquid crystals. + \item {\sc OOPSE} can simulate systems containing the extremely efficient +extended-Soft Sticky Dipole (SSD/E) model for water. +\end{enumerate} +\section{\label{appendixSection:architecture }Architecture} + +Mainly written by \texttt{C/C++} and \texttt{Fortran90}, {\sc OOPSE} +uses C++ Standard Template Library (STL) and fortran modules as the +foundation. As an extensive set of the STL and Fortran90 modules, +{\sc Base Classes} provide generic implementations of mathematical +objects (e.g., matrices, vectors, polynomials, random number +generators) and advanced data structures and algorithms(e.g., tuple, +bitset, generic data, string manipulation). The molecular data +structures for the representation of atoms, bonds, bends, torsions, +rigid bodies and molecules \textit{etc} are contained in the {\sc +Kernel} which is implemented with {\sc Base Classes} and are +carefully designed to provide maximum extensibility and flexibility. +The functionality required for applications is provide by the third +layer which contains Input/Output, Molecular Mechanics and Structure +modules. Input/Output module not only implements general methods for +file handling, but also defines a generic force field interface. +Another important component of Input/Output module is the meta-data +file parser, which is rewritten using ANother Tool for Language +Recognition(ANTLR)\cite{Parr1995, Schaps1999} syntax. The Molecular +Mechanics module consists of energy minimization and a wide +varieties of integration methods(see Chap.~\ref{chapt:methodology}). +The structure module contains a flexible and powerful selection +library which syntax is elaborated in +Sec.~\ref{appendixSection:syntax}. The top layer is made of the main +program of the package, \texttt{oopse} and it corresponding parallel +version \texttt{oopse\_MPI}, as well as other useful utilities, such +as \texttt{StatProps} (see Sec.~\ref{appendixSection:StaticProps}), +\texttt{DynamicProps} (see +Sec.~\ref{appendixSection:appendixSection:DynamicProps}), +\texttt{Dump2XYZ} (see +Sec.~\ref{appendixSection:appendixSection:Dump2XYZ}), \texttt{Hydro} +(see Sec.~\ref{appendixSection:appendixSection:hydrodynamics}) +\textit{etc}. + +\begin{figure} +\centering +\includegraphics[width=\linewidth]{architecture.eps} +\caption[The architecture of {\sc OOPSE}] {Overview of the structure +of {\sc OOPSE}} \label{appendixFig:architecture} +\end{figure} + \section{\label{appendixSection:desginPattern}Design Pattern} Design patterns are optimal solutions to commonly-occurring problems in software design. Although originated as an architectural concept -for buildings and towns by Christopher Alexander \cite{alexander}, -software patterns first became popular with the wide acceptance of -the book, Design Patterns: Elements of Reusable Object-Oriented -Software \cite{gamma94}. Patterns reflect the experience, knowledge -and insights of developers who have successfully used these patterns -in their own work. Patterns are reusable. They provide a ready-made -solution that can be adapted to different problems as necessary. -Pattern are expressive. they provide a common vocabulary of -solutions that can express large solutions succinctly. +for buildings and towns by Christopher Alexander +\cite{Alexander1987}, software patterns first became popular with +the wide acceptance of the book, Design Patterns: Elements of +Reusable Object-Oriented Software \cite{Gamma1994}. Patterns reflect +the experience, knowledge and insights of developers who have +successfully used these patterns in their own work. Patterns are +reusable. They provide a ready-made solution that can be adapted to +different problems as necessary. Pattern are expressive. they +provide a common vocabulary of solutions that can express large +solutions succinctly. Patterns are usually described using a format that includes the following information: @@ -48,35 +112,159 @@ the modern scientific software applications, such as J As one of the latest advanced techniques emerged from object-oriented community, design patterns were applied in some of -the modern scientific software applications, such as JMol, OOPSE -\cite{Meineke05} and PROTOMOL \cite{Matthey05} \textit{etc}. +the modern scientific software applications, such as JMol, {\sc +OOPSE}\cite{Meineke05} and PROTOMOL\cite{Matthey05} \textit{etc}. +The following sections enumerates some of the patterns used in {\sc +OOPSE}. \subsection{\label{appendixSection:singleton}Singleton} -The Singleton pattern ensures that only one instance of a class is -created. All objects that use an instance of that class use the same -instance. +The Singleton pattern not only provides a mechanism to restrict +instantiation of a class to one object, but also provides a global +point of access to the object. Currently implemented as a global +variable, the logging utility which reports error and warning +messages to the console in {\sc OOPSE} is a good candidate for +applying the Singleton pattern to avoid the global namespace +pollution.Although the singleton pattern can be implemented in +various ways to account for different aspects of the software +designs, such as lifespan control \textit{etc}, we only use the +static data approach in {\sc OOPSE}. {\tt IntegratorFactory} class +is declared as +\begin{lstlisting}[float,caption={[A classic Singleton design pattern implementation(I)] Declaration of {\tt IntegratorFactory} class.},label={appendixScheme:singletonDeclaration}] + class IntegratorFactory { + public: + static IntegratorFactory* getInstance(); + protected: + IntegratorFactory(); + private: + static IntegratorFactory* instance_; + }; +\end{lstlisting} +The corresponding implementation is +\begin{lstlisting}[float,caption={[A classic Singleton design pattern implementation(II)] Implementation of {\tt IntegratorFactory} class.},label={appendixScheme:singletonImplementation}] + +IntegratorFactory::instance_ = NULL; + +IntegratorFactory* getInstance() { + if (instance_ == NULL){ + instance_ = new IntegratorFactory; + } + return instance_; +} +\end{lstlisting} +Since constructor is declared as {\tt protected}, a client can not +instantiate {\tt IntegratorFactory} directly. Moreover, since the +member function {\tt getInstance} serves as the only entry of access +to {\tt IntegratorFactory}, this approach fulfills the basic +requirement, a single instance. Another consequence of this approach +is the automatic destruction since static data are destroyed upon +program termination. + \subsection{\label{appendixSection:factoryMethod}Factory Method} -The Factory Method pattern is a creational pattern which deals with -the problem of creating objects without specifying the exact class -of object that will be created. Factory Method solves this problem -by defining a separate method for creating the objects, which -subclasses can then override to specify the derived type of product -that will be created. +Categoried as a creational pattern, the Factory Method pattern deals +with the problem of creating objects without specifying the exact +class of object that will be created. Factory Method is typically +implemented by delegating the creation operation to the subclasses. +Registers a creator with a type identifier. Looks up the type +identifier in the internal map. If it is found, it invokes the +corresponding creator for the type identifier and returns its +result. +\begin{lstlisting}[float,caption={[].},label={appendixScheme:factoryDeclaration}] + class IntegratorCreator; + class IntegratorFactory { + public: + typedef std::map CreatorMapType; + + bool registerIntegrator(IntegratorCreator* creator); + + Integrator* createIntegrator(const std::string& id, SimInfo* info); + + private: + CreatorMapType creatorMap_; + }; +\end{lstlisting} + +\begin{lstlisting}[float,caption={[].},label={appendixScheme:factoryDeclarationImplementation}] + bool IntegratorFactory::unregisterIntegrator(const std::string& id) { + return creatorMap_.erase(id) == 1; + } + + Integrator* + IntegratorFactory::createIntegrator(const std::string& id, SimInfo* info) { + CreatorMapType::iterator i = creatorMap_.find(id); + if (i != creatorMap_.end()) { + //invoke functor to create object + return (i->second)->create(info); + } else { + return NULL; + } + } +\end{lstlisting} + +\begin{lstlisting}[float,caption={[].},label={appendixScheme:integratorCreator}] + + class IntegratorCreator { + public: + IntegratorCreator(const std::string& ident) : ident_(ident) {} + + const std::string& getIdent() const { return ident_; } + + virtual Integrator* create(SimInfo* info) const = 0; + + private: + std::string ident_; + }; + + template + class IntegratorBuilder : public IntegratorCreator { + public: + IntegratorBuilder(const std::string& ident) : IntegratorCreator(ident) {} + virtual Integrator* create(SimInfo* info) const { + return new ConcreteIntegrator(info); + } + }; +\end{lstlisting} + \subsection{\label{appendixSection:visitorPattern}Visitor} + The purpose of the Visitor Pattern is to encapsulate an operation that you want to perform on the elements of a data structure. In this way, you can change the operation being performed on a -structure without the need of changing the classes of the elements -that you are operating on. +structure without the need of changing the class heirarchy of the +elements that you are operating on. - -\subsection{\label{appendixSection:templateMethod}Template Method} - -\section{\label{appendixSection:analysisFramework}Analysis Framework} +\begin{lstlisting}[float,caption={[].},label={appendixScheme:visitor}] + class BaseVisitor{ + public: + virtual void visit(Atom* atom); + virtual void visit(DirectionalAtom* datom); + virtual void visit(RigidBody* rb); + }; +\end{lstlisting} +\begin{lstlisting}[float,caption={[].},label={appendixScheme:element}] + class StuntDouble { + public: + virtual void accept(BaseVisitor* v) = 0; + }; + class Atom: public StuntDouble { + public: + virtual void accept{BaseVisitor* v*} {v->visit(this);} + }; + + class DirectionalAtom: public Atom { + public: + virtual void accept{BaseVisitor* v*} {v->visit(this);} + }; + + class RigidBody: public StuntDouble { + public: + virtual void accept{BaseVisitor* v*} {v->visit(this);} + }; + +\end{lstlisting} \section{\label{appendixSection:concepts}Concepts} OOPSE manipulates both traditional atoms as well as some objects @@ -102,7 +290,7 @@ Every Molecule, Atom and DirectionalAtom in {\sc oopse DirectionalAtom}s which behaves as a single unit. \end{itemize} -Every Molecule, Atom and DirectionalAtom in {\sc oopse} have their +Every Molecule, Atom and DirectionalAtom in {\sc OOPSE} have their own names which are specified in the {\tt .md} file. In contrast, RigidBodies are denoted by their membership and index inside a particular molecule: [MoleculeName]\_RB\_[index] (the contents @@ -113,15 +301,14 @@ expression}} \section{\label{appendixSection:syntax}Syntax of the Select Command} The most general form of the select command is: {\tt select {\it -expression}} +expression}}. This expression represents an arbitrary set of +StuntDoubles (Atoms or RigidBodies) in {\sc OOPSE}. Expressions are +composed of either name expressions, index expressions, predefined +sets, user-defined expressions, comparison operators, within +expressions, or logical combinations of the above expression types. +Expressions can be combined using parentheses and the Boolean +operators. -This expression represents an arbitrary set of StuntDoubles (Atoms -or RigidBodies) in {\sc oopse}. Expressions are composed of either -name expressions, index expressions, predefined sets, user-defined -expressions, comparison operators, within expressions, or logical -combinations of the above expression types. Expressions can be -combined using parentheses and the Boolean operators. - \subsection{\label{appendixSection:logical}Logical expressions} The logical operators allow complex queries to be constructed out of @@ -203,10 +390,9 @@ expression}} Users can define arbitrary terms to represent groups of StuntDoubles, and then use the define terms in select commands. The general form for the define command is: {\bf define {\it term -expression}} +expression}}. Once defined, the user can specify such terms in +boolean expressions -Once defined, the user can specify such terms in boolean expressions - {\tt define SSDWATER SSD or SSD1 or SSDRF} {\tt select SSDWATER} @@ -242,53 +428,19 @@ atoms. select all StuntDoubles which are within 2.5 angstroms of PO4 or NC4 atoms. -\section{\label{appendixSection:tools}Tools which use the selection command} -\subsection{\label{appendixSection:Dump2XYZ}Dump2XYZ} - -Dump2XYZ can transform an OOPSE dump file into a xyz file which can -be opened by other molecular dynamics viewers such as Jmol and VMD. -The options available for Dump2XYZ are as follows: - - -\begin{longtable}[c]{|EFG|} -\caption{Dump2XYZ Command-line Options} -\\ \hline -{\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline -\endhead -\hline -\endfoot - -h & {\tt -{}-help} & Print help and exit \\ - -V & {\tt -{}-version} & Print version and exit \\ - -i & {\tt -{}-input=filename} & input dump file \\ - -o & {\tt -{}-output=filename} & output file name \\ - -n & {\tt -{}-frame=INT} & print every n frame (default=`1') \\ - -w & {\tt -{}-water} & skip the the waters (default=off) \\ - -m & {\tt -{}-periodicBox} & map to the periodic box (default=off)\\ - -z & {\tt -{}-zconstraint} & replace the atom types of zconstraint molecules (default=off) \\ - -r & {\tt -{}-rigidbody} & add a pseudo COM atom to rigidbody (default=off) \\ - -t & {\tt -{}-watertype} & replace the atom type of water model (default=on) \\ - -b & {\tt -{}-basetype} & using base atom type (default=off) \\ - & {\tt -{}-repeatX=INT} & The number of images to repeat in the x direction (default=`0') \\ - & {\tt -{}-repeatY=INT} & The number of images to repeat in the y direction (default=`0') \\ - & {\tt -{}-repeatZ=INT} & The number of images to repeat in the z direction (default=`0') \\ - -s & {\tt -{}-selection=selection script} & By specifying {\tt -{}-selection}=``selection command'' with Dump2XYZ, the user can select an arbitrary set of StuntDoubles to be -converted. \\ - & {\tt -{}-originsele} & By specifying {\tt -{}-originsele}=``selection command'' with Dump2XYZ, the user can re-center the origin of the system around a specific StuntDouble \\ - & {\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}. -\end{longtable} +\section{\label{appendixSection:analysisFramework}Analysis Framework} - \subsection{\label{appendixSection:StaticProps}StaticProps} {\tt StaticProps} can compute properties which are averaged over some or all of the configurations that are contained within a dump file. The most common example of a static property that can be computed is the pair distribution function between atoms of type $A$ -and other atoms of type $B$, $g_{AB}(r)$. StaticProps can also be -used to compute the density distributions of other molecules in a -reference frame {\it fixed to the body-fixed reference frame} of a -selected atom or rigid body. +and other atoms of type $B$, $g_{AB}(r)$. {\tt StaticProps} can +also be used to compute the density distributions of other molecules +in a reference frame {\it fixed to the body-fixed reference frame} +of a selected atom or rigid body. There are five seperate radial distribution functions availiable in OOPSE. Since every radial distrbution function invlove the @@ -344,6 +496,25 @@ The options available for {\tt StaticProps} are as fol their body-fixed frames.} \label{oopseFig:gofr} \end{figure} +Due to the fact that the selected StuntDoubles from two selections +may be overlapped, {\tt StaticProps} performs the calculation in +three stages which are illustrated in +Fig.~\ref{oopseFig:staticPropsProcess}. + +\begin{figure} +\centering +\includegraphics[width=\linewidth]{staticPropsProcess.eps} +\caption[A representation of the three-stage correlations in +\texttt{StaticProps}]{This diagram illustrates three-stage +processing used by \texttt{StaticProps}. $S_1$ and $S_2$ are the +numbers of selected stuntdobules from {\tt -{}-sele1} and {\tt +-{}-sele2} respectively, while $C$ is the number of stuntdobules +appearing at both sets. The first stage($S_1-C$ and $S_2$) and +second stages ($S_1$ and $S_2-C$) are completely non-overlapping. On +the contrary, the third stage($C$ and $C$) are completely +overlapping} \label{oopseFig:staticPropsProcess} +\end{figure} + The options available for {\tt StaticProps} are as follows: \begin{longtable}[c]{|EFG|} \caption{StaticProps Command-line Options} @@ -354,19 +525,19 @@ The options available for {\tt StaticProps} are as fol \endfoot -h& {\tt -{}-help} & Print help and exit \\ -V& {\tt -{}-version} & Print version and exit \\ - -i& {\tt -{}-input=filename} & input dump file \\ - -o& {\tt -{}-output=filename} & output file name \\ - -n& {\tt -{}-step=INT} & process every n frame (default=`1') \\ - -r& {\tt -{}-nrbins=INT} & number of bins for distance (default=`100') \\ - -a& {\tt -{}-nanglebins=INT} & number of bins for cos(angle) (default= `50') \\ - -l& {\tt -{}-length=DOUBLE} & maximum length (Defaults to 1/2 smallest length of first frame) \\ - & {\tt -{}-sele1=selection script} & select the first StuntDouble set \\ - & {\tt -{}-sele2=selection script} & select the second StuntDouble set \\ - & {\tt -{}-sele3=selection script} & select the third StuntDouble set \\ - & {\tt -{}-refsele=selection script} & select reference (can only be used with {\tt -{}-gxyz}) \\ - & {\tt -{}-molname=STRING} & molecule name \\ - & {\tt -{}-begin=INT} & begin internal index \\ - & {\tt -{}-end=INT} & end internal index \\ + -i& {\tt -{}-input} & input dump file \\ + -o& {\tt -{}-output} & output file name \\ + -n& {\tt -{}-step} & process every n frame (default=`1') \\ + -r& {\tt -{}-nrbins} & number of bins for distance (default=`100') \\ + -a& {\tt -{}-nanglebins} & number of bins for cos(angle) (default= `50') \\ + -l& {\tt -{}-length} & maximum length (Defaults to 1/2 smallest length of first frame) \\ + & {\tt -{}-sele1} & select the first StuntDouble set \\ + & {\tt -{}-sele2} & select the second StuntDouble set \\ + & {\tt -{}-sele3} & select the third StuntDouble set \\ + & {\tt -{}-refsele} & select reference (can only be used with {\tt -{}-gxyz}) \\ + & {\tt -{}-molname} & molecule name \\ + & {\tt -{}-begin} & begin internal index \\ + & {\tt -{}-end} & end internal index \\ \hline \multicolumn{3}{|l|}{One option from the following group of options is required:} \\ \hline @@ -405,6 +576,34 @@ The options available for DynamicProps are as follows: different vectors). The ability to use two selection scripts to select different types of atoms is already present in the code. +For large simulations, the trajectory files can sometimes reach +sizes in excess of several gigabytes. In order to effectively +analyze that amount of data. In order to prevent a situation where +the program runs out of memory due to large trajectories, +\texttt{dynamicProps} will estimate the size of free memory at +first, and determine the number of frames in each block, which +allows the operating system to load two blocks of data +simultaneously without swapping. Upon reading two blocks of the +trajectory, \texttt{dynamicProps} will calculate the time +correlation within the first block and the cross correlations +between the two blocks. This second block is then freed and then +incremented and the process repeated until the end of the +trajectory. Once the end is reached, the first block is freed then +incremented, until all frame pairs have been correlated in time. +This process is illustrated in +Fig.~\ref{oopseFig:dynamicPropsProcess}. + +\begin{figure} +\centering +\includegraphics[width=\linewidth]{dynamicPropsProcess.eps} +\caption[A representation of the block correlations in +\texttt{dynamicProps}]{This diagram illustrates block correlations +processing in \texttt{dynamicProps}. The shaded region represents +the self correlation of the block, and the open blocks are read one +at a time and the cross correlations between blocks are calculated.} +\label{oopseFig:dynamicPropsProcess} +\end{figure} + The options available for DynamicProps are as follows: \begin{longtable}[c]{|EFG|} \caption{DynamicProps Command-line Options} @@ -415,10 +614,10 @@ The options available for DynamicProps are as follows: \endfoot -h& {\tt -{}-help} & Print help and exit \\ -V& {\tt -{}-version} & Print version and exit \\ - -i& {\tt -{}-input=filename} & input dump file \\ - -o& {\tt -{}-output=filename} & output file name \\ - & {\tt -{}-sele1=selection script} & select first StuntDouble set \\ - & {\tt -{}-sele2=selection script} & select second StuntDouble set (if sele2 is not set, use script from sele1) \\ + -i& {\tt -{}-input} & input dump file \\ + -o& {\tt -{}-output} & output file name \\ + & {\tt -{}-sele1} & select first StuntDouble set \\ + & {\tt -{}-sele2} & select second StuntDouble set (if sele2 is not set, use script from sele1) \\ \hline \multicolumn{3}{|l|}{One option from the following group of options is required:} \\ \hline @@ -427,4 +626,61 @@ The options available for DynamicProps are as follows: -d& {\tt -{}-dcorr} & compute dipole correlation function \end{longtable} -\subsection{\label{appendixSection:hydrodynamics}Hydrodynamics} +\section{\label{appendixSection:tools}Other Useful Utilities} + +\subsection{\label{appendixSection:Dump2XYZ}Dump2XYZ} + +{\tt Dump2XYZ} can transform an OOPSE dump file into a xyz file +which can be opened by other molecular dynamics viewers such as Jmol +and VMD\cite{Humphrey1996}. The options available for Dump2XYZ are +as follows: + + +\begin{longtable}[c]{|EFG|} +\caption{Dump2XYZ Command-line Options} +\\ \hline +{\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline +\endhead +\hline +\endfoot + -h & {\tt -{}-help} & Print help and exit \\ + -V & {\tt -{}-version} & Print version and exit \\ + -i & {\tt -{}-input} & input dump file \\ + -o & {\tt -{}-output} & output file name \\ + -n & {\tt -{}-frame} & print every n frame (default=`1') \\ + -w & {\tt -{}-water} & skip the the waters (default=off) \\ + -m & {\tt -{}-periodicBox} & map to the periodic box (default=off)\\ + -z & {\tt -{}-zconstraint} & replace the atom types of zconstraint molecules (default=off) \\ + -r & {\tt -{}-rigidbody} & add a pseudo COM atom to rigidbody (default=off) \\ + -t & {\tt -{}-watertype} & replace the atom type of water model (default=on) \\ + -b & {\tt -{}-basetype} & using base atom type (default=off) \\ + & {\tt -{}-repeatX} & The number of images to repeat in the x direction (default=`0') \\ + & {\tt -{}-repeatY} & The number of images to repeat in the y direction (default=`0') \\ + & {\tt -{}-repeatZ} & The number of images to repeat in the z direction (default=`0') \\ + -s & {\tt -{}-selection} & By specifying {\tt -{}-selection}=``selection command'' with Dump2XYZ, the user can select an arbitrary set of StuntDoubles to be +converted. \\ + & {\tt -{}-originsele} & By specifying {\tt -{}-originsele}=``selection command'' with Dump2XYZ, the user can re-center the origin of the system around a specific StuntDouble \\ + & {\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}. +\end{longtable} + +\subsection{\label{appendixSection:hydrodynamics}Hydro} + +{\tt Hydro} can calculate resistance and diffusion tensors at the +center of resistance. Both tensors at the center of diffusion can +also be reported from the program, as well as the coordinates for +the beads which are used to approximate the arbitrary shapes. The +options available for Hydro are as follows: +\begin{longtable}[c]{|EFG|} +\caption{Hydrodynamics Command-line Options} +\\ \hline +{\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline +\endhead +\hline +\endfoot + -h & {\tt -{}-help} & Print help and exit \\ + -V & {\tt -{}-version} & Print version and exit \\ + -i & {\tt -{}-input} & input dump file \\ + -o & {\tt -{}-output} & output file prefix (default=`hydro') \\ + -b & {\tt -{}-beads} & generate the beads only, hydrodynamics calculation will not be performed (default=off)\\ + & {\tt -{}-model} & hydrodynamics model (supports ``AnalyticalModel'', ``RoughShell'' and ``BeadModel'') \\ +\end{longtable}