User Tools

Site Tools


exercises:2015_ethz_mmm:c2h2_bond_energy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
exercises:2015_ethz_mmm:c2h2_bond_energy [2015/03/13 15:25] dpasseroneexercises:2015_ethz_mmm:c2h2_bond_energy [2015/06/02 11:31] dpasserone
Line 115: Line 115:
 # #
 # loads the functions # loads the functions
-# this script uses the functions: change replace getcolumn add list+# this script uses the functions: m_change m_replace m_getcolumn m_sum m_list
 # #
 module load new cp2k module load new cp2k
-~/Scripts/myfunctions.bash+. /cluster/apps/courses/mmm/m_functions.bash
  
  
Line 130: Line 130:
 # #
  
-for n in `list -5 5`+for n in `m_list -5 5`
 do do
-  dist_cc=`change $dist_cc0 $n $delta` +  dist_cc=`m_change $dist_cc0 $n $delta` 
-  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
   #   #
-  replace _C1_ $dist_hc < c2h2.amber.inp.templ | replace _C2_ $c2  | replace _H2_ $h2 > c2h2.$dist_cc.inp+  m_replace _C1_ $dist_hc < c2h2.inp.templ | m_replace _C2_ $c2  | m_replace _H2_ $h2 > c2h2.$dist_cc.inp
   #   #
   # Runs cp2k   # Runs cp2k
Line 148: Line 148:
   # gets the energy from the output (in a.u.)   # gets the energy from the output (in a.u.)
   #   #
-  energy=` getcolumn 'ENERGY|' 9 < c2h2.$dist_cc.out `+  energy=` m_getcolumn 'ENERGY|' 9 < c2h2.$dist_cc.out ` 
   echo $dist_cc $energy  >> curve.amber.c2h2   echo $dist_cc $energy  >> curve.amber.c2h2
 # #
Line 161: Line 161:
 mv c2h2.*.inp c2h2.*.out Logs mv c2h2.*.inp c2h2.*.out Logs
 rm RUN* *restart* rm RUN* *restart*
 +
 +
  
 </code> </code>
Line 251: Line 253:
 # #
 # loads the functions # loads the functions
-# this script uses the functions: change replace getcolumn add list+# this script uses the functions: m_change m_replace m_getcolumn m_sum m_list
 # #
 module load new cp2k module load new cp2k
-. ~/Scripts/myfunctions.bash+#. ~/Scripts/myfunctions.bash 
 +. /cluster/apps/courses/mmm/m_functions.bash
  
  
Line 266: Line 269:
 # #
  
-for n in `list -5 5`+for n in `m_list -5 5`
 do do
-  dist_cc=`change $dist_cc0 $n $delta` +  dist_cc=`m_change $dist_cc0 $n $delta` 
-  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
   #   #
-  replace _C1_ $dist_hcx < c2h4.amber.inp.templ | replace _C2_ $c2  | replace _H3_ $h3 > c2h4.$dist_cc.inp+  m_replace _C1_ $dist_hcx < c2h4.inp.templ | m_replace _C2_ $c2  | m_replace _H3_ $h3 > c2h4.$dist_cc.inp
   #   #
   # Runs cp2k   # Runs cp2k
Line 283: Line 286:
   # gets the energy from the output (in a.u.)   # gets the energy from the output (in a.u.)
   #   #
-  energy=` getcolumn 'ENERGY|' 9 < c2h4.$dist_cc.out ` +  energy=` m_getcolumn 'ENERGY|' 9 < c2h4.$dist_cc.out `
   echo $dist_cc $energy  >> curve.amber.c2h4   echo $dist_cc $energy  >> curve.amber.c2h4
 # #
Line 296: Line 299:
 mv c2h4.*.inp c2h4.*.out Logs mv c2h4.*.inp c2h4.*.out Logs
 rm RUN* *restart* rm RUN* *restart*
-                                                                                                                                                                        + 
 +                                                                                                                                                  
 </code> </code>
  
exercises/2015_ethz_mmm/c2h2_bond_energy.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1