[Swift-commit] r8157 - SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Wed Aug 13 17:13:39 CDT 2014


Author: wozniak
Date: 2014-08-13 17:13:39 -0500 (Wed, 13 Aug 2014)
New Revision: 8157

Modified:
   SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-local-mds.sh
   SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-mds.swift
Log:
Support more arguments


Modified: SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-local-mds.sh
===================================================================
--- SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-local-mds.sh	2014-08-13 21:58:51 UTC (rev 8156)
+++ SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-local-mds.sh	2014-08-13 22:13:39 UTC (rev 8157)
@@ -1,8 +1,29 @@
 #!/bin/bash -eu
 
+if [[ ${#*} != 7 ]]
+then
+  echo "usage: SIMULATIONS STEPS NP ND MASS DT SEED"
+  exit 1
+fi
+
+SIMULATIONS=$1
+STEPS=$2
+NP=$3
+ND=$4
+MASS=$5
+DT=$6
+SEED=$7
+
 source ../../cfg/setup-local.sh
 source setup-md.sh
 
 PROGRAM=run-mds
 stc     ${PROGRAM}.swift
-turbine -n 2 ${PROGRAM}.tcl  --simulations=4 --steps=10
+turbine -n 2 ${PROGRAM}.tcl    \
+  --simulations=${SIMULATIONS} \
+  --steps=${STEPS}             \
+  --np=${NP}                   \
+  --nd=${ND}                   \
+  --mass=${MASS}               \
+  --dt=${DT}                   \
+  --seed=${SEED}

Modified: SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-mds.swift
===================================================================
--- SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-mds.swift	2014-08-13 21:58:51 UTC (rev 8156)
+++ SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-mds.swift	2014-08-13 22:13:39 UTC (rev 8157)
@@ -8,10 +8,16 @@
 {
   int simulations = toint(argv("simulations"));
   int steps = toint(argv("steps"));
+  int np = toint(argv("np"));
+  int nd = toint(argv("nd"));
+  float mass = tofloat(argv("mass"));
+  float dt = tofloat(argv("dt"));
+  int seed = toint(argv("seed"));
   foreach i in [0:simulations-1]
   {
     file out_txt<sprintf("out-%i.txt",i)>;
     file out_trj<sprintf("out-%i.trj",i)>;
-    (out_txt, out_trj) = simulate(steps, 10, 3, 0, 10, 2, 1, 0.1, 42);
+    (out_txt, out_trj) =
+      simulate(steps, 10, 0, 0, np, nd, mass, dt, seed);
   }
 }




More information about the Swift-commit mailing list