Convert my PBS-queue howto from LaTeX to Markdown.
[blog.git] / posts / Abax / pbs_queues / run_vel_dist.sh
diff --git a/posts/Abax/pbs_queues/run_vel_dist.sh b/posts/Abax/pbs_queues/run_vel_dist.sh
deleted file mode 100755 (executable)
index 1a8265e..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/bash
-#
-# run_vel_dist.sh
-#
-# run N simulations each at a series of pulling speeds V
-# (non-velocity parameters are copied from the get_vel_dist.sh command line)
-# for each speed, save all unfolding data data_$V, and
-#  generate a histogram of unfolding forces hist_$V
-# also generate a file v_dep with the mean unfolding force vs velocity
-
-# We can't depend on the entire array in one shot, so
-# batch executions into a single array instance
-BN=100 # sawsim executions per array job instance
-N=50   # instances in a single array
-Vs=".2e-6 .5e-6 1e-6 2e-6 5e-6"
-SAFTEY_SLEEP=2 # seconds to sleep between spawning array job and depending on it
-               # otherwise dependencies don't catch
-
-STAMP=`date +"%Y.%m.%d.%H.%M.%S"`
-mkdir v_dep-$STAMP || exit 1
-cd v_dep-$STAMP
-echo "Date "`date` > v_dep_notes
-echo "Run$ sawsim $* -v \$V" >> v_dep_notes 
-echo "for V in $*" >> v_dep_notes
-
-Is="" # build a list of allowed 'i's, since 'for' more compact than 'while'
-i=1
-while [ $i -le $N ]
-  do
-  Is="$Is $i"
-  let "i += 1"
-done
-
-vdone_condition="afterany"
-VJOBIDS=""
-for V in $Vs
-do 
-  # run N sawtooth simulations
-  idone_condition="afterany"
-  cmd="cd \$PBS_O_WORKDIR
-         i=1
-         while [ \$i -le $BN ]; do
-           ~/sawsim/sawsim $* -v $V > run_$V-\$PBS_ARRAYID-\$i
-           let \"i += 1\"
-         done"
-  JOBID=`echo "$cmd" | qsub -h -t 1-$N -N "sawsim" -o run_$V.o -e run_$V.e` || exit 1
-  #  "3643.abax.physics.drexel.edu" --> "3643"
-  ARRAYID=`echo "$JOBID" | sed "s/\\([0-9]*\\)\\([.].*\\)/\\1/g"`
-  for i in $Is; do idone_condition="$idone_condition:$ARRAYID-$i"; done
-
-  sleep $SAFTEY_SLEEP
-  # once they're done, compile a list of all unfolding forces for each speed
-  JOBID=`echo "cd \\\$PBS_O_WORKDIR && cat run_$V-* | grep -v '#' > data_$V" |\
-      qsub -h -W depend="$idone_condition" -N sawComp -o data_$V.o -e data_$V.e` \
-        || exit 1
-  vdone_condition="$vdone_condition:$JOBID"
-  VJOBIDS="$VJOBIDS $JOBID"
-  for i in $Is; do qrls "$ARRAYID-$i"; done
-done
-# once we have force lists for each velocity, make histograms and F(V) chart
-echo "Final job :"
-echo "cd \$PBS_O_WORKDIR && ../vel_dist_graph.sh $Vs" | \
-    qsub -W depend="$vdone_condition" -N sawsimGraph || exit 1
-for job in $VJOBIDS; do qrls $job; done
-cd ..
-
-exit 0