| 39 | 
  | 
  bool haveMaxLength; | 
| 40 | 
  | 
  double maxLength; | 
| 41 | 
  | 
   | 
| 42 | 
+ | 
  bool separateOut; | 
| 43 | 
+ | 
  bool havePairCorrs; | 
| 44 | 
+ | 
  bool haveStaticCorrs; | 
| 45 | 
+ | 
 | 
| 46 | 
  | 
  int nBins; | 
| 47 | 
  | 
 | 
| 48 | 
  | 
  vector<PairCorrList> theList; | 
| 63 | 
  | 
   | 
| 64 | 
  | 
  // first things first, all of the initializations | 
| 65 | 
  | 
 | 
| 66 | 
< | 
  printf("Initializing stuff ....\n"); | 
| 63 | 
< | 
  fflush(sdtout); | 
| 66 | 
> | 
  fflush(stdout); | 
| 67 | 
  | 
  srand48( 1337 );          // the random number generator. | 
| 68 | 
  | 
  initSimError();           // the error handler | 
| 69 | 
  | 
 | 
| 75 | 
  | 
  | 
| 76 | 
  | 
  havePrefix = false; | 
| 77 | 
  | 
  haveMaxLength = false; | 
| 78 | 
+ | 
 | 
| 79 | 
+ | 
  haveStaticCorrs = false; | 
| 80 | 
+ | 
  havePairCorrs = false; | 
| 81 | 
+ | 
  separateOut = false; | 
| 82 | 
  | 
   | 
| 83 | 
  | 
  maxLength = 1.0; | 
| 84 | 
  | 
  nBins = 100; | 
| 85 | 
  | 
 | 
| 86 | 
< | 
  programName = argv[0]; /*save the program name in case we need it*/ | 
| 86 | 
> | 
  programName = argV[0]; /*save the program name in case we need it*/ | 
| 87 | 
  | 
 | 
| 88 | 
  | 
  for( i = 1; i < argC; i++){ | 
| 89 | 
  | 
     | 
| 121 | 
  | 
 | 
| 122 | 
  | 
          pairType = gofr; | 
| 123 | 
  | 
          theList.push_back(PairCorrList( pairType, pair1, pair2 )); | 
| 124 | 
+ | 
          havePairCorrs = true; | 
| 125 | 
  | 
        } | 
| 126 | 
  | 
 | 
| 127 | 
+ | 
        if( !strcmp( argV[i], "--gofrTheta" ) ){ | 
| 128 | 
+ | 
           | 
| 129 | 
+ | 
          i++; | 
| 130 | 
+ | 
          if( i>=argC ){ | 
| 131 | 
+ | 
            sprintf( painCave.errMsg, | 
| 132 | 
+ | 
                     "\n" | 
| 133 | 
+ | 
                     "not enough arguments for --gofrTheta\n"); | 
| 134 | 
+ | 
            usage(); | 
| 135 | 
+ | 
            painCave.isFatal = 1; | 
| 136 | 
+ | 
            simError(); | 
| 137 | 
+ | 
          }        | 
| 138 | 
+ | 
          pair1 = argV[i]; | 
| 139 | 
+ | 
 | 
| 140 | 
+ | 
          i++; | 
| 141 | 
+ | 
          if( i>=argC ){ | 
| 142 | 
+ | 
            sprintf( painCave.errMsg, | 
| 143 | 
+ | 
                     "\n" | 
| 144 | 
+ | 
                     "not enough arguments for --gofrTheta\n"); | 
| 145 | 
+ | 
            usage(); | 
| 146 | 
+ | 
            painCave.isFatal = 1; | 
| 147 | 
+ | 
            simError(); | 
| 148 | 
+ | 
          }        | 
| 149 | 
+ | 
          pair2 = argV[i]; | 
| 150 | 
+ | 
 | 
| 151 | 
+ | 
          pairType = gofrTheta; | 
| 152 | 
+ | 
          theList.push_back(PairCorrList( pairType, pair1, pair2 )); | 
| 153 | 
+ | 
          havePairCorrs = true; | 
| 154 | 
+ | 
        } | 
| 155 | 
+ | 
 | 
