RMC tutorial１．	  Install WinNFLP
Unzip NFLP_windows.zip（extract to C:¥）Contents of NFLP_windows folder
Calibration

NACorrectNA

Documentation

Documentation of RMCA etc.

ExamplesExapmlesJmol-14.0.10

Jmol (visualize atomic configuration)

Rmc

executable code

TablesTemplates
UsefulAnalyzeCfg

Tools to analyze atomic configuration file

UsefulAnalyzeScfg
UsefulCfg

Tools to create/modify configuration files

UsefulData

Tools to analyze RMC data

UsefulPlot

Tools to plot RMC data

readme.txt
RMCA.ini
WinNFLP.exe

GUI toolsWinNFLP.ini

Jmol requires Java SE Development Kit 7

２．	  Execute WinNFLP
Double click WinNFLP.exe in NFLP_windows folder
Dialog “Select Acrobat Reader”
Select Adobe Reader folder and “open” or “cancel”
Dialog “Select any file in desired working directory”
Select ▶NFLP_windows▶Examples▶RMCA_MCGR▶rmca_hg▶hg.dat and open
【Practice 1：model structure of liquid mercury】
üModel the structure of liquid mercury on the basis of x-ray S(Q) by RMC.

üCreate a random configuration, moveout closest atom, perform RMC, and analyze atomic configuration.

üOpen ▶NFLP_windows▶Examples▶RMCA_MCGR▶rmca_hg folder to access files in the folder.

ü

It is better to set the environment of Windows to show extension of files.

３．	  Create a random configuration
Execute Useful＞CFG programs＞Random

Number of Euler angles
Number of particle types
Number of particles of type 1
Density
Output file[.cfg]> 0> 1> 2000> 0.04063> hg← single component system = 1← atomic number density of mercury, / Å3
← name of .cfg file４．	  Moveout the atoms within closest approaches
Execute Useful＞CFG programs＞MoveOut

MOVEOUT
Starting configuration: hg
Closest approaches: 2.61907 atoms of type 1 have too close neighbours
Move atoms of type 1 ? (T/F): tMaximum move
: 3
Max. no. of iterations: 1000000
1907 atoms of type 1 have too close neighbours
after***** iterations
・・・・・・
364 atoms of type 1 have too close neighbours
after***** iterations
Continue ? (T/F): t・・・・・・
0 atoms of type 1 have too close neighbours
after***** iterations
Re-calculate neighbours? (T/F) : f
Change cut-offs ? (T/F): f
Output file: hg← file name of cfg file created by random← 2.6 Å determined by experimental g(r)← number of particle 1 which do not satisfy closest approaches← move particle 1 or not?
← maximum distance (is necessary to change at random)← repeat the process to reach 0 atoms by changing maximum move← finish moveout← don’t re-calculate← don’t change cut-offs← save file (overwrite)５．	  Visualization of atomic configuration
Execute Useful＞Plot programs＞ConfPlot****************************************
ConfPlot 2.5****************************************
Current plot size is (cm) :18.96660
14.50273> open hg
Reading file : hg.cfg
Configuration contains
200 atoms of 1 types.
> plotPlotting configuration: hg.cfg
PLEASE WAIT…
Current plot size is (cm) :15.088672
22.442188
Type:1← open “hg.cfg”← type “plot” for visualization

★	  hg.cfg file（atomic configuration data）(Version 3 format configuration file)
Random configuration

0000 moves generated, tried, accepted
configurations saved

2000 molecules (of all types)
1 types of molecule
1 is the largest number of atoms in a molecule
0 Euler angles are provided
F (Box is not truncated octahedral)
Defining vectors are:18.324457
0.000000
0.000000
0.000000 18.324457
0.000000
0.000000
0.000000 18.324457
2000 molecules of type 1
1 atomic sites
0.000000
0.000000← history of RMC← number of all particles← information of simulation box← side length of the simulation box0.000000-0.5556233 -0.7685104 -0.5371170-0.8435115 -0.1586675 -0.9489551
0.2504269 -0.2151476 -0.3068128

・・・・・・← title← fractional coordinates (x, y, z) -1 < xyz < 1	 

★	  hg.dat（control file）
Liquid Hg@RT
0.04063! number density
2.6
0.25! maximum move
0 0.0
! nswap,swapfrac
0.05! r spacing.false.
! whether to use moveout option
0! number of configurations to collect
9000 1! step for printing,plotting
10 1! Time limit, step for saving
0 1 0 0! No. of g(r), neutron, X-ray, EXAFS expts
hgsq.dat
1 381! Range of points used
1! Coefficients
3 0.01! isig,Standard deviation.false.
.false.
! whether to renormalize
1.0! beta.false.
! whether to offset
1! nback
0.
! bcoeff.false.
0! no. of coordination constraints
0! no. of average coordination constraints
0! no. of bvs constraints
0! no. of triplet constraints.false.
! whether to use a potential← title← number density Å3← closest distance← maximum movement← r step← number of experimental data
← file name of x-ray S(Q)

