| 122 | 
  | 
 | 
| 123 | 
  | 
void SimSetup::createSim(void){ | 
| 124 | 
  | 
 | 
| 125 | 
< | 
  // gather all of the information from the Bass file | 
| 125 | 
> | 
  // gather all of the information from the meta-data file | 
| 126 | 
  | 
 | 
| 127 | 
  | 
  gatherInfo(); | 
| 128 | 
  | 
 | 
| 646 | 
  | 
 | 
| 647 | 
  | 
} | 
| 648 | 
  | 
 | 
| 649 | 
< | 
void SimSetup::initFromBass(void){ | 
| 649 | 
> | 
void SimSetup::initFromMetaDataFile(void){ | 
| 650 | 
  | 
  int i, j, k; | 
| 651 | 
  | 
  int n_cells; | 
| 652 | 
  | 
  double cellx, celly, cellz; | 
| 769 | 
  | 
    current_atom = comp_stamps[current_comp]->getAtom(k); | 
| 770 | 
  | 
    if (!current_atom->havePosition()){ | 
| 771 | 
  | 
      sprintf(painCave.errMsg, | 
| 772 | 
< | 
              "SimSetup:initFromBass error.\n" | 
| 772 | 
> | 
              "SimSetup:initFromMetaData error.\n" | 
| 773 | 
  | 
              "\tComponent %s, atom %s does not have a position specified.\n" | 
| 774 | 
  | 
              "\tThe initialization routine is unable to give a start" | 
| 775 | 
  | 
              " position.\n", | 
| 1003 | 
  | 
                  "\tKeyword useSolidThermInt was set to 'true' but\n" | 
| 1004 | 
  | 
                  "\tthermodynamicIntegrationLambda (and/or\n" | 
| 1005 | 
  | 
                  "\tthermodynamicIntegrationK) was not specified.\n" | 
| 1006 | 
< | 
                  "\tPlease provide a lambda value and k value in your .bass file.\n"); | 
| 1006 | 
> | 
                  "\tPlease provide a lambda value and k value in your meta-data file.\n"); | 
| 1007 | 
  | 
          painCave.isFatal = 1; | 
| 1008 | 
  | 
          simError();     | 
| 1009 | 
  | 
        } | 
| 1012 | 
  | 
        if (globals->getUseSolidThermInt()) { | 
| 1013 | 
  | 
          sprintf( painCave.errMsg, | 
| 1014 | 
  | 
                   "SimSetup Warning: It appears that you have both solid and\n" | 
| 1015 | 
< | 
                   "\tliquid thermodynamic integration activated in your .bass\n" | 
| 1015 | 
> | 
                   "\tliquid thermodynamic integration activated in your meta-data\n" | 
| 1016 | 
  | 
                   "\tfile. To avoid confusion, specify only one technique in\n" | 
| 1017 | 
< | 
                   "\tyour .bass file. Liquid-state thermodynamic integration\n" | 
| 1017 | 
> | 
                   "\tyour meta-data file. Liquid-state thermodynamic integration\n" | 
| 1018 | 
  | 
                   "\twill be assumed for the current simulation. If this is not\n" | 
| 1019 | 
  | 
                   "\twhat you desire, set useSolidThermInt to 'true' and\n" | 
| 1020 | 
< | 
                   "\tuseLiquidThermInt to 'false' in your .bass file.\n"); | 
| 1020 | 
> | 
                   "\tuseLiquidThermInt to 'false' in your meta-data file.\n"); | 
| 1021 | 
  | 
          painCave.isFatal = 0; | 
| 1022 | 
  | 
          simError(); | 
| 1023 | 
  | 
        } | 
| 1032 | 
  | 
                  "\tKeyword useLiquidThermInt was set to 'true' but\n" | 
| 1033 | 
  | 
                  "\tthermodynamicIntegrationLambda (and/or\n" | 
| 1034 | 
  | 
                  "\tthermodynamicIntegrationK) was not specified.\n" | 
