Monte-Carlo
Jump to navigation
Jump to search
Running Monte-Carlo
To perform a (Grand-Canonical) Monte-Carlo simulation we must run TurboGAP in mc
mode:
turbogap mc
The following files are written to every write_xyz = N
steps
mc.log
: self-explanatory,- format:
mc_step mc_move accepted E_trial E_current N_sites(trial) N_gcmc_species(trial)
- format:
mc_all.xyz
: an appended file which contains all accepted movesmc_trial.xyz
: a single configuration which contains the trial movemc_current.xyz
: a single configuration which contains the current accepted
Monte-Carlo Move Types
We can specify a number of Monte-Carlo trial move types, including doing molecular dynamics (hybrid Monte-Carlo) as trial moves. These include
- Displacement
- Swap (to swap atoms in the simulation box)
- Volume (for NPT)
- Insertion (for mu VT)
- Removal (for mu VT)
- MD (for hybrid Monte-Carlo)
Minimal Input File
! Species-specific info atoms_file = 'atoms.xyz' pot_file = 'gap_files/CO.gap' n_species = 2 species = C O masses = 12.01 15.99 mc_nsteps = 5000 ! Number of mc trial steps to be performed n_mc_types = 3 ! Number of mc trial types mc_types = 'move' 'insertion' 'removal' ! MC types can be: 'insertion' 'removal' 'md' 'swap' 'move' ! 'volume' mc_acceptance = 1 1 1 ! Ratios for choosing the respective trial moves (all equally likely here) mc_move_max = 0.2 ! Maximum distance for the move of a particular particle n_mc_mu = 1 mc_mu = 0.0 ! gcmc: Chemical potential [eV], using a large one here mc_species = 'O' ! gcmc: species to insert / remove mc_min_dist = 0.1 ! gcmc: minimum distance between particles for insertion ! Note: The following files are written to every write_xyz steps ! mc.log: self-explanatory, ! format: mc_step mc_move accepted E_trial E_current N_sites(trial) ! N_gcmc_species(trial) ! mc_all.xyz: an appended file which contains all accepted moves ! mc_trial.xyz: a single configuration which contains the trial move ! mc_current.xyz: a single configuration which contains the current accepted write_xyz = 200
Monte-Carlo options
Keyword | Definition | Optional | Type | Default | Used when | Example |
---|---|---|---|---|---|---|
mc_nsteps
|
Number of MC steps | N | Int | 0 | turbogap mc | mc_nsteps = 1000
|
n_mc_types
|
Number of MC types | N | Int | 0 | turbogap mc | n_mc_types = 2
|
mc_types
|
Types of MC trials | N | Str(s) | None | n_mc_types > 0
|
mc_types = 'volume' 'move'
|
mc_acceptance
|
Ratios of MC trial moves | N | Int(s) | None | n_mc_types > 0
|
mc_acceptance = 2 1
|
n_mc_swaps
|
Number of swaps | Y | Int | 0 | 'swap' in mc_types
|
n_mc_swaps = 2
|
mc_swaps
|
Swap species | Y | Strs | None | 'swap' in mc_types
|
mc_swaps = 'C' 'O' 'N' 'C'
|
mc_move_max
|
Maximum displacement [A] | Y | Float | 1.0 | 'move' in mc_types
|
mc_move_max = 0.5
|
mc_lnvol_max
|
Log volume max for volume moves. | Y | Float | 0.01 | 'volume' in mc_types
|
mc_lnvol_max = 0.02
|
mc_min_dist
|
Minimum distance for insertion [A] | Y | Float | 0.2 | 'insertion in mc_types
|
mc_min_dist = 0.1
|
n_mc_mu
|
Number of chemical potentials/gcmc species | Y | Int | 1 | 'insertion'/'removal' in mc_types
|
n_mc_mu = 2
|
mc_mu
|
Chemical potential(s) [eV] | Y | Float | 0.0 | 'insertion'/'removal' in mc_types
|
mc_mu = -5.16 -2.25
|
mc_species
|
GCMC species | Y | Str | None | 'insertion'/'removal' in mc_types
|
mc_species = 'O' 'H'
|
mc_relax
|
Relax MC trials prior to acc. evaluation | Y | Bool | .false. | turbogap mc | mc_relax = .true.
|
n_mc_relax_after
|
Number of specific trials to relax | Y | Int(s) | None | mc_relax = .true.
|
n_mc_relax_after = 1
|
mc_relax_after
|
Relax specific MC trial types | Y | Str(s) | None | n_mc_relax_after > 0
|
mc_relax_after = 'volume'
|
mc_nrelax
|
Number of relaxation steps after trial | Y | Int | 0 | mc_relax = .true.
|
mc_nrelax = 50
|
mc_relax_opt
|
Optimisation for relaxing after steps | Y | Str | 'gd' | mc_relax = .true.
|
mc_relax_opt = 'gd-box-ortho'
|
mc_hamiltonian
|
Use NVE for 'md' trials | Y | Bool | .false. | 'md' in mc_types
|
mc_hamiltonian = .true.
|
mc_hybrid_opt
|
Optimisation for 'md' steps | Y | Str | 'vv' | 'md' in mc_types
|
mc_hybrid_opt = 'vv'
|
mc_write_xyz
|
Debug: read and write to files every step | Y | Bool | .false. | turbogap mc
|
mc_write_xyz = .true.
|