６．	  Final RMC modeling with x-ray S(Q)
Execute Rmc＞RMCA
Dialog“Select a file” , open hg.dat

Then RMC will be automatically initialized・ S (Q )Black: experimental X-ray S(Q)
Red: calculated S(Q) by RMCBlack: total χ2・Chi2

Red: χ2 of S(Q)・Gpartial(r)Black: Partial g(r)・RMCA Info window
Scroll down the window and you will find
Begin (Y/N)?
Type “y” for start of RMC

To control RMC run
Status＞Pause（Ctrl+S）

Pause RMC

Status＞Resume（Ctrl+Q） Repause RMCüFile＞Save

Save the results of RMC

File＞Exit

Quit RMC

It is necessary to run to converge the χ2

７．	  To plot the results of RMC
Execute Useful＞Plot programs＞RMCPlot*****************************************
RMCPlot 1.0*****************************************
File to plot (or RETURN to exit) > hg.out
Input file contains
3 groups of plots:Group
1 contains
1 plots of 1 curves
Group2 contains
1 plots of 1 curvesGroup
3 contains
1 plots of 2 curves
Plot which group (enter 0 to exit) ? 1
Change limits ? (T/F) > t
Data limits are:5.0000001E-02
18.30000
0.0000000E+00
2.913868
Current plotting limits are :-0.8625000
19.21250-0.1456934
3.59561
Enter new limits > 0 20 0 3

ü← “hg.out” contains g(r) and S(Q) calculated by RMC together withexperimental data
← Group 1：partial gij(r)← Group 2：partial Sij(Q)← Group 3：S(Q)s← Select Group 1←

to change X axis：0〜20, Y axis：0〜3

It is necessary to make dure the first coordination distance in gij(r), which should be found at around 4.5Å

８．	  Calculation of the distribution of coordination number
Execute Useful＞Analyze CFG programs＞NextTo

No. of sets > 1
Configuration file
Distances from central particle
Output fileü

> hg
> 4.5> hg← select hg.cfg← input the first coordination distance← output to “hg.nei”

Open hg.nei by text editor to see the distribution of coordination number of Hg around Hg within 4.5 Å９．	  Calculation of Hg-Hg-Hg triplet angle
Execute Useful＞Analyze CFG programs＞Triplets

No. of theta pts > 180(A)ngle or (C)osine distribution [C] > aMax. no. of neighbours for bond ang (0 for all) > 0
No. of sets > 1
No. of configurations > 1
Configuration file(s) [.cfg*] > hg
Minimum r values (npartial values) > 0
Maximum r values (npartial values) > 4.5
Processing hg.cfg
Set output file [.pct] > hg

← Angle or Cosine← input the file name of .cfg

Execute Useful＞Plot programs＞RMCPlot*****************************************
RMCPlot 1.0*****************************************
File to plot (or RETURN to exit) > hg.pct
Change limits ? (T/F) > t
Data limits are:173.9578
6.042285
0.0000000E+00 0.8882140
Current plotting limits are :-2.353492
182.3536 -4.4410702E-02 0.9326247
Enter new limits > 0 180 0 1← select “hg.pct”← change plot range← change x-axis：0〜180、y-axis：0〜1

【Practice 2：model the structure of SiO2 glass】
Preparation
Execute WinNFLP.exe
Dialog “Select any file in desired working directory
Select ▶NFLP_windows▶Examples▶RMCA_MCGR▶rmca_sio2▶sio2.datüModel the structure of SiO2glass by using a combination of neutron S(Q) and x-ray F(Q)üThe order is Random, MoveOut, Hard Sphere Monte Carlo (HSMC) simulation to create a Q4 network, RMC simulation, and analysis ofRMC configuration.

１．	  Create a random configuration
Execute Useful＞CFG programs＞Random
Number of Euler angles
Number of particle types
Number of particles of type 1
Number of particles of type 1
Density
Output file> 0> 2> 550> 1100> 0.06615[.cfg] > sio2

← 2 atomic type, Si and O← number of Si atom: 550
O atom: 1100
←atomic number density of SiO2（Å-3）which can be calculated by amass density

２．	  Moveout the atoms within closest approaches
Execute Useful＞CFG programs＞MoveOut
MOVEOUT
Starting configuration: sio2
Closest approaches: 2.9 1.5 2.4
524 atoms of types1 have too close neighbours
1037 atoms of types2 have too close neighbours
Move atoms of type 1 ? (T/F): tMove atoms of type 2 ? (T/F): tMaximum move
: 3
Max. no. of iterations: 1000000
・・・（省略）・・・
0 atoms of types1 have too close neighbours
after***** iterations
Re-calsulate neighbours? (T/F) : f
Change cut-offs ? (T/F): f
Output file: sio2← input the file name of initial configuration created by random← closest distance for Si-Si, Si-O, and O-O← move type 1 (Si)← move type 2 (O)← distance for maximum move

３．	  Perform Hard Sphere Mote Carlo (HSMC) simulation (RMC w/o experimental data) and RMC simulation
Constraints

