next up previous contents
Next: Bibliography Up: General Configurations Previous: Algorithm


Conversions between Positions and Connectors

In terms of the struct BONDS_GROUP which has $ ({\tt np}, {\tt ip[np]}, {\tt bonds[np-1]})$, we can construct the conversions $ \{\bm{x}_{\mu}\}\mapsto\{\overline{\bm{Q}}_{i}\}$ and $ \{\overline{\bm{Q}}_{i}\}\mapsto\{\bm{x}_{\mu}\}$.

First, we see the system with a single group. Because we only take the independent bonds, the bond index $ i$ runs from 0 to $ N-2$ (where the number of independent bonds is $ N-1$), while the particle index $ \mu$ runs from 0 to $ N-1$ (where the number of particles is $ N$). Adding the $ (N-1)$-th element of the connector vector $ \{\overline{\bm{Q}}_{i}\}$ by the center of mass $ \bm{x}_{\text{COM}}$ as

$\displaystyle \overline{\bm{Q}}_{N-1} := \bm{x}_{\text{COM}} = \frac{1}{N} \sum_{i=0}^{N-1} \bm{x}_{{\tt ip}[i]} ,$ (9.11)

(therefore, precisely speaking, $ \bm{x}_{\text{COM}}$ is not the center of mass though), the numbers of elements of both $ \{\bm{x}_{\mu}\}$ and $ \{\overline{\bm{Q}}_{i}\}$ become the same.

The transformations between them can be constructed as follows. By definition of connector vectors,

$\displaystyle \overline{\bm{Q}}_{i} = \bm{x}_{\alpha_{{\tt bonds}[i]}} - \bm{x}_{\beta_{{\tt bonds}[i]}} ,$ (9.12)

for $ i = 0, \cdots, N-2$. The last element of the connector vector $ \overline{\bm{Q}}_{N-1}$ is given by Eq. (9.11). This is implemented in the routine BONDS_pos_to_conn_1. Note that, for the isolated particle, we define the (generalized) connector vector by the position itself as

$\displaystyle \overline{\bm{Q}}_{0} = \bm{x}_{0}.$ (9.13)

As we see, the relation is linear and the transformation can be expressed by

$\displaystyle \overline{\bm{Q}} = \mathscr{B}\cdot\bm{x},$ (9.14)

where $ \overline{\bm{Q}}$ and $ \bm{x}$ are the generalized vector with $ 3N$ dimension for $ \{\overline{\bm{Q}}_{i}\}$ and $ \{\bm{x}_{\mu}\}$, respectively, and $ \mathscr{B}$ is $ 3N\times 3N$ matrix based on the $ N\times N$ matrix $ \overline{\mathsf{B}}$ in Eq. (9.4).

The opposite transformation from $ \overline{\bm{Q}}_{i}$ to $ \bm{x}_{\mu}$ can be obtained from the inversion matrix $ \mathscr{B}^{-1}$. Alternatively (and directly), we can calculate the position vectors from the connector vectors (and the center-of-mass vector) as follows: For the isolated particle,

$\displaystyle \bm{x}_{0} = \overline{\bm{Q}}_{0}.$ (9.15)

For the group with $ N(> 1)$ particles, we take the two steps:
  1. at the first step, $ \bm{x}_{\mu}$ is formed with respect to the origin at the $ \bm{x}_{\alpha_{{\tt bonds}[0]}}$,
  2. then, adjust the origin with respect to $ \bm{x}_{\text{COM}} = \overline{\bm{Q}}_{N-1}$.

At the first step, therefore, we define

$\displaystyle \bm{x}_{\alpha_{{\tt bonds}[0]}} = \bm{0},$ (9.16)

as an initial condition. After it, for the independent bond $ i$ from 0 to $ N-2$,

$\displaystyle \bm{x}_{\beta_{{\tt bonds}[i]}} = \bm{x}_{\alpha_{{\tt bonds}[i]}} - \overline{\bm{Q}}_{i} .$ (9.17)

To make this procedure work, we should assure that $ \bm{x}_{\alpha_{{\tt bonds}[i]}}$ has been defined by the $ (i-1)$-th step. This condition is satisfied from the fact that

After the first step, we calculate $ \widetilde{\bm{x}}_{\text{COM}}$ as

$\displaystyle \widetilde{\bm{x}}_{\text{COM}} = \frac{1}{N} \sum_{i=0}^{N-1} \b...
...\left( = \frac{1}{N} \sum_{i=0}^{N-2} \bm{x}_{\beta_{{\tt bonds}[i]}} \right) ,$ (9.18)

and adjust the center of mass to $ \bm{x}_{\text{COM}}$ as

$\displaystyle \bm{x}_{{\tt ip}[i]} = \bm{x}_{{\tt ip}[i]} - \widetilde{\bm{x}}_{\text{COM}} + \bm{x}_{\text{COM}} ,$ (9.19)

for $ i = 0, \cdots, N-1$.

It should be noted that the calculation of this rather tedeous procedure is $ O(N)$, while the inversion $ \mathsf{A}^{-1}$ usually costs $ O(N^3)$.

For the system containing many groups at the same time, we can apply the above procedure for each group separately, and the overall calculation is still $ O(N)$. This system-wide transformations are implimented in the routines BONDS_pos_to_conn and BONDS_conn_to_pos.


next up previous contents
Next: Bibliography Up: General Configurations Previous: Algorithm
Kengo Ichiki 2008-10-12