Actually do (and document) multiple runs without epitope.... And use initial populati...
authorDariusz Murakowski <murakdar@mit.edu>
Thu, 20 Nov 2014 21:52:45 +0000 (16:52 -0500)
committerDariusz Murakowski <murakdar@mit.edu>
Mon, 24 Nov 2014 21:26:58 +0000 (16:26 -0500)
mc.cpp
ss.cpp
wf.cpp

diff --git a/mc.cpp b/mc.cpp
index df03df2..2ded1fe 100644 (file)
--- a/mc.cpp
+++ b/mc.cpp
@@ -243,7 +243,7 @@ void run(RunParameters_MC &r, unsigned seed) {
         
         else {
 
-            //for (unsigned int n=0;n<r.num_runs;n++) {
+            for (unsigned int n=0;n<r.num_runs;n++) {
             
                 Hamiltonian H(r.couplingsInfile);
                 H.set_temp(r.bh, r.bJ);
@@ -264,7 +264,7 @@ void run(RunParameters_MC &r, unsigned seed) {
                 }
                 */
                 
-            //}
+            }
             
         }
 
@@ -414,6 +414,7 @@ void usage()
 " -r                  flag to use relative energy condition for survival probability\n"
 " -esc                flag to run until escape observed (or max number of generations reached)\n"
 " -v                  flag for verbose output\n"
+" -numruns (int)      number of trajectories to simulate\n"
 "\n"
 " -2site              flag for two-site two-allele system\n"
 " -h1  (double)       value of field at site 1\n"
@@ -441,6 +442,7 @@ void usage()
  *  -r                  flag to use relative energy condition for survival probability
  *  -esc                flag to run until escape observed (or max number of generations reached)
  *  -v                  flag for verbose output
+ *  -numruns (int)      number of trajectories to simulate
  *  -2site              flag for two-site two-allele system
  */
 
diff --git a/ss.cpp b/ss.cpp
index caf5a3b..862b2c8 100644 (file)
--- a/ss.cpp
+++ b/ss.cpp
@@ -179,23 +179,23 @@ void run(RunParameters_SS &r, unsigned seed) {
         
         else {
 
-            //for (unsigned int n=0;n<r.num_runs;n++) {
+            for (unsigned int n=0;n<r.num_runs;n++) {
             
                 Hamiltonian H(r.couplingsInfile);
                 H.set_temp(r.bh, r.bJ);
-                Population P(H, r.n, r.mu);
+                Population P(H, r.n, r.mu, r.initFrac);
                 
                 unsigned int i;
                 for (i=0; i<r.g; ++i) {
                 
                     P.next_generation(H, rnd, r.useRelative, r.useVerbose);
-                    P.write_population(popout,i);
+                    P.write_population(popout,i+1);
 
                     if (r.runUntilEscape && P.escaped(H)) break;
 
                 }
                 
-            //}
+            }
             
         }
 
@@ -344,6 +344,7 @@ void usage()
 " -esc                flag to run until escape observed (or max number of generations reached)\n"
 " -esc_all            flag to run until escape from *all* immune pressure (or max num gen)\n"
 " -v                  flag for verbose output\n"
+" -numruns (int)      number of trajectories to simulate\n"
 "\n"
 " -2site              flag for two-site two-allele system\n"
 " -h1  (double)       value of field at site 1\n"
@@ -374,6 +375,7 @@ void usage()
  *  -r                  flag to use relative energy condition for survival probability
  *  -esc                flag to run until escape observed (or max number of generations reached)
  *  -v                  flag for verbose output
+ *  -numruns (int)      number of trajectories to simulate
  *  -2site              flag for two-site two-allele system
  */
 
diff --git a/wf.cpp b/wf.cpp
index 9994584..690d01d 100644 (file)
--- a/wf.cpp
+++ b/wf.cpp
@@ -179,23 +179,23 @@ void run(RunParameters &r, unsigned seed) {
         
         else {
 
-            //for (unsigned int n=0;n<r.num_runs;n++) {
+            for (unsigned int n=0;n<r.num_runs;n++) {
             
                 Hamiltonian H(r.couplingsInfile);
                 H.set_temp(r.bh, r.bJ);
-                Population P(H, r.n, r.mu);
+                Population P(H, r.n, r.mu, r.initFrac);
                 
                 unsigned int i;
                 for (i=0; i<r.g; ++i) {
                 
                     P.next_generation(H, rnd, r.useRelative, r.useVerbose);
-                    P.write_population(popout,i);
+                    P.write_population(popout,i+1);
 
                     if (r.runUntilEscape && P.escaped(H)) break;
 
                 }
                 
-            //}
+            }
             
         }
 
@@ -344,6 +344,7 @@ void usage()
 " -esc                flag to run until escape observed (or max number of generations reached)\n"
 " -esc_all            flag to run until escape from *all* immune pressure (or max num gen)\n"
 " -v                  flag for verbose output\n"
+" -numruns (int)      number of trajectories to simulate\n"
 "\n"
 " -2site              flag for two-site two-allele system\n"
 " -h1  (double)       value of field at site 1\n"
@@ -374,6 +375,7 @@ void usage()
  *  -r                  flag to use relative energy condition for survival probability
  *  -esc                flag to run until escape observed (or max number of generations reached)
  *  -v                  flag for verbose output
+ *  -numruns (int)      number of trajectories to simulate
  *  -2site              flag for two-site two-allele system
  */