#!/usr/bin/perl # ###################### expt setup #setup the 1D Pithirds experiments #run this script in the /opt/../mac/user directory #and then run the 2 files below from the command line $outfile1="set_pithirds"; $outfile2="run_pithirds"; $start = 601; $finish= 617; $k1 = 4; # number of rotor periods in each K1 element $k2=32; #k2 repeats of a*b*c (no recoupling part) $k3=0; #k3 repeasts of last b (recoupling part) $k4=4; #number of rotor cycles in each a,b and c $ktot= $k2+$k3; #########generate random numbering #srand; #@new = (); #@old = $start .. $finish; #while (@old) { #push(@new, splice(@old, rand @old, 1)); #} ################# $x=$low; open(OUTPUT, "> $outfile1"); open(OUTPUT2, "> $outfile2"); for($i = $start; $i <= $finish; $i = $i + 1){ printf OUTPUT "re %d\n",$i; printf OUTPUT "setdef ackn no\n"; printf OUTPUT "l2 %3.0f\n",$k2; printf OUTPUT "l3 %3.0f\n",$k3; if($i<$finish){printf OUTPUT "wrpa %d\n",$i+1;} print OUTPUT "\n"; printf OUTPUT2 "re %d\n",$i; printf OUTPUT2 "setdef ackn no\n"; printf OUTPUT2 "ii\n"; printf OUTPUT2 "zg\n"; printf OUTPUT2 "\n"; $x=$inc+$x; $k2=$k2-2; $k3=$k3+2; } close (OUTPUT);close (OUTPUT2); exit;