# # task 2.1 C2H2 bond strength # # the distances of equilibrium # and increment delta # dist_cc0=1.181 dist_hc=1.066 delta=0.0002 # # loads the functions # this script uses the functions: m_change m_replace m_getcolumn m_sum m_list # module load cp2k . /cluster/apps/courses/mmm/m_functions.bash # # deletes old output file # rm curve.amber.c2h2 # # loop over all values of n # for n in `m_list -5 5` do dist_cc=`m_change $dist_cc0 $n $delta` c2=`m_sum $dist_hc $dist_cc` h2=`m_sum $c2 $dist_hc ` # # replaces coordinates in the input # m_replace _C1_ $dist_hc < c2h2.inp.templ | m_replace _C2_ $c2 | m_replace _H2_ $h2 > c2h2.$dist_cc.inp # # Runs cp2k # echo RUNNING cp2k with the input c2h2.$dist_cc.inp # bsub -n 1 mpirun cp2k.popt -i c2h2.$dist_cc.inp > c2h2.$dist_cc.out cp2k.popt -i c2h2.$dist_cc.inp > c2h2.$dist_cc.out # # gets the energy from the output (in a.u.) # energy=` m_getcolumn 'ENERGY|' 9 < c2h2.$dist_cc.out ` echo $dist_cc $energy >> curve.amber.c2h2 # # loop over n # done # # Cleaning... # mkdir Logs mv c2h2.*.inp c2h2.*.out Logs rm RUN* *restart*