Skip to content

Validate randomness

Masakazu Matsumoto edited this page Sep 6, 2022 · 2 revisions

The following plug-ins can be used to validate whether the structure of the generated ice is random.

_ringstat Plug-in

The plug-in looks for rings in the network structure generated by genice, takes statistics on the orientation of the bonds, and evaluates how far off from the ideal distribution.

Hydrogen bonds are oriented. For example, going one turn along the edge of a four-membered ring made of hydrogen bonds, there are 2 possible orientations for each hydrogen bond, forward (F) or backward (B), and there are 16 possible orientations in total.

  • FFFF, FFFB, FFBF, FFBB, FBFF, FBFB, FBBF, FBBB, BFFF, BFFB, BFBF, BFBB, BBFF, BBFB, BBBF, BBBB

Some of these can be identified by moving the start point or rotating the ring backwards. Without duplication, there are essentially four possible orientations:

  • FFFF
  • FFFB
  • FFBB
  • FBFB

These frequencies of occurrence can be modeled using the following approximations:

1.All nodes have four connections. 2.All nodes have input 2 and output 2 connections. (ice rule) 3.There is no ring other than the four-membered ring of interest. (Bethe approximation)

Then the occurrence probabilities of them can be approximated as:

  • FFFF: 16/41
  • FFFB: 16/41
  • FFBB: 8/41
  • FBFB: 1/41

Compare this approximation with the ring orientation statistics in the genice-generated network to test whether the network structure is sufficiently randomized.

The following example tests the frequency of the four-membered ring in ice VI.

$ genice2 6 -f _ringstat -r 4 4 4  |less

4 0 0000 16/41 0.39024 265/640 0.41406 
4 1 0001 16/41 0.39024 224/640 0.35000 
4 3 0011 8/41 0.19512 143/640 0.22344 
4 5 0101 1/41 0.02439 8/640 0.01250 
0.01205979926917721 4 dKL[4-ring]
...

Column 1 is the ring size, column 3 is the bond orientation (binary expression), column 2 is its decimal expression, columns 4 and 5 are the model distribution (Fractions and Decimals), and the distribution in the structure produced by columns 6 and 7. The last line is the Kullback-Leibler divergence between the model distribution and the generation distribution, and the smaller this is, the closer the two distributions are.

_KG plug-in

Kirkwood G is defined as follows to measure the long-range correlation in the dipoles.


以下のプラグインは、生成した氷の構造が正しくランダムになっているかどうかを検定する目的に使用できます。

_ringstatプラグイン

このプラグインは、geniceで生成したネットワーク構造に含まれる環を探し、その結合の向きの統計をとり、それが理想的な分布からどれぐらいずれているかを評価します。

水素結合には向きがあります。例えば、水素結合でできた四員環の辺にそって一周すすむと、その水素結合の向きは、順方向(F)か逆方向(B)の2通りで以下のような16種類の可能性があります。

  • FFFF, FFFB, FFBF, FFBB, FBFF, FBFB, FBBF, FBBB, BFFF, BFFB, BFBF, BFBB, BBFF, BBFB, BBBF, BBBB

これらには、始点をずらしたり環を逆に回ったりすると同一視できるものが含まれています。重複を省くと、実質的には以下の4種類の向きがありえます。

  • FFFF
  • FFFB
  • FFBB
  • FBFB

これらの出現頻度は、次のような近似で。モデル化できます。

  1. すべての節点は4結合である。
  2. すべての節点で入結合2、出結合2である。(ice rule)
  3. 注目する四員環以外には環がない。(ベーテ近似)

すると、これらの出現確率は、それぞれ

  • FFFF: 16/41
  • FFFB: 16/41
  • FFBB: 8/41
  • FBFB: 1/41

となります。

この近似と、geniceで生成したネットワーク内での環の向きの統計とを比較することで、ネットワーク構造が十分ランダム化されているかどうかを検定します。

以下の例では、氷VIの四員環の出現頻度を検定しています。

$ genice2 6 -f _ringstat -r 4 4 4  |less

4 0 0000 16/41 0.39024 265/640 0.41406 
4 1 0001 16/41 0.39024 224/640 0.35000 
4 3 0011 8/41 0.19512 143/640 0.22344 
4 5 0101 1/41 0.02439 8/640 0.01250 
0.01205979926917721 4 dKL[4-ring]
...

第1カラムが環の大きさ、第3カラムが結合の向き(二進表現)、第2カラムはそれの10進表現、第4、5カラムがモデル分布(分数と小数)、第6、7カラムが生成した構造での分布となっています。また最後の行は、モデル分布と生成分布の間のKullback-Leibler Divergenceで、これが小さいほど2つの分布は近いと言えます。

_KGプラグイン

Kirkwood Gは次のように定義され、双極子の遠距離相関を計量します。

Clone this wiki locally