exercises:2018_uzh_acpc2:l-j_flu
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
exercises:2018_uzh_acpc2:l-j_flu [2018/04/20 13:49] – [Part II: Set up MD simulation] gtocci | exercises:2018_uzh_acpc2:l-j_flu [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 62: | Line 62: | ||
&MM | &MM | ||
& | & | ||
+ | &SPLINE | ||
+ | | ||
+ | &END | ||
& | & | ||
ATOM Ar # | ATOM Ar # | ||
Line 84: | Line 87: | ||
& | & | ||
& | & | ||
- | ABC [angstrom] | + | ABC [angstrom] |
| | ||
& | & | ||
Line 105: | Line 108: | ||
< | < | ||
- | for d in $(seq 2 0.1 4); do | + | for d in $(seq 3.0 0.1 9); do |
sed -e "s|4 0 0|{d} 0 0|" argon.inp > energy_{d}A.inp | sed -e "s|4 0 0|{d} 0 0|" argon.inp > energy_{d}A.inp | ||
cp2k.sopt -i energy_{d}A.inp -o energy_{d}A.out | cp2k.sopt -i energy_{d}A.inp -o energy_{d}A.out | ||
- | awk '/ | + | awk '/ |
done | done | ||
</ | </ | ||
- | * The command '' | + | * The command '' |
- | * With '' | + | * With '' |
- | * '' | + | * '' |
- | * ... and using ''> | + | * ... and using ''> |
* Then we run '' | * Then we run '' | ||
* Using '' | * Using '' | ||
+ | * The energy as a function of distance for all the single point calculations is then printed to the file '' | ||
Plot distance vs. potential energy and find the minimum in energy, which corresponds to the equilibrium distance. After having done it, you can calculate the minimum analytically as well. | Plot distance vs. potential energy and find the minimum in energy, which corresponds to the equilibrium distance. After having done it, you can calculate the minimum analytically as well. | ||
Line 312: | Line 316: | ||
< | < | ||
- | *Run the calculation and visualize the trajectories using VMD (see | + | *Run the calculation and visualize the trajectories using VMD. Plot the total energies (conserved quantity), temperature, |
- | [[https:// | + | |
*Change the timestep to 40 fs and rerun, look into the ener file again and compare to the simulation with the smaller timestep. What happens to the energy conservation? | *Change the timestep to 40 fs and rerun, look into the ener file again and compare to the simulation with the smaller timestep. What happens to the energy conservation? | ||
- | *Change the temperature to 30 K (use the smaller timestep of 5 fs) and compare the temperatures that you set up in the input files with the average temperature. Are they the same? Comment. | + | *Change the temperature to 150 K (use the smaller timestep of 5 fs) and compare the temperatures that you set up in the input files with the average temperature. Are they the same? Comment. |
</ | </ | ||
- | ===== Part III: Radial distribution functions | + | |
+ | <note tip> | ||
+ | See | ||
+ | [[ https:// | ||
+ | </ | ||
+ | ===== Part III: Radial distribution functions | ||
+ | |||
+ | In this exercise you are asked to compute the radial distribution function of liquid Ar at different temperatures. First of all perform two simulations at 85 K and 150 K for liquid Ar in the NVT ensemble to ensure the simulations are equilibrated at the right temperatures. To perform simulations in NVT copy the relevant section in the input file as shown below. | ||
+ | |||
+ | < | ||
+ | &MD | ||
+ | ENSEMBLE NVT | ||
+ | STEPS 10000 | ||
+ | TIMESTEP 5 | ||
+ | TEMPERATURE 85.0 | ||
+ | & | ||
+ | & | ||
+ | TIMECON 100 # | ||
+ | &END NOSE | ||
+ | &END | ||
+ | &END MD | ||
+ | </ | ||
Use VMD or write your own program (Fortran, C, C++, Python etc.) to calculate radial distribution g(r). Plot g(r), and against various the temperatures to examine the effects. | Use VMD or write your own program (Fortran, C, C++, Python etc.) to calculate radial distribution g(r). Plot g(r), and against various the temperatures to examine the effects. | ||
Line 325: | Line 349: | ||
< | < | ||
- | * Plot g(r) at 85 and 30 K into the same graph. | + | * Plot g(r) at 85 and 150 K into the same graph. |
* What are the differences in the height of the first peak, and why does temperature contribute to the differences? | * What are the differences in the height of the first peak, and why does temperature contribute to the differences? | ||
* Compared to experimental data '' | * Compared to experimental data '' | ||
Line 496: | Line 520: | ||
===== Part IV: Ensembles | ===== Part IV: Ensembles | ||
- | In previous section, you have already run NVE ensemble molecular dynamics for Ar liquid. In this section, we will focus on the NVT, NPT ensembles. | + | In previous section, you have already run NVE and NVT ensemble molecular dynamics for Ar liquid. In this section, we will focus on the NPT ensembles and you will compare the results in different |
- | Step up NVT calculation, | + | Set up NPT calculation, |
- | + | ||
- | + | ||
- | &MD | + | |
- | ENSEMBLE NVT | + | |
- | STEPS 10000 | + | |
- | TIMESTEP 5 | + | |
- | TEMPERATURE 85.0 | + | |
- | & | + | |
- | & | + | |
- | TIMECON 100 # | + | |
- | &END NOSE | + | |
- | &END | + | |
- | &END MD | + | |
- | + | ||
- | + | ||
- | Step up NPT calculation, | + | |
& | & | ||
Line 529: | Line 537: | ||
TEMPERATURE 85.0 | TEMPERATURE 85.0 | ||
& | & | ||
- | PRESSURE | + | PRESSURE |
TIMECON 1000 | TIMECON 1000 | ||
&END BAROSTAT | &END BAROSTAT | ||
Line 540: | Line 548: | ||
< | < | ||
**TASK** | **TASK** | ||
- | *Run calculation using NVT at 85 K, check the temperature, | + | *For the calculations in the NVT ensemble |
- | *Run calculation using NVT (85 K) until the system is equilibrated | + | *It is a common practice to first perform a simulation in NVT and then run an NVE simulation. What is a possible reason for doing this? |
- | *You can check the size of the box during your NPT simulation, | + | * It is often needed to perform MD simulations in the NPT ensemble. For the case of Argon, it is liquid at 85 K at atmospheric pressure. First perform an NPT simulation at 85 K and atmospheric pressure. Then, based on the phase diagram reported in this [[https:// |
+ | | ||
& | & |
exercises/2018_uzh_acpc2/l-j_flu.1524232188.txt.gz · Last modified: 2020/08/21 10:15 (external edit)