exercises:2018_ethz_mmm:mc2018
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| exercises:2018_ethz_mmm:mc2018 [2018/03/08 08:14] – dpasserone | exercises:2018_ethz_mmm:mc2018 [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Monte Carlo simulations for the estimation of molecule | + | ====== Monte Carlo simulations for the estimation of pair interactions |
| ===== | ===== | ||
| 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 10: | Line 10: | ||
| - | Please download the exercise | + | Please download the program **monte_carlo.py** |
| Line 46: | Line 46: | ||
| <note important> | <note important> | ||
| **TASK 1** | **TASK 1** | ||
| - | Execute the program with parameters: | + | Execute the program |
| + | < | ||
| + | python monte_carlo.py | ||
| + | </ | ||
| + | with parameters: | ||
| < | < | ||
| Line 107: | Line 111: | ||
| </ | </ | ||
| <note important> | <note important> | ||
| - | The most complex (and unefficient) sections of the code are the two functions | + | **TASK 5** The most complex (and unefficient) sections of the code are the two functions |
| < | < | ||
| def allconnected(m, | def allconnected(m, | ||
| Line 116: | Line 120: | ||
| </ | </ | ||
| which finds out all the molecules that are 1st neighbors to a given one. | which finds out all the molecules that are 1st neighbors to a given one. | ||
| + | <note warning> | ||
| To understand these sections you have to refer to the graph of the hexagonal lattice | To understand these sections you have to refer to the graph of the hexagonal lattice | ||
| with the convention adopted for the coordinate system. | with the convention adopted for the coordinate system. | ||
| Line 122: | Line 127: | ||
| Just think how you would do the task of identifying, | Just think how you would do the task of identifying, | ||
| an isolated dimer and thr ones that form clusters. Google can help you :) (you do not have to find a solution) | an isolated dimer and thr ones that form clusters. Google can help you :) (you do not have to find a solution) | ||
| + | </ | ||
| </ | </ | ||
| <note important> | <note important> | ||
| - | **TASK | + | **TASK |
| The code, at each step, moves a particle chosen randomly to a new site chosen randomly. | 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? | **Would it be correct to move all particles in a step? | ||
exercises/2018_ethz_mmm/mc2018.1520496888.txt.gz · Last modified: (external edit)
