ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/oopsePaper/analysis.tex
Revision: 697
Committed: Thu Aug 14 17:24:38 2003 UTC (21 years, 1 month ago) by mmeineke
Content type: application/x-tex
File size: 6131 byte(s)
Log Message:
finished a rough draft of the dynamicProps section. added calculation sheme to the staticProps

File Contents

# User Rev Content
1 mmeineke 662 \section{Analysis Code}
2    
3 mmeineke 668 \subsection{Static Property Analysis}
4     The static properties of the trajectories are analyzed with the
5 mmeineke 697 program \texttt{staticProps}. The code is capable of calculating the following
6 mmeineke 695 pair correlations between species A and B:
7 mmeineke 668 \begin{itemize}
8 mmeineke 691 \item $g_{\text{AB}}(r)$: Eq.~\ref{eq:gofr}
9     \item $g_{\text{AB}}(r, \cos \theta)$: Eq.~\ref{eq:gofrCosTheta}
10     \item $g_{\text{AB}}(r, \cos \omega)$: Eq.~\ref{eq:gofrCosOmega}
11     \item $g_{\text{AB}}(x, y, z)$: Eq.~\ref{eq:gofrXYZ}
12 mmeineke 668 \item $\langle \cos \omega \rangle_{\text{AB}}(r)$:
13 mmeineke 691 Eq.~\ref{eq:cosOmegaOfR}
14 mmeineke 668 \end{itemize}
15 mmeineke 662
16 mmeineke 695 The first pair correlation, $g_{\text{AB}}(r)$, is defined as follows:
17 mmeineke 691 \begin{equation}
18     g_{\text{AB}}(r) = \frac{V}{N_{\text{A}}N_{\text{B}}}\langle %%
19     \sum_{i \in \text{A}} \sum_{j \in \text{B}} %%
20     \delta( r - |\mathbf{r}_{ij}|) \rangle \label{eq:gofr}
21 mmeineke 668 \end{equation}
22 mmeineke 695 Where $\mathbf{r}_{ij}$ is the vector
23     \begin{equation*}
24     \mathbf{r}_{ij} = \mathbf{r}_j - \mathbf{r}_i \notag
25     \end{equation*}
26     and $\frac{V}{N_{\text{A}}N_{\text{B}}}$ normalizes the average over
27     the expected pair density at a given $r$.
28 mmeineke 662
29 mmeineke 695 The next two pair correlations, $g_{\text{AB}}(r, \cos \theta)$ and
30     $g_{\text{AB}}(r, \cos \omega)$, are similar in that they are both two
31     dimensional histograms. Both use $r$ for the primary axis then a
32     $\cos$ for the secondary axis ($\cos \theta$ for
33     Eq.~\ref{eq:gofrCosTheta} and $\cos \omega$ for
34     Eq.~\ref{eq:gofrCosOmega}). This allows for the investigator to
35     correlate alignment on directional entities. $g_{\text{AB}}(r, \cos
36     \theta)$ is defined as follows:
37 mmeineke 691 \begin{multline}
38 mmeineke 668 g_{\text{AB}}(r, \cos \theta) = \\
39     \frac{V}{N_{\text{A}}N_{\text{B}}}\langle
40     \sum_{i \in \text{A}} \sum_{j \in \text{B}}
41     \delta( \cos \theta - \cos \theta_{ij})
42 mmeineke 695 \delta( r - |\mathbf{r}_{ij}|) \rangle \label{eq:gofrCosTheta}
43 mmeineke 668 \end{multline}
44 mmeineke 695 Where
45     \begin{equation*}
46     \cos \theta_{ij} = \mathbf{\hat{i}} \cdot \mathbf{\hat{r}}_{ij}
47     \end{equation*}
48     Here $\mathbf{\hat{i}}$ is the unit directional vector of species $i$
49     and $\mathbf{\hat{r}}_{ij}$ is the unit vector associated with vector
50     $\mathbf{r}_{ij}$.
51 mmeineke 668
52 mmeineke 695 The second two dimensional histogram is of the form:
53     \begin{multline}
54 mmeineke 668 g_{\text{AB}}(r, \cos \omega) = \\
55     \frac{V}{N_{\text{A}}N_{\text{B}}}\langle
56     \sum_{i \in \text{A}} \sum_{j \in \text{B}}
57     \delta( \cos \omega - \cos \omega_{ij})
58 mmeineke 695 \delta( r - |\mathbf{r}_{ij}|) \rangle \label{eq:gofrCosOmega}
59 mmeineke 668 \end{multline}
60 mmeineke 695 Here
61     \begin{equation*}
62     \cos \omega_{ij} = \mathbf{\hat{i}} \cdot \mathbf{\hat{j}}
63     \end{equation*}
64     Again, $\mathbf{\hat{i}}$ and $\mathbf{\hat{j}}$ are the unit
65     directional vectors of species $i$ and $j$.
66 mmeineke 668
67 mmeineke 695 The static analysis code is also cable of calculating a three
68     dimensional pair correlation of the form:
69 mmeineke 668 \begin{multline}\label{eq:gofrXYZ}
70     g_{\text{AB}}(x, y, z) = \\
71     \frac{V}{N_{\text{A}}N_{\text{B}}}\langle
72     \sum_{i \in \text{A}} \sum_{j \in \text{B}}
73     \delta( x - x_{ij})
74     \delta( y - y_{ij})
75     \delta( z - z_{ij}) \rangle
76     \end{multline}
77 mmeineke 695 Where $x_{ij}$, $y_{ij}$, and $z_{ij}$ are the $x$, $y$, and $z$
78     components respectively of vector $\mathbf{r}_{ij}$.
79 mmeineke 668
80 mmeineke 695 The final pair correlation is similar to
81     Eq.~\ref{eq:gofrCosOmega}. $\langle \cos \omega
82     \rangle_{\text{AB}}(r)$ is calculated in the following way:
83 mmeineke 668 \begin{equation}\label{eq:cosOmegaOfR}
84 mmeineke 695 \langle \cos \omega \rangle_{\text{AB}}(r) =
85 mmeineke 668 \langle \sum_{i \in \text{A}} \sum_{j \in \text{B}}
86     (\cos \omega_{ij}) \delta( r - |\mathbf{r}_{ij}|) \rangle
87     \end{equation}
88 mmeineke 695 Here $\cos \omega_{ij}$ is defined in the same way as in
89     Eq.~\ref{eq:gofrCosOmega}. This equation is a single dimensional pair
90     correlation that gives the average correlation of two directional
91     entities as a function of their distance from each other.
92    
93 mmeineke 697 All static properties are calculated on a frame by frame basis. The
94     trajectory is read a single frame at a time, and the appropriate
95     calculations are done on each frame. Once one frame is finished, the
96     next frame is read in, and a running average of the property being
97     calculated is accumulated in each frame. The program allows for the
98     user to specify more than one property be calculated in single run,
99     preventing the need to read a file multiple times.
100    
101 mmeineke 695 \subsection{Dynamic Property Analysis}
102     The dynamic properties of a trajectory are calculated with the program
103 mmeineke 697 \texttt{dynamicProps}. The program will calculate the following properties:
104     \begin{gather}
105     \langle | \mathbf{r}(t) - \mathbf{r}(0) |^2 \rangle \label{eq:rms}\\
106     \langle \mathbf{v}(t) \cdot \mathbf{v}(0) \rangle \label{eq:velCorr} \\
107     \langle \mathbf{j}(t) \cdot \mathbf{j}(0) \rangle \label{eq:angularVelCorr}
108     \end{gather}
109    
110     Eq.~\ref{eq:rms} is the root mean square displacement
111     function. Eq.~\ref{eq:velCorr} and Eq.~\ref{eq:angularVelCorr} are the
112     velocity and angular velocity correlation functions respectively. The
113     latter is only applicable to directional species in the simulation.
114    
115     The \texttt{dynamicProps} program handles he file in a manner different from
116     \texttt{staticProps}. As the properties calculated by this program are time
117     dependent, multiple frames must be read in simultaneously by the
118     program. For small trajectories this is no problem, and the entire
119     trajectory is read into memory. However, for long trajectories of
120     large systems, the files can be quite large. In order to accommodate
121     large files, \texttt{dynamicProps} adopts a scheme whereby two blocks of memory
122     are allocated to read in several frames each.
123    
124     In this two block scheme, the correlation functions are first
125     calculated within each memory block, then the cross correlations
126     between the frames contained within the two blocks are
127     calculated. Once completed, the memory blocks are incremented, and the
128     process is repeated. A diagram illustrating the process is shown in
129     Fig.~\ref{fig:dynamicPropsMemory}. As was the case with \texttt{staticProps},
130     multiple properties may be calculated in a single run to avoid
131     multiple reads on the same file.
132    
133     \begin{figure}
134     \parbox{30mm}{This is where my wonderful diagram of our memory allocation scheme will go.}
135     \caption{This diagram illustrates the dynamic memory allocation used by \texttt{dynamicProps}}
136     \label{fig:dynamicPropsMemory}
137     \end{figure}