--- trunk/OOPSE/utils/sysbuilder/sysBuild.cpp 2003/08/15 19:24:13 699 +++ trunk/OOPSE/utils/sysbuilder/sysBuild.cpp 2003/08/18 20:59:47 700 @@ -54,7 +54,7 @@ int main( int argc, char* argv[]){ // char* in_name; char* id; - int* hasErrors; + int hasErrors; MakeStamps* the_stamps = NULL; @@ -115,7 +115,7 @@ if(in_name == NULL){ "No input bass file was specified.\n"); painCave.isFatal = 0; simError(); - usage(); + cmdline_parser_print_help(); } if( sysType < 0 ){ @@ -123,7 +123,7 @@ if(in_name == NULL){ "No system type was specified.\n"); painCave.isFatal = 0; simError(); - usage(); + cmdline_parser_print_help(); } @@ -148,6 +148,8 @@ if(in_name == NULL){ bsInfo.targetTemp = the_globals->getTargetTemp(); bsInfo.dt = the_globals->getDt(); bsInfo.runTime = the_globals->getRunTime(); + + std::cerr << "dt = " << bsInfo.dt << "\n"; // get the ones we know are there, yet still may need some work. bsInfo.nComponents = the_globals->getNComponents(); @@ -288,11 +290,19 @@ if(in_name == NULL){ } // get and set the boxSize + + bsInfo.haveBox = false; + std::cerr << "Box setting..."; + + std::cerr <<" haveBox= " << the_globals->haveBox() << "\n"; + if( the_globals->haveBox() ){ bsInfo.boxX = the_globals->getBox(); bsInfo.boxY = the_globals->getBox(); bsInfo.boxZ = the_globals->getBox(); + bsInfo.haveBox = true; + std::cerr<< "box=>yes\n"; } else if( the_globals->haveDensity() ){ @@ -301,40 +311,22 @@ if(in_name == NULL){ bsInfo.boxX = pow( vol, ( 1.0 / 3.0 ) ); bsInfo.boxY = bsInfo.boxX; bsInfo.boxZ = bsInfo.boxY; + bsInfo.haveBox = true; + + std::cerr<< "dens=>yes\n"; } else{ - if( !the_globals->haveBoxX() ){ - sprintf( painCave.errMsg, - "sysBuild error, no periodic BoxX size given.\n" ); - painCave.isFatal = 1; - simError(); - } - bsInfo.boxX = the_globals->getBoxX(); - - if( !the_globals->haveBoxY() ){ - sprintf( painCave.errMsg, - "sysBuild error, no periodic BoxY size given.\n" ); - painCave.isFatal = 1; - simError(); - } - bsInfo.boxY = the_globals->getBoxY(); - - if( !the_globals->haveBoxZ() ){ - sprintf( painCave.errMsg, - "SimSetup error, no periodic BoxZ size given.\n" ); - painCave.isFatal = 1; - simError(); - } - bsInfo.boxZ = the_globals->getBoxZ(); + std::cerr<< "none.\n"; } - //************************************************************ + // ************************************************************ // that should be all we need from bass. now to switch to the // appropriate system builder. // *********************************************************** - - + + nanoBuilder* buildNano; + switch( sysType ){ case BILAYER: @@ -343,10 +335,10 @@ if(in_name == NULL){ case NANOPARTICLE: - // nanoBuilder buildNano(hasErrors); - - // buildNano.buildNanoParticle(); - + buildNano = new nanoBuilder(hasErrors); + + buildNano->buildNanoParticle(); + break; default: @@ -364,7 +356,7 @@ if(in_name == NULL){ if( headStamp!= NULL ) delete headStamp; if( the_stamps != NULL ) delete the_stamps; if( the_globals != NULL ) delete the_globals; - if( the_components != NULL ) delete[] the_components; + // if( the_components != NULL ) delete[] the_components; if( bsInfo.componentsNmol != NULL ) delete[] bsInfo.componentsNmol; if( bsInfo.compStamps != NULL ) delete[] bsInfo.compStamps; @@ -489,7 +481,8 @@ int grabCmdArgs(){ } if (args_info.inputs_num) { //Get input file name - in_name = args_info.inputs[1]; + in_name = args_info.inputs[0]; + cerr << in_name << "\n"; } else { sprintf( painCave.errMsg,