exercises:2017_ethz_mmm:mc_and_kmc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
exercises:2017_ethz_mmm:mc_and_kmc [2017/03/08 15:06] – dpasserone | exercises:2017_ethz_mmm:mc_and_kmc [2017/03/10 16:21] – dpasserone | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
===== | ===== | ||
In this exercise you will perform a MC simulation for different coverages of " | In this exercise you will perform a MC simulation for different coverages of " | ||
Line 7: | Line 7: | ||
<note tip> | <note tip> | ||
- | All files of this exercise be downloaded from the wiki: {{e3_bis.zip|}} | + | All files of this exercise |
Download the exercise into your $HOME folder and unzip it. | Download the exercise into your $HOME folder and unzip it. | ||
< | < | ||
- | you@eulerX ~$ wget http:// | + | you@eulerX ~$ wget http:// |
- | you@eulerX ~$ unzip exercises: | + | you@eulerX ~$ unzip exercises: |
you@eulerX ~$ cd exercise_3 | you@eulerX ~$ cd exercise_3 | ||
</ | </ | ||
Line 20: | Line 20: | ||
In an experiment performed at Empa, sumanene molecules were adsorbed on a Ag(111) surface. | In an experiment performed at Empa, sumanene molecules were adsorbed on a Ag(111) surface. | ||
It was found that at very low coverage (0.02) 30% of the molecules were weakly bound into dimers. | It was found that at very low coverage (0.02) 30% of the molecules were weakly bound into dimers. | ||
+ | [ [[http:// | ||
- | IMAGE | + | {{: |
<note tip> | <note tip> | ||
Line 27: | Line 28: | ||
(blue dots) are allowed to move by random discrete steps | (blue dots) are allowed to move by random discrete steps | ||
- | IMAGE LATTICE | + | {{: |
While in execution, the code will show you snapshots of the positions of the molecules on the lattice | While in execution, the code will show you snapshots of the positions of the molecules on the lattice | ||
on the left panel. | on the left panel. | ||
+ | |||
+ | {{: | ||
+ | |||
In the central panel average values for the number of isolated molecules, the number of dimers and the number of clusters | In the central panel average values for the number of isolated molecules, the number of dimers and the number of clusters | ||
is plotted. | is plotted. | ||
Line 45: | Line 49: | ||
< | < | ||
- | </ | + | |
coverage 0.02 | coverage 0.02 | ||
number of cycles 200 | number of cycles 200 | ||
binding energy in eV 0.0 | binding energy in eV 0.0 | ||
Temperature in K 200 | Temperature in K 200 | ||
+ | </ | ||
+ | Estimate the dimer binding energy as | ||
+ | DE=kT * ln(n0/nexp) | ||
+ | where k is Boltzmann' | ||
+ | T is the simulation (and experiment) temperature | ||
+ | n0 is the concentration of dimers in the case of zero interaction | ||
+ | nexp is the concentration of dimers found in the experiment | ||
+ | to compute n0 use the average number of isolated molecules and of isolated diners that you have as output | ||
</ | </ | ||
+ | |||
+ | <note warning> | ||
+ | **TASK2** | ||
+ | repeat the simulation using as DE your estimate. | ||
+ | What do you get? | ||
+ | |||
+ | **TASK3** | ||
+ | Repeat the simulation with coverage 0.1 and DE=-0.02 and DE=-0.1 | ||
+ | Describe what you obtain. | ||
+ | Now try coverage=0.1 T=400 DE=-0.1 | ||
+ | Comment the result | ||
+ | |||
+ | **TASK4** | ||
+ | have a look at the pyhton code, identify the main MC steps in the MAIN part of the code | ||
+ | |||
+ | < | ||
+ | clusters_plot=[] | ||
+ | for i in range(nouter): | ||
+ | |||
+ | and also the section | ||
+ | |||
+ | #### DECIDE whether to accept or not the move | ||
+ | </ | ||
+ | What do you think it would happen if you replace the condition | ||
+ | < | ||
+ | if np.random.random()< | ||
+ | </ | ||
+ | with the condition | ||
+ | < | ||
+ | if enew< | ||
+ | </ | ||
+ | </ | ||
+ | <note warning> | ||
+ | The most complex (and unefficient) sections of the code are the two functions | ||
+ | < | ||
+ | def allconnected(m, | ||
+ | </ | ||
+ | which finds out all teh molecules that are connected to a given one | ||
+ | < | ||
+ | def neighbors(a, | ||
+ | </ | ||
+ | which finds out all the molecules that are 1st neighbors to a given one. | ||
+ | |||
+ | The function " | ||
+ | you imagine roughly a more efficient function to perform the same task? | ||
+ | </ | ||
+ | <note warning> | ||
+ | The code, at each step, moves a particle chosen randomly to a new site chosen randomly. | ||
+ | **Would it be correct to move all particles in a step? | ||
+ | what would change?** | ||
+ | </ | ||
+ |
exercises/2017_ethz_mmm/mc_and_kmc.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1