ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/utils/sysbuilder/sysBuild.cpp
(Generate patch)

Comparing trunk/OOPSE/utils/sysbuilder/sysBuild.cpp (file contents):
Revision 678 by chuckv, Mon Aug 11 22:12:31 2003 UTC vs.
Revision 700 by chuckv, Mon Aug 18 20:59:47 2003 UTC

# Line 54 | Line 54 | int main( int argc, char* argv[]){
54    //  char* in_name;
55    char* id;
56  
57 <  int* hasErrors;
57 >  int hasErrors;
58  
59  
60    MakeStamps* the_stamps = NULL;
# Line 115 | Line 115 | if(in_name == NULL){
115               "No input bass file was specified.\n");
116      painCave.isFatal = 0;
117      simError();    
118 <    usage();
118 >    cmdline_parser_print_help();
119    }
120  
121    if( sysType < 0 ){
# Line 123 | Line 123 | if(in_name == NULL){
123               "No system type was specified.\n");
124      painCave.isFatal = 0;
125      simError();    
126 <    usage();
126 >    cmdline_parser_print_help();
127    }
128    
129    
# Line 148 | Line 148 | if(in_name == NULL){
148    bsInfo.targetTemp = the_globals->getTargetTemp();
149    bsInfo.dt = the_globals->getDt();
150    bsInfo.runTime = the_globals->getRunTime();
151 +
152 +  std::cerr << "dt = " << bsInfo.dt << "\n";
153  
154    // get the ones we know are there, yet still may need some work.
155    bsInfo.nComponents = the_globals->getNComponents();
# Line 288 | Line 290 | if(in_name == NULL){
290    }
291  
292    // get and set the boxSize
293 +  
294 +  bsInfo.haveBox = false;
295  
296 +  std::cerr << "Box setting...";
297 +
298 +  std::cerr <<" haveBox= " << the_globals->haveBox() << "\n";
299 +
300    if( the_globals->haveBox() ){
301      bsInfo.boxX = the_globals->getBox();
302      bsInfo.boxY = the_globals->getBox();
303      bsInfo.boxZ = the_globals->getBox();
304 +    bsInfo.haveBox = true;
305 +    std::cerr<< "box=>yes\n";
306    }
307    else if( the_globals->haveDensity() ){
308  
# Line 301 | Line 311 | if(in_name == NULL){
311      bsInfo.boxX = pow( vol, ( 1.0 / 3.0 ) );
312      bsInfo.boxY = bsInfo.boxX;
313      bsInfo.boxZ = bsInfo.boxY;
314 +    bsInfo.haveBox = true;
315 +
316 +    std::cerr<< "dens=>yes\n";
317    }
318    else{
319 <    if( !the_globals->haveBoxX() ){
307 <      sprintf( painCave.errMsg,
308 <               "sysBuild error, no periodic BoxX size given.\n" );
309 <      painCave.isFatal = 1;
310 <      simError();
311 <    }
312 <    bsInfo.boxX = the_globals->getBoxX();
313 <
314 <    if( !the_globals->haveBoxY() ){
315 <      sprintf( painCave.errMsg,
316 <               "sysBuild error, no periodic BoxY size given.\n" );
317 <      painCave.isFatal = 1;
318 <      simError();
319 <    }
320 <    bsInfo.boxY = the_globals->getBoxY();
321 <
322 <    if( !the_globals->haveBoxZ() ){
323 <      sprintf( painCave.errMsg,
324 <               "SimSetup error, no periodic BoxZ size given.\n" );
325 <      painCave.isFatal = 1;
326 <      simError();
327 <    }
328 <    bsInfo.boxZ = the_globals->getBoxZ();
319 >    std::cerr<< "none.\n";
320    }
321    
322  
323 <  //************************************************************
323 >  // ************************************************************
324    // that should be all we need from bass. now to switch to the
325    // appropriate system builder.
326    // ***********************************************************
327 <
328 <
327 >  
328 >  nanoBuilder* buildNano;
329 >                                
330    switch( sysType ){
331      
332    case BILAYER:
# Line 343 | Line 335 | if(in_name == NULL){
335  
336    case NANOPARTICLE:
337  
338 <    //    nanoBuilder buildNano(hasErrors);
339 <
340 <    // buildNano.buildNanoParticle();
341 <
338 >    buildNano = new nanoBuilder(hasErrors);
339 >    
340 >    buildNano->buildNanoParticle();
341 >    
342      break;
343  
344    default:
# Line 364 | Line 356 | if(in_name == NULL){
356    if( headStamp!= NULL )       delete headStamp;
357    if( the_stamps != NULL )     delete the_stamps;
358    if( the_globals != NULL )    delete the_globals;
359 <  if( the_components != NULL ) delete[] the_components;
359 >  //  if( the_components != NULL ) delete[] the_components;
360    
361    if( bsInfo.componentsNmol != NULL ) delete[] bsInfo.componentsNmol;
362    if( bsInfo.compStamps != NULL )     delete[] bsInfo.compStamps;
# Line 489 | Line 481 | int grabCmdArgs(){
481    }
482  
483    if (args_info.inputs_num) {  //Get input file name
484 <    in_name = args_info.inputs[1];
484 >    in_name = args_info.inputs[0];
485 >    cerr << in_name << "\n";
486        }
487    else {
488          sprintf( painCave.errMsg,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines