ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-1.0/libmdtools/SimSetup.cpp
(Generate patch)

Comparing trunk/OOPSE-1.0/libmdtools/SimSetup.cpp (file contents):
Revision 1416 by gezelter, Mon Jul 26 17:50:57 2004 UTC vs.
Revision 1417 by tim, Tue Jul 27 15:41:17 2004 UTC

# Line 1003 | Line 1003 | void SimSetup::gatherInfo(void){
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 .md file.\n");
1007            painCave.isFatal = 1;
1008            simError();    
1009          }
# Line 1012 | Line 1012 | void SimSetup::gatherInfo(void){
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 .md\n"
1016                     "\tfile. To avoid confusion, specify only one technique in\n"
1017 <                   "\tyour .bass file. Liquid-state thermodynamic integration\n"
1017 >                   "\tyour .md 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 .md file.\n");
1021            painCave.isFatal = 0;
1022            simError();
1023          }
# Line 1032 | Line 1032 | void SimSetup::gatherInfo(void){
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 .md file.\n");
1036            painCave.isFatal = 1;
1037            simError();    
1038          }
# Line 1041 | Line 1041 | void SimSetup::gatherInfo(void){
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 .md 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;
# Line 1305 | Line 1305 | void SimSetup::initSystemCoords(void){
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");
# Line 1323 | Line 1323 | void SimSetup::makeOutNames(void){
1323  
1324   void SimSetup::makeOutNames(void){
1325    int k;
1326 <
1326 >  string prefix;
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines