54 |
|
// char* in_name; |
55 |
|
char* id; |
56 |
|
|
57 |
< |
int* hasErrors; |
57 |
> |
int hasErrors; |
58 |
|
|
59 |
|
|
60 |
|
MakeStamps* the_stamps = NULL; |
109 |
|
// Handle command line arguments. |
110 |
|
sysType = grabCmdArgs(); |
111 |
|
|
112 |
< |
// Keep me |
113 |
< |
if(in_name == NULL){ |
112 |
> |
// Keep me |
113 |
> |
if(in_name == NULL){ |
114 |
|
sprintf( painCave.errMsg, |
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 ){ |
123 |
|
"No system type was specified.\n"); |
124 |
|
painCave.isFatal = 0; |
125 |
|
simError(); |
126 |
< |
usage(); |
126 |
> |
cmdline_parser_print_help(); |
127 |
|
} |
128 |
|
|
129 |
|
|
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(); |
156 |
|
strcpy( bsInfo.forceField, the_globals->getForceField() ); |
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 |
|
|
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: |
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: |
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; |
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, |