experimental data

Coordination number (CN) constraints

Where in .dat file(1)

Neutron S(Q)siogemsq.dat

line 13〜23(2)

X-ray S(Q)sio04sq.dat

line 24〜33(3)

Four fold Si

CN of O around Si in 0 < r < 1.8Å should be 4line 35(4)

Two fold O

CN of Si around O in 0 < r < 1.8Å should be 2line 36(5)

zero fold Si (optional)

CN of O around Si in 1.8 < r < 2.2Å should be 0line 37

It is important point that we need preliminary HSMC run to create Q4 network by interconnestion of SiO4 tetrahedra with sharing
oxygen at the corner before final RMC run with both neutron and x-ray S(Q). In HSMC run, we use only constraints (3) and (4) in thetable above.
ü

Copy original “sio2.dat” to “sio2.dat_orig”.

üOpen “sio2.dat” by a text editor・	  Modify the description of experimental data in line 12	 0 1 1 0→

0 0 0 03→2・	  Delete the description for neutron S(Q) in line 13〜23・	  Delete the description for x-ray F(Q) in line 24〜33
・	  Modify the description for CN constraints in line 34
・	  Delete the description for CN constraints in line 37
SiO2 network (hard sphere MC)
0.06615! number density
2.90 1.50
2.45! cut offs
0.25 0.25! maximum move
0 0.0
! nswap,swapfrac
0.05! r spacing.false.
! whether to use moveout option
0! number of configurations to collect
9000 1! step for printing,plotting
60 10! Time limit, step for saving
0 0 0 0! No. of g(r), neutron, X-ray, EXAFS expts
2! no. of coordination constraints
1 2 0. 1.8 4 1. 0.00001
2 1 0. 1.8 2 1. 0.00001
0! no. of average coordination constraints
0! no. of bvs constraints
0! no. of triplet constraints.false.
! whether to use a potential← no experimental data in a HSMC run← modify the number of CN constraints← CN of O around Si in 0〜1.8Å should be 4
← CN of Si around O in 0〜1.8Å should be 2

To start a HSMC run,
Exectute Rmc＞RMCA
Dialog“Select a file” , open sio2.dat

In “RMCA Info” window
Scroll down the window and you will find
Begin (Y/N)?
Type “y” for start of final RMC run

It will take time to satisfy coordination number constraints (to be explained in detail in tutorial).
４．	  Final RMC run
Preparation
Delete “sio2.dat” and rename “sio2.dat_orig” to “sio2.dat”
５．	  To plot the results of RMC run
Execute Useful＞Plot programs＞RMCPlot and plot “sio2.out”

ü

It is necessary to make sure the first coordination distance for Si-Si, Si-O, and O-O which should be found at around 3.5, 1.8, and 3.0Å,respectively.
To visualize atomic configuration, execute Useful＞Plot programs＞ConfPlot
To bond Si and O by a line,> bond 1 2 0 1.8> plot６．	  配位数分布の解析
Useful＞Analyze CFG programs＞NextTo を起動します。
No. of sets > 1
Configuration file
Distances from central particle
Output file> sio2> 1.8 1.8> sio2

← output to “sio2.nei”

７．	  Analysis of bond angle distributions
Execute Useful＞Analyze CFG programs＞Triplets
No. of theta pts > 180(A)ngle or (C)osine distribution [C] > aMax. no. of neighbours for bond ang (0 for all) > 0
No. of sets > 1
No. of configurations > 1
Configuration file(s) [.cfg*] > sio2
Minimum r values (npartial values) > 0 0 0
Maximum r values (npartial values) > 3.5 1.8 3.0
Processing sio2.cfg
Set output file [.pct] > sio2ü← number of configuration (should be 1)← minimum distance for Si-Si, Si-O, and O-O pairs← maximum distance for Si-Si, Si-O, and O-O pairs← fine name for output

To plot bond angle distributions
Execute Useful＞Plot programs＞RMCPlotFile to plot (or RETURN to exit) > sio2.pct

８．	  Analysis of ring statistics
Execute Useful＞Analyze CFG programs＞Rings←select sio2.pct

Upper：Si-Si-Si、Si-Si-O、O-Si-O
Lower：Si-O-Si、Si-O-O、O-O-O

Configuration file [.cfg] > sio2
Binary network ? [T/F] > t
Which types > 1 2
Output file name [.rng] > sio2
Maximum ring size > 12
Maximum distance between neighbours > 1.8
Detailed statistics output y/[n]? > y９．	  Convert .cfg file to a RasMol file
Execute Useful＞Plot programs＞RasMolConvEnter input file name [.cfg] > sio2Enter label for type 1 : SiEnter label for type 2 : O
Enter output file name [.xyz] > sio2üTo plot .xyz file by Jmol
Excecute Jmol and open “sio2.xyz.

← type 1(Si) and type 2 (O)← output file name is “sio2.rng”← maximum size of ring is set to 12← first coordination distance for Si-O is 1.8 Å← name of output file is “sio2.rst”