Skip to content

Input and Output files

Tom edited this page Apr 27, 2016 · 6 revisions

##gkin.dat

The parameters and set-up options for the simulation are supplied in the gkin.dat input file. The file is structured as a list of keywords, which may be followed by one or more switches or numerical values. The keywords can be listed in any order – if a particular keyword is not supplied, then default settings and values are applied (which are listed below).

num_x n

The dimension of the system array in the x direction. This must be an even integer for a periodic cell. Default: n = 60

num_y n

The dimension of the system array in the y direction. This must be an integer divisible by 6 for a periodic cell. Default: n = 60

num_layers n

The number of graphene layers – the dimension of the system array in the z-direction. This must be an even integer for a periodic cell. Default: n = 4

periodic_x switch

Periodic boundary conditions in the x direction. If switch = on, then defects that diffuse across the cell boundary re-appear on the opposite side. If switch = off, then defects disappear when they reach the cell boundary. Default: switch = on

periodic_y switch

Periodic boundary conditions in the y direction. If switch = on, then defects that diffuse across the cell boundary re-apear on the opposite side. If switch = off, then defects disappear when they reach the cell boundary. Default: switch = on

periodic_z switch

Periodic boundary conditions in the z direction. If switch = on, then defects that diffuse across the cell boundary re-apear on the opposite side. If switch = off, then defects disappear when they reach the cell boundary. Default: switch = on

num_steps n

The maximum number of KMC simulation steps. Default: n = 1000

stop_time r

The maximum simulation time, in seconds. When r (a real number) is reached, the simulation stops. If this keyword is not present, there is no maximum time and the simulation will stop when the maximum number of steps is reached. Default: r = ∞

temp r

The system temperature, which enters into the Arrhenius expression for the rates. Default: r = 273.0 K

pre_factor r

The pre-factor of the Arrhenius expression for the rates (Hz). Default: 1.0 x 1013

trajectory n

Write the xyz coordinates of the system configuration to the trajectory movie file (system.xyz) every n KMC steps. Default: 1

traj_interval r

Write the xyz coordinates of the system configuration to the trajectory movie file (system.xyz) at intervals or r in simulation time (seconds). This keyword superceeds the trajectory keyword if both are present. If the time between KMC steps is longer than the interval, the same system configuration is written multiple times. Default: 1.0

xyz_full switch

If switch = on, the atomic coordinates of the entire system array are written to the trajectory file (system.xyz). If switch = off, only interstitial positions (with atom symbol 'I') and vacancy positions (with atom symbol 'V') are written to file. Default: on

print_vacs switch

If switch = on, vacancy positions are written to file (vacs.xyz) at each interval. Default: off

print_link switch

If switch = on, the positions of interlayer sp2 bonds are written to file (links.xyz) at each interval. Default: off

system n

Overwrite the system file (system.out) file every n KMC steps. This file can be used as a restart configuration. Default: 100

seed n

Seed for the psudo-random number generator. n must be a negative integer. Default: -6

add_vacs r n

This keyword activates on-the-fly vacancy creation. n vacancies are added to the system configuration in random positions every r seconds. Default: off

add_ints r n

This keyword activates on-the-fly interstitial creation. n interstitials are added to the system configuration in random positions every r seconds. Default: off

en_min switch

When switch = on, the system energy change for each transition is read in from the potential energy surface files as well as the activation energies. This enables the energy release to be tracked. When switch = off, this information should not be included in the potential energy surface files. Default: switch = off

sites switch

When switch = on, the full site list is printed out at each KMC timestep to the file sites.dat. This file can get very large and is only recommended for troubleshooting. Default: switch = off

energies switch

When switch = on, the full activation energy list is printed out at each KMC timestep to the file energies.dat. This file can get very large and is only recommended for troubleshooting. Default: switch = off

system.in

This file contains the input system configuration, and must correspond to the system array dimensions given in the gkin.dat file, or a fatal error will be produced in initialisation. The system configuration is arranged by lines of one digit integers that correspond to state (occupancy) of the system array. The file is sequenced as follows:

Layers are given sequentially, with interstitial planes directly following lattice planes. The first line of each plane is ignored by the program and can be used as a comment line keeping track of the configuration. Within each layer, each line corresponds to a y-direction system array index in sequence. Each integer within that line then corresponds to the occupancy of the corresponding position in the system array, again in sequence.

ens.dat

The ens.dat file contains the library of activation energies for transitions involving undercoordinated atoms surrounding vacancy defects. The library consists of a list of schematic structures followed by the activation energies (and energy changes) for transitions away from the structural motif shown. The schematic is constructed from an array of characters depicting lattice points in the plane – and the character denotes the status of that particular lattice position. The 'active' site that will be involved in the transition (the undercoordinated atom) is denoted by an upper-case 'O' in the centre of the schematic. The meaning of other characters is as follows:

o	:	Occupied lattice site (carbon atom) not bound to adjacent layer or interstitial 
-	:	vacant lattice site
+	:	Undercoordinated atom bonded to an atom in a neighbouring layer
*	:	Wildcard (any site occupancy)
s	:	Split interstitial
1-6	:	Occupied lattice site bonded to Spiro-interstial (1 of 6 orientations)
A-F	:	Vacant lattice site with Spiro-interstial – intimate pair (1 of 6 orientations)
a-f	:	Occupied lattice site bonded to Grafted interstitial (1 of 6 orientations)
#	:	Interstitial wildcard (any interstitial occupancy, but with occupied lattice site)
@	:	Spiro-interstitial with any orientation 

An example library entry is shown below for an undercoordinated neighbour of the monovacancy. In this model, wildcard symbols are used beyond the 4th nearest-neighbour positions, which defines the range of interaction of this atomic site with other defect sites.

*   *   *   *   *   *   *   *   *   *   *
*   *   *   *   *   *   *   *   *   *   *
  *   *   *   *   *   *   *   *   *   *  
  *   *   *   *   *   *   *   *   *   *  
*   *   *   *   *   *   *   *   *   *   *
*   *   *   *   o   o   o   *   *   *   *
  *   *   *   *   o   o   *   *   *   *  
  *   *   *   o   o   o   o   *   *   *  
*   *   *   *   o   -   o   *   *   *   *
*   *   *   *   o   O   o   *   *   *   *
  *   *   *   o   o   o   o   *   *   *  
  *   *   *   *   o   o   *   *   *   *  
*   *   *   *   o   o   o   *   *   *   *
*   *   *   *   *   *   *   *   *   *   *
  *   *   *   *   *   *   *   *   *   *  
  *   *   *   *   *   *   *   *   *   *  
*   *   *   *   *   *   *   *   *   *   *
*   *   *   *   *   *   *   *   *   *   *
  *   *   *   *   *   *   *   *   *   *  
  *   *   *   *   *   *   *   *   *   *  
  1.10
   0.20   0.20   0.10
   0.80   0.80   0.90
   9.00   9.00   9.00
  0.00
  -3.30  -2.10  -1.90
  -0.40  -0.10   0.80
   0.00   0.00   0.00'

The series of numbers that follow the schematic give the activation energies (in eV) for the different transitions that the target site (the undercoordinated atom) can be involved in. The first line is the barrier for the target atom to move into the vacant lattice site directly above it (leaving a vacant site behind). If one of the neighbouring atoms to the target site is also undercoordinated (see figure 2) the barrier is for the concerted transition of the pair of atoms to avoid leaving a floating atom.

The 3 lines that follow give barrier for interlayer processes. If the target site is not bonded to an atom in an adjacent plane, then the first of the three lines contains the barriers to form an interlayer bond, depending on the configuration of an undercoordinated atom in an adjacent layer relative to the target atom. If the configuration is that in Fig. 3 a, the first value is used, if it is that of Fig. 3 b, the second value is used and if it is that of Fig. 3 c, the third value is used. The second line corresponds to barriers for the same configurations, but where the vacancy in the adjacent layer is neighboured by another vacancy (a multivacancy). The third line gives the barriers (for the three configurations a,b,c) for the target atom to move to the adjacent layer into the corresponding vacant site.

If the target site is bonded to an atom in an adjacent layer (it will be denoted with a '+' symbol) the corresponding energies are those to break the interlayer bond instead of making it.

So, for an unbonded target atom ('O'):

Line 1: forward in plane barrier Line 2: barriers to form interlayer bond in configuration (a), (b) and (c) with a monovacancy in the adjacent layer. Line 3: barriers to form interlayer bond in configuration (a), (b) and (c) with a divacancy in the adjacent layer. Line 4: barriers to migrate the vacancy to the neighbouring layer in configuration (a), (b) and (c)

For a bonded target atom ('+'):

Line 1: forward in plane barrier Line 2: barriers to break interlayer bond in configuration (a), (b) and (c) with a monovacancy in the adjacent layer. Line 3: barriers to break interlayer bond in configuration (a), (b) and (c) with a divacancy in the adjacent layer. Line 4: barriers to migrate the vacancy to the neighbouring layer in configuration (a), (b) and (c)

A value for a barrier of 9.0 (or greater) will remove that process from the event list (i.e. that transition will be blocked off). If the en_min on option is used in the gkin.dat file, then the four lines (with 10 values) must be repeated directly following the activation energies, but with the energy changes corresponding to each transition in place of the barriers. This information does not affect the rate of a transition, or the system evolution, but enables the code to track the total potential energy of the system.

When the simulation is run, target sites in the system are matched to the schematics in the library file (including the local defect structure). If the program cannot match a target site, it will exit and print the local configuration to the standard output (along with the interstitial planes above and below). This can be copied and pasted into the library file to help create a new entry, if required.

iens.dat

The iens.dat file contains the library of activation energies for transitions involving interstitial atoms. As before, the library consists of a list of schematic structures followed by the activation energies (and energy changes) for transitions away from the structural motif shown. For the interstitials, the 'target site' in the centre of schematic, which again depicts the lattice in a single layer, is either a split, grafted or spiro interstitial.

*   *   *   *   *   *   *   *   *   *   *
*   *   *   *   *   *   *   *   *   *   *
  *   *   *   *   *   *   *   *   *   *  
  *   *   *   *   *   *   *   *   *   *  
*   *   *   *   *   *   *   *   *   *   *
*   *   *   *   *   *   *   *   *   *   *
  *   *   *   *   *   *   *   *   *   *  
  *   *   *   *   *   *   *   *   *   *  
*   *   *   *   *   o   *   *   *   *   *
*   *   *   *   *   a   *   *   *   *   *
  *   *   *   *   o   o   *   *   *   *  
  *   *   *   *   *   *   *   *   *   *  
*   *   *   *   *   *   *   *   *   *   *
*   *   *   *   *   *   *   *   *   *   *
  *   *   *   *   *   *   *   *   *   *  
  *   *   *   *   *   *   *   *   *   *  
*   *   *   *   *   *   *   *   *   *   *
*   *   *   *   *   *   *   *   *   *   *
  *   *   *   *   *   *   *   *   *   *  
  *   *   *   *   *   *   *   *   *   *  
   0.50   0.50   9.00
   0.80   0.40   0.40
   0.00   0.00   0.00
  -0.40   0.00   0.00

The symbols have the same meaning as in the previous section. In this case the target site is either a split ('s'), and grafted of one of the six orientations depicted in Fig. 6 (a-f) or a spiro (A-F). The barriers for transitions away from the target site are given in two lines, each of 3 values, following the schematic of the structure.

If the target site is a spiro, the first value of the first line is the barrier to rotate one position clockwise (e.g. A to B). The second value is the barrier to rotate one position anti-clockwise (e.g. A to F). The third value is the barrier to move to the nearest-neighbour spiro site (alpha) in the direction of the current orientation. The first value of the second line is the barrier to move from spiro to grafted (of the same orientation) towards the target plane. The second, the barrier to move away from the target plane. The third value is the barrier to recombine with a nearest-neighbour vacancy in the target plane.

If the target site is a grafted, the first value of the first line is the barrier to rotate one position clockwise (e.g. a to b). The second value is the barrier to rotate one position anti-clockwise (e.g. a to f). The third value is the barrier to move to the nearest-neighbour grafted site (alpha) in the direction of the current orientation. The first value of the second line is the barrier to move from grafted to spiro (of the same orientation). The second value is the barrier to move to the alpha split. The third value is the barrier to move to the beta split (or to recombine with a vacancy if in a nearest-neighbour position).

If the target site is a split, the 1st, 2nd and 3rd values are the barriers to move to the 1(2),3(4) and 5(6) grafted positions (Fig. 6) towards the closest occupied interstitial plane. The 1st, 2nd and 3rd values of the second lines are the barriers to move to the 1(2),3(4) and 5(6) grafted positions (Fig. 6) away from the closest occupied interstitial plane.

Standard Output

The standard output is written the the terminal, and can be piped into a file using the '>' specifier (there is no standard input). This output consists of a summary of the system as it is read in by program: i.e. the system dimensions, number of atoms, temperature and number of KMC steps. A summary of the contents of the library files is also displayed. A summary of each KMC step is then printed in sequence. The first integer is the step number. The 2nd integer is the x coordinate (the system matrix index) of the active site chosen by the algorithm. The 3rd integer is the y index and the 4th the z index. The 5th integer is the 'direction' of the transition:

	1 – 6	:	Undercoordinated atom move in plane (directions as in Fig. 6)
	7	:	Undercoordinated atom bond to atom in layer above. 
	8	:	Undercoordinated atom bond to atom in layer below.
	9	: 	Move undercoordinated atom to plane above. 
	10	:	Move undercoordinated atom to plane below. 
	11	: 	Split interstitial to grafted above plane (direction 1 or 2)
	12	: 	Split interstitial to grafted above plane (direction 3 or 4)
	13	: 	Split interstitial to grafted above plane (direction 5 or 6)
	14	: 	Split interstitial to grafted below plane (direction 1 or 2)
	15	: 	Split interstitial to grafted below plane (direction 3 or 4)
	16	: 	Split interstitial to grafted below plane (direction 5 or 6)
	21	:	Grafted/split to move clockwise
	22	:	Grafted/split to move anti-clockwise
	23	:	Grafted/split to move to neighbouring alpha
	24	:	grafted to move to spiro / sprio to move up grafted
	25	: 	grafted to move to local alpha split / spiro to move down grafted
	26	:	grafted to move to non-local beta split / spiro to recombine

The 6th integer is the position of the corresponding library entry of the selected transition in either the ens.dat or iens.dat files. This can be useful for diagnosing problems. The 7th value is the barrier of the transition selected by the KMC algorithm (eV). The 8th value is the elapsed real simulation time (in s). The 9th and final value is the total system energy (this will remain zero if the en_min switch is off in the input file and the values are not provided in the library files). This summary of each transition will be printed until the maximum number of steps is reached, the stop_time is reached, or there are no further transitions. This can happen either when there are no defects (all of them having re-combined or diffused to the boundaries) or all further transitions are inaccessible (i.e. 9 eV or above). The program will state which if either of these conditions is reached.

system.out

The system.out file has the same format as the input, and is printed every system n steps. It is useful for restarting simulations (by renaming system.out system.in).

system.xyz

The system.xyz file contains an xyz format movie of the trajectory of the system, printed either every trajectory n steps or every traj_interval t seconds. All the atoms, or just the defects are printed depending on the xyz_full switch.

tens.out

The tens.out file also lists information on each transition that can be useful is monitoring the evolution of the system. The first number in each line is the simulation time (s), the 2nd value is the system energy. The 3rd number is the number or vacancies that have diffused to the system boundaries (in a non-periodic simulation) and disappeared. The 4th number is the number or interstitials that have diffused to the system boundaries (in a non-periodic simulation) and disappeared. The 5th number is the number of vacancy-interstitial pairs that have re-combined.