exercises:2015_ethz_mmm:c2h2_bond_energy
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
exercises:2015_ethz_mmm:c2h2_bond_energy [2015/02/26 13:35] – yakutovich | exercises:2015_ethz_mmm:c2h2_bond_energy [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== C2H2 and C2H4 bond energy ====== | ====== C2H2 and C2H4 bond energy ====== | ||
<note warning> | <note warning> | ||
- | Before you start it is **ABSOLUTELY NEСESSARY** to update the function library. So from you $HOME directory please run: | + | TO USE THE FUNCTION LIBRARY (VERSION UP TO DATE) IN THE INTERACTIVE SHELL: |
- | < | + | |
- | you@eulerX ~$ ./ | + | |
- | </ | + | |
- | ** Pay atention to the output of this program. It may give you some helpfull information** | + | |
- | + | ||
- | If you don't have the file " | + | |
- | < | + | |
- | you@eulerX ~$ unzip update_functionlibrary.zip | + | |
- | you@eulerX ~$ chmod 755 update_functionlibrary | + | |
- | </ | + | |
+ | you@eulerX ~$ module load courses mmm vmd | ||
+ | |||
+ | you@eulerX ~$ mmm-init | ||
</ | </ | ||
- | <note important> | + | |
+ | |||
+ | <note important> | ||
< | < | ||
Line 21: | Line 16: | ||
</ | </ | ||
- | **and to submit the job chain:** | + | **and to submit the job:** |
< | < | ||
- | you@eulerX ~$ bsub < c2h2.a.chain | + | you@eulerX ~$ bsub < jobname |
</ | </ | ||
</ | </ | ||
- | Create a new directory for this exercise: | + | Download the 2.1 exercise |
< | < | ||
- | you@eulerX ~$ mkdir mmm_exercise_2.1 | + | you@eulerX ~$ wget http:// |
- | you@eulerX ~$ cd mmm_exercise_2.1 | + | you@eulerX ~$ unzip exercises: |
</ | </ | ||
- | |||
- | |||
- | |||
- | In this exercise you will test the general AMBER force field, which is suitable for a large class of molecules. In this example you will compute the classical energy of a simple acetylene molecule and apply small variations to the C-C bond lengths. | ||
<note tip> | <note tip> | ||
All files of this exercise (**input and scripts are all commented**) can be downloaded from the wiki: {{exercise_2.1.zip|}} | All files of this exercise (**input and scripts are all commented**) can be downloaded from the wiki: {{exercise_2.1.zip|}} | ||
</ | </ | ||
- | Please copy them to your directory. The input file structure of the template is the following: | ||
- | <code - c2h2.amber.inp.templ> | + | In this exercise you will test the general AMBER force field, which is suitable for a large class of molecules. In this example you will compute the classical energy of a simple acetylene molecule and apply small variations to the C-C bond lengths. |
+ | |||
+ | Then go to the directory " | ||
+ | < | ||
+ | you@eulerX ~$ cd exercise_2.1/ | ||
+ | </ | ||
+ | The input file structure of the template is the following: | ||
+ | |||
+ | <code - c2h2.inp.templ> | ||
& | & | ||
METHOD FIST ! Using Molecular Mechanics | METHOD FIST ! Using Molecular Mechanics | ||
Line 104: | Line 102: | ||
The script to modify the C-C distance in the input and generate the curve is the following: | The script to modify the C-C distance in the input and generate the curve is the following: | ||
- | <code bash c2h2.amber.chain> | + | <code bash c2h2.chain> |
# | # | ||
# task 2.1 C2H2 bond strength | # task 2.1 C2H2 bond strength | ||
Line 117: | Line 115: | ||
# | # | ||
# loads the functions | # loads the functions | ||
- | # this script uses the functions: | + | # this script uses the functions: |
# | # | ||
module load new cp2k | module load new cp2k | ||
- | . ~/Scripts/myfunctions.bash | + | . /cluster/apps/ |
Line 132: | Line 130: | ||
# | # | ||
- | for n in `list -5 5` | + | for n in `m_list |
do | do | ||
- | dist_cc=`change | + | dist_cc=`m_change |
- | c2=`add $dist_hc $dist_cc ` | + | c2=`m_sum $dist_hc $dist_cc` |
- | h2=`add $c2 $dist_hc ` | + | h2=`m_sum $c2 $dist_hc ` |
# | # | ||
# replaces coordinates in the input | # replaces coordinates in the input | ||
# | # | ||
- | | + | |
# | # | ||
# Runs cp2k | # Runs cp2k | ||
Line 150: | Line 148: | ||
# gets the energy from the output (in a.u.) | # gets the energy from the output (in a.u.) | ||
# | # | ||
- | energy=` | + | energy=` |
echo $dist_cc $energy | echo $dist_cc $energy | ||
# | # | ||
Line 163: | Line 161: | ||
mv c2h2.*.inp c2h2.*.out Logs | mv c2h2.*.inp c2h2.*.out Logs | ||
rm RUN* *restart* | rm RUN* *restart* | ||
+ | |||
+ | |||
</ | </ | ||
Line 170: | Line 170: | ||
< | < | ||
- | you@brutusX mmm_exercise_2.1$ module load new cp2k | + | you@eulerX c2h2$ module load new cp2k |
- | you@brutusX mmm_exercise_2.1$ bsub < c2h2.a.chain | + | you@eulerX c2h2$ bsub < c2h2.chain |
</ | </ | ||
Line 179: | Line 179: | ||
< | < | ||
- | you@brutusX mmm_exercise_2.1$ gnuplot fit.triple.gnu | + | you@eulerX c2h2$ gnuplot fit.gnu |
</ | </ | ||
- | <code - fit.triple.gnu> | + | <code - fit.gnu> |
# | # | ||
f(x)=k*(x-x0)*(x-x0)+e0 | f(x)=k*(x-x0)*(x-x0)+e0 | ||
Line 223: | Line 223: | ||
Now, perform the same exercise in another directory for the molecule C2H4. | Now, perform the same exercise in another directory for the molecule C2H4. | ||
+ | < | ||
+ | you@eulerX c2h2$ cd ../c2h4 | ||
+ | </ | ||
- | * The input c2h4.amber.inp.templ is similar to the previous one, only with different project name (C2H4) and coordinates: | + | * The new input c2h4.inp.templ is similar to the previous one, only with different project name (C2H4) and coordinates: |
<code coo.ch4> | <code coo.ch4> | ||
Line 237: | Line 240: | ||
* The script to modify the bond lengths changes slightly as well | * The script to modify the bond lengths changes slightly as well | ||
- | <code bash c2h4.a.chain> | + | <code bash c2h4.chain> |
# | # | ||
# task 2.2 C2H4 bond strength | # task 2.2 C2H4 bond strength | ||
Line 250: | Line 253: | ||
# | # | ||
# loads the functions | # loads the functions | ||
- | # this script uses the functions: | + | # this script uses the functions: |
# | # | ||
module load new cp2k | module load new cp2k | ||
- | . ~/ | + | #. ~/ |
+ | . / | ||
Line 265: | Line 269: | ||
# | # | ||
- | for n in `list -5 5` | + | for n in `m_list |
do | do | ||
- | dist_cc=`change | + | dist_cc=`m_change |
- | c2=`add $dist_hcx $dist_cc` | + | c2=`m_sum $dist_hcx $dist_cc` |
- | h3=`add $c2 $dist_hcx ` | + | h3=`m_sum $c2 $dist_hcx ` |
# | # | ||
# replaces coordinates in the input | # replaces coordinates in the input | ||
# | # | ||
- | | + | |
# | # | ||
# Runs cp2k | # Runs cp2k | ||
Line 282: | Line 286: | ||
# gets the energy from the output (in a.u.) | # gets the energy from the output (in a.u.) | ||
# | # | ||
- | energy=` | + | energy=` |
echo $dist_cc $energy | echo $dist_cc $energy | ||
# | # | ||
Line 295: | Line 299: | ||
mv c2h4.*.inp c2h4.*.out Logs | mv c2h4.*.inp c2h4.*.out Logs | ||
rm RUN* *restart* | rm RUN* *restart* | ||
- | | + | |
+ | | ||
</ | </ | ||
Line 303: | Line 308: | ||
<note tip> | <note tip> | ||
- Report the values of the bond length and force constants in all cases. | - Report the values of the bond length and force constants in all cases. | ||
- | - Discuss these values in view of the kind of molecules we are simulating | + | - Discuss these values in view of the kind of molecules we are simulating. |
+ | </ |
exercises/2015_ethz_mmm/c2h2_bond_energy.1424957731.txt.gz · Last modified: 2020/08/21 10:14 (external edit)