0
$\begingroup$

Please refer to the paper Migacz, S., et al. (2019). Parallel implementation of a sequential Markov chain in Monte Carlo simulations of physical systems with pairwise interactions. Journal of Chemical Theory and Computation, 15(5), 2797–2806.

Suppose I have $N=5$ particles: $A(1,4)$, $B(2,2)$, $C(3,1)$, $D(4,3)$, and $E(0,0)$.

Suppose $MovingSet=\{A, C, D\}$, and $FixedSet=\{B, E\}$.

$\begin{array} {r | c | c | c | c | c} & A & C & D & B & E \\ \hline A & \times & E_{AC} & E_{AD} & E_{AB} & E_{AE} \\ \hline C & - & \times & E_{CD} & E_{CB} & E_{CE} \\ \hline D & - & - & \times & E_{DB} & E_{DE} \\ \hline B & - & - & - & \times & E_{BE} \\ \hline E & - & - & - & - & \times \\ \hline \end{array}$

Here is the extracted equation $(4)$ rewritten in MathJax:

$$E_{\text{fixed}}^{\text{moving}} = \sum_{i=1}^{M} \sum_{j=M+1}^{N} E(X_i^{0} \lor X_j^{0})$$ $$= \sum_{i=1}^{M-1} \sum_{j=i+1}^{M} \{ E(X_i^{0}, X_j^{0}) \lor E(X_i^{1}, X_j^{0}) \} \tag{4}$$

The ranges mentioned in the formula $(4)$ don't cover all elements.

For example, in the case of $E_{(moving, fixed)}^{00}$ the formula (4) takes the following form:

$$E_{(moving, fixed)}^{00} = \sum_{i=1}^{M-1} \sum_{j=i+1}^{M} E(X_{i}^{0}, X_{j}^{0}) \tag{4.1}$$

So, $MovingSet$'s size = $M=3$, $FixedSet$'s size=$(N-M)=2$, and so, we have $(3 \times 2)=6$ combinations for $E^{00}$:

  1. $A$ vs. $B$
  2. $A$ vs. $E$
  3. $C$ vs. $B$
  4. $C$ vs. $E$
  5. $D$ vs. $B$
  6. $D$ vs. $E$

Now, the formula #4 (1-indexed) says that:
=> $i$ goes from 1ドル$ to $M-1$ (I.e, from 1ドル$ to 2ドル$).
=> $j$ goes from $i+1$ to $M$ (I.e., from 2ドル$ to 3ドル$ when $i=1$. $j$ goes from 3ドル$ to 3ドル$ when $i=2$).

So, we can have the following three combinations only:

  1. $i=1$, $j=2$
  2. $i=1$, $j=3$
  3. $i=2$, $j=3$

So, the nested looping statement fails if we use the ranges for $i$ and $j$ indices mentioned in the formula $(4)$.

So, how can we include the missing values in our computation?

asked Nov 24, 2024 at 5:10
$\endgroup$
0

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.