| 1035 | 
< | 
                  "\tPlease provide a lambda value and k value in your .bass file.\n"); | 
| 1035 | 
> | 
                  "\tPlease provide a lambda value and k value in your meta-data file.\n"); | 
| 1036 | 
  | 
          painCave.isFatal = 1; | 
| 1037 | 
  | 
          simError();     | 
| 1038 | 
  | 
        } | 
| 1041 | 
  | 
        sprintf(painCave.errMsg, | 
| 1042 | 
  | 
                "SimSetup Warning: If you want to use Thermodynamic\n" | 
| 1043 | 
  | 
                "\tIntegration, set useSolidThermInt or useLiquidThermInt to\n" | 
| 1044 | 
< | 
                "\t'true' in your .bass file.  These keywords are set to\n" | 
| 1044 | 
> | 
                "\t'true' in your meta-data file.  These keywords are set to\n" | 
| 1045 | 
  | 
                "\t'false' by default, so your lambda and/or k values are\n" | 
| 1046 | 
  | 
                "\tbeing ignored.\n"); | 
| 1047 | 
  | 
        painCave.isFatal = 0; | 
| 1136 | 
  | 
  } | 
| 1137 | 
  | 
   | 
| 1138 | 
  | 
#ifdef IS_MPI | 
| 1139 | 
< | 
  strcpy(checkPointMsg, "Successfully gathered all information from Bass\n"); | 
| 1139 | 
> | 
  strcpy(checkPointMsg, "Successfully gathered all information from meta-data file\n"); | 
| 1140 | 
  | 
  MPIcheckPoint(); | 
| 1141 | 
  | 
#endif // is_mpi | 
| 1142 | 
  | 
} | 
| 1305 | 
  | 
  } | 