| 156 | 
+ | 
        if( !strcmp( argV[i], "--gofrOmega" ) ){ | 
| 157 | 
+ | 
           | 
| 158 | 
+ | 
          i++; | 
| 159 | 
+ | 
          if( i>=argC ){ | 
| 160 | 
+ | 
            sprintf( painCave.errMsg, | 
| 161 | 
+ | 
                     "\n" | 
| 162 | 
+ | 
                     "not enough arguments for --gofrOmega\n"); | 
| 163 | 
+ | 
            usage(); | 
| 164 | 
+ | 
            painCave.isFatal = 1; | 
| 165 | 
+ | 
            simError(); | 
| 166 | 
+ | 
          }        | 
| 167 | 
+ | 
          pair1 = argV[i]; | 
| 168 | 
+ | 
 | 
| 169 | 
+ | 
          i++; | 
| 170 | 
+ | 
          if( i>=argC ){ | 
| 171 | 
+ | 
            sprintf( painCave.errMsg, | 
| 172 | 
+ | 
                     "\n" | 
| 173 | 
+ | 
                     "not enough arguments for --gofrOmega\n"); | 
| 174 | 
+ | 
            usage(); | 
| 175 | 
+ | 
            painCave.isFatal = 1; | 
| 176 | 
+ | 
            simError(); | 
| 177 | 
+ | 
          }        | 
| 178 | 
+ | 
          pair2 = argV[i]; | 
| 179 | 
+ | 
 | 
| 180 | 
+ | 
          pairType = gofrOmega; | 
| 181 | 
+ | 
          theList.push_back(PairCorrList( pairType, pair1, pair2 )); | 
| 182 | 
+ | 
          havePairCorrs = true; | 
| 183 | 
+ | 
        } | 
| 184 | 
+ | 
 | 
| 185 | 
  | 
        else if( !strcmp( argV[i], "--version") ){ | 
| 186 | 
  | 
           | 
| 187 | 
  | 
          printf("\n" | 
| 311 | 
  | 
 | 
| 312 | 
  | 
            break; | 
| 313 | 
  | 
 | 
| 314 | 
+ | 
          case 's': | 
| 315 | 
+ | 
            // -s turn on separate output files | 
| 316 | 
+ | 
 | 
| 317 | 
+ | 
            separateOut = true; | 
| 318 | 
+ | 
            break; | 
| 319 | 
+ | 
 | 
| 320 | 
  | 
          case 'n': | 
| 321 | 
  | 
            // -n <int>    set <int> to the nBins | 
| 322 | 
  | 
 | 
| 466 | 
  | 
  theCorrs.setNbins( nBins ); | 
| 467 | 
  | 
  theCorrs.setFrames( infoArray, nFrames, reader ); | 
| 468 | 
  | 
  theCorrs.setPairCorrList( theList ); | 
| 469 | 
< | 
  theCorrs.initCorrelations( outPrefix ); | 
| 469 | 
> | 
  theCorrs.initCorrelations( outPrefix, separateOut, havePairCorrs, | 
| 470 | 
> | 
                             haveStaticCorrs ); | 
| 471 | 
  | 
 | 
| 472 | 
  | 
  printf("done\n"); | 
| 473 | 
  | 
  fflush(stdout); | 
| 501 | 
  | 
                "\n" | 
| 502 | 
  | 
                "   long:\n" | 
| 503 | 
  | 
                "   -----\n" | 
| 504 | 
< | 
                "   --gofr <atom1> <atom2>    g(r) for atom1 and atom2\n" | 
| 505 | 
< | 
                "                                *note: \"_ALL_\" matches all atoms/n" | 
| 506 | 
< | 
                "   --version                 displays the version number\n" | 
| 507 | 
< | 
                "   --help                    displays this help message.\n" | 
| 504 | 
> | 
                "   --gofr <atom1> <atom2>         g(r) for atom1 and atom2\n" | 
| 505 | 
> | 
                "                                    *note: \"_ALL_\" matches all atoms\n" | 
| 506 | 
> | 
                "   --gofrTheta <atom1> <atom2>    g(r, theta) for atom1 and atom2\n" | 
| 507 | 
> | 
                "                                    *note: \"_ALL_\" matches all atoms\n" | 
| 508 | 
> | 
                "   --gofrOmega <atom1> <atom2>    g(r, omega) for atom1 and atom2\n" | 
| 509 | 
> | 
                "                                    *note: \"_ALL_\" matches all atoms\n" | 
| 510 | 
> | 
                "   --version                      displays the version number\n" | 
| 511 | 
> | 
                "   --help                         displays this help message.\n" | 
| 512 | 
  | 
                 | 
| 513 | 
  | 
                "\n" | 
| 514 | 
  | 
                "\n", |