exercises:2016_uzh_cmest:first_simulation_run
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
exercises:2016_uzh_cmest:first_simulation_run [2016/09/22 14:43] – [Computation of the Lennard Jones curve] tmueller | exercises:2016_uzh_cmest:first_simulation_run [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 7: | Line 7: | ||
To get you started, we will do a simple exercise using Molecular Mechanics (that is: a classical approach). The point is to get familiar with the options, organizing and editing the input file and analyze the output. | To get you started, we will do a simple exercise using Molecular Mechanics (that is: a classical approach). The point is to get familiar with the options, organizing and editing the input file and analyze the output. | ||
+ | |||
====== Computation of the Lennard Jones curve ====== | ====== Computation of the Lennard Jones curve ====== | ||
Line 103: | Line 104: | ||
**** ** ******* | **** ** ******* | ||
[...] | [...] | ||
- | ENERGY| Total FORCE_EVAL ( FIST ) energy (a.u.): | + | ENERGY| Total FORCE_EVAL ( FIST ) energy (a.u.): |
[...] | [...] | ||
Line 250: | Line 251: | ||
Plot again the energy curve. | Plot again the energy curve. | ||
+ | ====== Tips & Tricks ====== | ||
+ | |||
+ | ===== Parsing the output ===== | ||
+ | |||
+ | Many times you will have to get some value out of a simulation output, in this case, the energy. | ||
+ | This can achieved in a number of ways: | ||
+ | |||
+ | * Using the '' | ||
+ | $ grep "Total FORCE_EVAL" | ||
+ | </ | ||
+ | | ||
+ | </ | ||
+ | * Using the '' | ||
+ | awk '/Total FORCE_EVAL/ { print9; }' energy.out | ||
+ | </ | ||
+ | -0.000250281091139 | ||
+ | </ | ||
+ | |||
+ | ===== Generating input files ===== | ||
+ | |||
+ | Many times you will have to run the same simulation with different parameters (here the distance). | ||
+ | |||
+ | A simple way to generate the different input files is using shell scripting in combination with '' | ||
+ | |||
+ | < | ||
+ | for d in $(seq 2 0.1 4); do | ||
+ | sed -e "s|4 0 0|{d} 0 0|" energy.inp > energy_{d}A.inp | ||
+ | cp2k.sopt -i energy_{d}A.inp -o energy_{d}A.out | ||
+ | awk '/ | ||
+ | done | ||
+ | </ | ||
+ | |||
+ | * The command '' | ||
+ | * With '' | ||
+ | * '' | ||
+ | * ... and using ''> | ||
+ | * Then we run '' | ||
+ | * Using '' |
exercises/2016_uzh_cmest/first_simulation_run.1474555406.txt.gz · Last modified: 2020/08/21 10:15 (external edit)