| 1306 | 
  | 
  else{ | 
| 1307 | 
  | 
     | 
| 1308 | 
< | 
    // no init from bass | 
| 1308 | 
> | 
    // no init from md file  | 
| 1309 | 
  | 
     | 
| 1310 | 
  | 
    sprintf(painCave.errMsg, | 
| 1311 | 
  | 
            "Cannot intialize a simulation without an initial configuration file.\n"); | 
| 1323 | 
  | 
 | 
| 1324 | 
  | 
void SimSetup::makeOutNames(void){ | 
| 1325 | 
  | 
  int k; | 
| 1326 | 
+ | 
  string prefix; | 
| 1327 | 
  | 
 | 
| 1327 | 
– | 
 | 
| 1328 | 
  | 
  for (k = 0; k < nInfo; k++){ | 
| 1329 | 
  | 
#ifdef IS_MPI | 
| 1330 | 
  | 
    if (worldRank == 0){ | 
| 1331 | 
  | 
#endif // is_mpi | 
| 1332 | 
< | 
 | 
| 1333 | 
< | 
      if (globals->haveFinalConfig()){ | 
| 1334 | 
< | 
        strcpy(info[k].finalName, globals->getFinalConfig()); | 
| 1335 | 
< | 
      } | 
| 1336 | 
< | 
      else{ | 
| 1337 | 
< | 
        strcpy(info[k].finalName, inFileName); | 
| 1338 | 
< | 
        char* endTest; | 
| 1339 | 
< | 
        int nameLength = strlen(info[k].finalName); | 
| 1340 | 
< | 
        endTest = &(info[k].finalName[nameLength - 5]); | 
| 1341 | 
< | 
        if (!strcmp(endTest, ".bass")){ | 
| 1342 | 
< | 
          strcpy(endTest, ".eor"); | 
| 1343 | 
< | 
        } | 
| 1344 | 
< | 
        else if (!strcmp(endTest, ".BASS")){ | 
| 1345 | 
< | 
          strcpy(endTest, ".eor"); | 
| 1346 | 
< | 
        } | 
| 1347 | 
< | 
        else{ | 
| 1348 | 
< | 
          endTest = &(info[k].finalName[nameLength - 4]); | 
| 1349 | 
< | 
          if (!strcmp(endTest, ".bss")){ | 
| 1350 | 
< | 
            strcpy(endTest, ".eor"); | 
| 1351 | 
< | 
          } | 
| 1352 | 
< | 
          else if (!strcmp(endTest, ".mdl")){ | 
| 1353 | 
< | 
            strcpy(endTest, ".eor"); | 
| 1354 | 
< | 
          } | 
| 1355 | 
< | 
          else{ | 
| 1356 | 
< | 
            strcat(info[k].finalName, ".eor"); | 
| 1357 | 
< | 
          } | 
| 1358 | 
< | 
        } | 
| 1359 | 
< | 
      } | 
| 1332 | 
> | 
       | 
| 1333 | 
> | 
      if(globals->haveFinalConfig()) | 
| 1334 | 
> | 
        prefix = getPrefix(globals->getFinalConfig());    | 
| 1335 | 
> | 
      else | 
| 1336 | 
> | 
        prefix = getPrefix(info[k].finalName); | 
| 1337 | 
  | 
 | 
| 1338 | 
< | 
      // make the sample and status out names | 
| 1339 | 
< | 
 | 
| 1340 | 
< | 
      strcpy(info[k].sampleName, inFileName); | 
| 1364 | 
< | 
      char* endTest; | 
| 1365 | 
< | 
      int nameLength = strlen(info[k].sampleName); | 
| 1366 | 
< | 
      endTest = &(info[k].sampleName[nameLength - 5]); | 
| 1367 | 
< | 
      if (!strcmp(endTest, ".bass")){ | 
| 1368 | 
< | 
        strcpy(endTest, ".dump"); | 
| 1369 | 
< | 
      } | 
| 1370 | 
< | 
      else if (!strcmp(endTest, ".BASS")){ | 
| 1371 | 
< | 
        strcpy(endTest, ".dump"); | 
| 1372 | 
< | 
      } | 
| 1373 | 
< | 
      else{ | 
| 1374 | 
< | 
        endTest = &(info[k].sampleName[nameLength - 4]); | 
| 1375 | 
< | 
        if (!strcmp(endTest, ".bss")){ | 
| 1376 | 
< | 
          strcpy(endTest, ".dump"); | 
| 1377 | 
< | 
        } | 
| 1378 | 
< | 
        else if (!strcmp(endTest, ".mdl")){ | 
| 1379 | 
< | 
          strcpy(endTest, ".dump"); | 
| 1380 | 
< | 
        } | 
| 1381 | 
< | 
        else{ | 
| 1382 | 
< | 
          strcat(info[k].sampleName, ".dump"); | 
| 1383 | 
< | 
        } | 
| 1384 | 
< | 
      } | 
| 1385 | 
< | 
 | 
| 1386 | 
< | 
      strcpy(info[k].statusName, inFileName); | 
| 1387 | 
< | 
      nameLength = strlen(info[k].statusName); | 
| 1388 | 
< | 
      endTest = &(info[k].statusName[nameLength - 5]); | 
| 1389 | 
< | 
      if (!strcmp(endTest, ".bass")){ | 
| 1390 | 
< | 
        strcpy(endTest, ".stat"); | 
| 1391 | 
< | 
      } | 
| 1392 | 
< | 
      else if (!strcmp(endTest, ".BASS")){ | 
| 1393 | 
< | 
        strcpy(endTest, ".stat"); | 
| 1394 | 
< | 
      } | 
| 1395 | 
< | 
      else{ | 
| 1396 | 
< | 
        endTest = &(info[k].statusName[nameLength - 4]); | 
| 1397 | 
< | 
        if (!strcmp(endTest, ".bss")){ | 
| 1398 | 
< | 
          strcpy(endTest, ".stat"); | 
| 1399 | 
< | 
        } | 
| 1400 | 
< | 
        else if (!strcmp(endTest, ".mdl")){ | 
| 1401 | 
< | 
          strcpy(endTest, ".stat"); | 
| 1402 | 
< | 
        } | 
| 1403 | 
< | 
        else{ | 
| 1404 | 
< | 
          strcat(info[k].statusName, ".stat"); | 
| 1405 | 
< | 
        } | 
| 1406 | 
< | 
      } | 
| 1407 | 
< | 
 | 
| 1408 | 
< | 
      strcpy(info[k].rawPotName, inFileName); | 
| 1409 | 
< | 
      nameLength = strlen(info[k].rawPotName); | 
| 1410 | 
< | 
      endTest = &(info[k].rawPotName[nameLength - 5]); | 
| 1411 | 
< | 
      if (!strcmp(endTest, ".bass")){ | 
| 1412 | 
< | 
        strcpy(endTest, ".raw"); | 
| 1413 | 
< | 
      } | 
| 1414 | 
< | 
      else if (!strcmp(endTest, ".BASS")){ | 
| 1415 | 
< | 
        strcpy(endTest, ".raw"); | 
| 1416 | 
< | 
      } | 
| 1417 | 
< | 
      else{ | 
| 1418 | 
< | 
        endTest = &(info[k].rawPotName[nameLength - 4]); | 
| 1419 | 
< | 
        if (!strcmp(endTest, ".bss")){ | 
| 1420 | 
< | 
          strcpy(endTest, ".raw"); | 
| 1421 | 
< | 
        } | 
| 1422 | 
< | 
        else if (!strcmp(endTest, ".mdl")){ | 
| 1423 | 
< | 
          strcpy(endTest, ".raw"); | 
| 1424 | 
< | 
        } | 
| 1425 | 
< | 
        else{ | 
| 1426 | 
< | 
          strcat(info[k].rawPotName, ".raw"); | 
| 1427 | 
< | 
        } | 
| 1428 | 
< | 
      } | 
| 1338 | 
> | 
      info[k].finalName = prefix + ".eor";       | 
| 1339 | 
> | 
      info[k].sampleName = prefix + ".dump"; | 
| 1340 | 
> | 
      info[k].statusName = prefix + ".stat"; | 
| 1341 | 
  | 
 | 
| 1342 | 
  | 
#ifdef IS_MPI | 
| 1343 | 
  | 
 | 
| 1765 | 
  | 
        else{ | 
| 1766 | 
  | 
          sprintf(painCave.errMsg, | 
| 1767 | 
  | 
                  "SimSetup error: If you use a constant pressure\n" | 
| 1768 | 
< | 
                  "\tensemble, you must set targetPressure in the BASS file.\n"); | 
| 1768 | 
> | 
                  "\tensemble, you must set targetPressure in the meta-data file.\n"); | 
| 1769 | 
  | 
          painCave.isFatal = 1; | 
| 1770 | 
  | 
          simError(); | 
| 1771 | 
  | 
        } | 
| 1816 | 
  | 
        else{ | 
| 1817 | 
  | 
          sprintf(painCave.errMsg, | 
| 1818 | 
  | 
                  "SimSetup error: If you use a constant pressure\n" | 
| 1819 | 
< | 
                  "\tensemble, you must set targetPressure in the BASS file.\n"); | 
| 1819 | 
> | 
                  "\tensemble, you must set targetPressure in the meta-data file.\n"); | 
| 1820 | 
  | 
          painCave.isFatal = 1; | 
| 1821 | 
  | 
          simError(); | 
| 1822 | 
  | 
        }     | 
| 1869 | 
  | 
        else{ | 
| 1870 | 
  | 
          sprintf(painCave.errMsg, | 
| 1871 | 
  | 
                  "SimSetup error: If you use a constant pressure\n" | 
| 1872 | 
< | 
                  "\tensemble, you must set targetPressure in the BASS file.\n"); | 
| 1872 | 
> | 
                  "\tensemble, you must set targetPressure in the meta-data file.\n"); | 
| 1873 | 
  | 
          painCave.isFatal = 1; | 
| 1874 | 
  | 
          simError(); | 
| 1875 | 
  | 
        }     |