--- trunk/OOPSE-1.0/libmdtools/SimSetup.cpp 2004/07/26 17:50:57 1415 +++ trunk/OOPSE-1.0/libmdtools/SimSetup.cpp 2004/07/27 15:41:17 1417 @@ -1003,7 +1003,7 @@ void SimSetup::gatherInfo(void){ "\tKeyword useSolidThermInt was set to 'true' but\n" "\tthermodynamicIntegrationLambda (and/or\n" "\tthermodynamicIntegrationK) was not specified.\n" - "\tPlease provide a lambda value and k value in your .bass file.\n"); + "\tPlease provide a lambda value and k value in your .md file.\n"); painCave.isFatal = 1; simError(); } @@ -1012,12 +1012,12 @@ void SimSetup::gatherInfo(void){ if (globals->getUseSolidThermInt()) { sprintf( painCave.errMsg, "SimSetup Warning: It appears that you have both solid and\n" - "\tliquid thermodynamic integration activated in your .bass\n" + "\tliquid thermodynamic integration activated in your .md\n" "\tfile. To avoid confusion, specify only one technique in\n" - "\tyour .bass file. Liquid-state thermodynamic integration\n" + "\tyour .md file. Liquid-state thermodynamic integration\n" "\twill be assumed for the current simulation. If this is not\n" "\twhat you desire, set useSolidThermInt to 'true' and\n" - "\tuseLiquidThermInt to 'false' in your .bass file.\n"); + "\tuseLiquidThermInt to 'false' in your .md file.\n"); painCave.isFatal = 0; simError(); } @@ -1032,7 +1032,7 @@ void SimSetup::gatherInfo(void){ "\tKeyword useLiquidThermInt was set to 'true' but\n" "\tthermodynamicIntegrationLambda (and/or\n" "\tthermodynamicIntegrationK) was not specified.\n" - "\tPlease provide a lambda value and k value in your .bass file.\n"); + "\tPlease provide a lambda value and k value in your .md file.\n"); painCave.isFatal = 1; simError(); } @@ -1041,7 +1041,7 @@ void SimSetup::gatherInfo(void){ sprintf(painCave.errMsg, "SimSetup Warning: If you want to use Thermodynamic\n" "\tIntegration, set useSolidThermInt or useLiquidThermInt to\n" - "\t'true' in your .bass file. These keywords are set to\n" + "\t'true' in your .md file. These keywords are set to\n" "\t'false' by default, so your lambda and/or k values are\n" "\tbeing ignored.\n"); painCave.isFatal = 0; @@ -1305,7 +1305,7 @@ void SimSetup::initSystemCoords(void){ } else{ - // no init from bass + // no init from md file sprintf(painCave.errMsg, "Cannot intialize a simulation without an initial configuration file.\n"); @@ -1323,109 +1323,21 @@ void SimSetup::makeOutNames(void){ void SimSetup::makeOutNames(void){ int k; - + string prefix; for (k = 0; k < nInfo; k++){ #ifdef IS_MPI if (worldRank == 0){ #endif // is_mpi - - if (globals->haveFinalConfig()){ - strcpy(info[k].finalName, globals->getFinalConfig()); - } - else{ - strcpy(info[k].finalName, inFileName); - char* endTest; - int nameLength = strlen(info[k].finalName); - endTest = &(info[k].finalName[nameLength - 5]); - if (!strcmp(endTest, ".bass")){ - strcpy(endTest, ".eor"); - } - else if (!strcmp(endTest, ".BASS")){ - strcpy(endTest, ".eor"); - } - else{ - endTest = &(info[k].finalName[nameLength - 4]); - if (!strcmp(endTest, ".bss")){ - strcpy(endTest, ".eor"); - } - else if (!strcmp(endTest, ".mdl")){ - strcpy(endTest, ".eor"); - } - else{ - strcat(info[k].finalName, ".eor"); - } - } - } + + if(globals->haveFinalConfig()) + prefix = getPrefix(globals->getFinalConfig()); + else + prefix = getPrefix(info[k].finalName); - // make the sample and status out names - - strcpy(info[k].sampleName, inFileName); - char* endTest; - int nameLength = strlen(info[k].sampleName); - endTest = &(info[k].sampleName[nameLength - 5]); - if (!strcmp(endTest, ".bass")){ - strcpy(endTest, ".dump"); - } - else if (!strcmp(endTest, ".BASS")){ - strcpy(endTest, ".dump"); - } - else{ - endTest = &(info[k].sampleName[nameLength - 4]); - if (!strcmp(endTest, ".bss")){ - strcpy(endTest, ".dump"); - } - else if (!strcmp(endTest, ".mdl")){ - strcpy(endTest, ".dump"); - } - else{ - strcat(info[k].sampleName, ".dump"); - } - } - - strcpy(info[k].statusName, inFileName); - nameLength = strlen(info[k].statusName); - endTest = &(info[k].statusName[nameLength - 5]); - if (!strcmp(endTest, ".bass")){ - strcpy(endTest, ".stat"); - } - else if (!strcmp(endTest, ".BASS")){ - strcpy(endTest, ".stat"); - } - else{ - endTest = &(info[k].statusName[nameLength - 4]); - if (!strcmp(endTest, ".bss")){ - strcpy(endTest, ".stat"); - } - else if (!strcmp(endTest, ".mdl")){ - strcpy(endTest, ".stat"); - } - else{ - strcat(info[k].statusName, ".stat"); - } - } - - strcpy(info[k].rawPotName, inFileName); - nameLength = strlen(info[k].rawPotName); - endTest = &(info[k].rawPotName[nameLength - 5]); - if (!strcmp(endTest, ".bass")){ - strcpy(endTest, ".raw"); - } - else if (!strcmp(endTest, ".BASS")){ - strcpy(endTest, ".raw"); - } - else{ - endTest = &(info[k].rawPotName[nameLength - 4]); - if (!strcmp(endTest, ".bss")){ - strcpy(endTest, ".raw"); - } - else if (!strcmp(endTest, ".mdl")){ - strcpy(endTest, ".raw"); - } - else{ - strcat(info[k].rawPotName, ".raw"); - } - } + info[k].finalName = prefix + ".eor"; + info[k].sampleName = prefix + ".dump"; + info[k].statusName = prefix + ".stat"; #ifdef IS_MPI