179 |
|
|
180 |
|
// create the atom and short range interaction arrays |
181 |
|
|
182 |
– |
the_atoms = new Atom*[tot_atoms]; |
182 |
|
Atom::createArrays(tot_atoms); |
183 |
+ |
the_atoms = new Atom*[tot_atoms]; |
184 |
|
the_molecules = new Molecule[tot_nmol]; |
185 |
|
|
186 |
|
|
280 |
|
// else{ |
281 |
|
|
282 |
|
initFromBass(); |
283 |
– |
|
284 |
– |
|
285 |
– |
// } |
283 |
|
|
287 |
– |
// if( the_globals->haveFinalConfig() ){ |
288 |
– |
// strcpy( simnfo->finalName, the_globals->getFinalConfig() ); |
289 |
– |
// } |
290 |
– |
// else{ |
291 |
– |
// strcpy( simnfo->finalName, inFileName ); |
292 |
– |
// char* endTest; |
293 |
– |
// int nameLength = strlen( simnfo->finalName ); |
294 |
– |
// endTest = &(simnfo->finalName[nameLength - 5]); |
295 |
– |
// if( !strcmp( endTest, ".bass" ) ){ |
296 |
– |
// strcpy( endTest, ".eor" ); |
297 |
– |
// } |
298 |
– |
// else if( !strcmp( endTest, ".BASS" ) ){ |
299 |
– |
// strcpy( endTest, ".eor" ); |
300 |
– |
// } |
301 |
– |
// else{ |
302 |
– |
// endTest = &(simnfo->finalName[nameLength - 4]); |
303 |
– |
// if( !strcmp( endTest, ".bss" ) ){ |
304 |
– |
// strcpy( endTest, ".eor" ); |
305 |
– |
// } |
306 |
– |
// else if( !strcmp( endTest, ".mdl" ) ){ |
307 |
– |
// strcpy( endTest, ".eor" ); |
308 |
– |
// } |
309 |
– |
// else{ |
310 |
– |
// strcat( simnfo->finalName, ".eor" ); |
311 |
– |
// } |
312 |
– |
// } |
313 |
– |
// } |
314 |
– |
|
315 |
– |
// // make the sample and status out names |
316 |
– |
|
317 |
– |
// strcpy( simnfo->sampleName, inFileName ); |
318 |
– |
// char* endTest; |
319 |
– |
// int nameLength = strlen( simnfo->sampleName ); |
320 |
– |
// endTest = &(simnfo->sampleName[nameLength - 5]); |
321 |
– |
// if( !strcmp( endTest, ".bass" ) ){ |
322 |
– |
// strcpy( endTest, ".dump" ); |
323 |
– |
// } |
324 |
– |
// else if( !strcmp( endTest, ".BASS" ) ){ |
325 |
– |
// strcpy( endTest, ".dump" ); |
326 |
– |
// } |
327 |
– |
// else{ |
328 |
– |
// endTest = &(simnfo->sampleName[nameLength - 4]); |
329 |
– |
// if( !strcmp( endTest, ".bss" ) ){ |
330 |
– |
// strcpy( endTest, ".dump" ); |
331 |
– |
// } |
332 |
– |
// else if( !strcmp( endTest, ".mdl" ) ){ |
333 |
– |
// strcpy( endTest, ".dump" ); |
334 |
– |
// } |
335 |
– |
// else{ |
336 |
– |
// strcat( simnfo->sampleName, ".dump" ); |
337 |
– |
// } |
338 |
– |
// } |
284 |
|
|
340 |
– |
// strcpy( simnfo->statusName, inFileName ); |
341 |
– |
// nameLength = strlen( simnfo->statusName ); |
342 |
– |
// endTest = &(simnfo->statusName[nameLength - 5]); |
343 |
– |
// if( !strcmp( endTest, ".bass" ) ){ |
344 |
– |
// strcpy( endTest, ".stat" ); |
285 |
|
// } |
346 |
– |
// else if( !strcmp( endTest, ".BASS" ) ){ |
347 |
– |
// strcpy( endTest, ".stat" ); |
348 |
– |
// } |
349 |
– |
// else{ |
350 |
– |
// endTest = &(simnfo->statusName[nameLength - 4]); |
351 |
– |
// if( !strcmp( endTest, ".bss" ) ){ |
352 |
– |
// strcpy( endTest, ".stat" ); |
353 |
– |
// } |
354 |
– |
// else if( !strcmp( endTest, ".mdl" ) ){ |
355 |
– |
// strcpy( endTest, ".stat" ); |
356 |
– |
// } |
357 |
– |
// else{ |
358 |
– |
// strcat( simnfo->statusName, ".stat" ); |
359 |
– |
// } |
360 |
– |
// } |
286 |
|
|
287 |
+ |
#ifdef IS_MPI |
288 |
+ |
if( worldRank == TESTWRITE ){ |
289 |
+ |
#endif // is_mpi |
290 |
+ |
|
291 |
+ |
fprintf( stderr, |
292 |
+ |
"infile name is \"%s\"\n", |
293 |
+ |
inFileName ); |
294 |
+ |
|
295 |
+ |
inFileName = "./butane.bass"; |
296 |
+ |
|
297 |
+ |
if( the_globals->haveFinalConfig() ){ |
298 |
+ |
strcpy( simnfo->finalName, the_globals->getFinalConfig() ); |
299 |
+ |
} |
300 |
+ |
else{ |
301 |
+ |
strcpy( simnfo->finalName, inFileName ); |
302 |
+ |
char* endTest; |
303 |
+ |
int nameLength = strlen( simnfo->finalName ); |
304 |
+ |
endTest = &(simnfo->finalName[nameLength - 5]); |
305 |
+ |
if( !strcmp( endTest, ".bass" ) ){ |
306 |
+ |
strcpy( endTest, ".eor" ); |
307 |
+ |
} |
308 |
+ |
else if( !strcmp( endTest, ".BASS" ) ){ |
309 |
+ |
strcpy( endTest, ".eor" ); |
310 |
+ |
} |
311 |
+ |
else{ |
312 |
+ |
endTest = &(simnfo->finalName[nameLength - 4]); |
313 |
+ |
if( !strcmp( endTest, ".bss" ) ){ |
314 |
+ |
strcpy( endTest, ".eor" ); |
315 |
+ |
} |
316 |
+ |
else if( !strcmp( endTest, ".mdl" ) ){ |
317 |
+ |
strcpy( endTest, ".eor" ); |
318 |
+ |
} |
319 |
+ |
else{ |
320 |
+ |
strcat( simnfo->finalName, ".eor" ); |
321 |
+ |
} |
322 |
+ |
} |
323 |
+ |
} |
324 |
+ |
|
325 |
+ |
// make the sample and status out names |
326 |
+ |
|
327 |
+ |
strcpy( simnfo->sampleName, inFileName ); |
328 |
+ |
char* endTest; |
329 |
+ |
int nameLength = strlen( simnfo->sampleName ); |
330 |
+ |
endTest = &(simnfo->sampleName[nameLength - 5]); |
331 |
+ |
if( !strcmp( endTest, ".bass" ) ){ |
332 |
+ |
strcpy( endTest, ".dump" ); |
333 |
+ |
} |
334 |
+ |
else if( !strcmp( endTest, ".BASS" ) ){ |
335 |
+ |
strcpy( endTest, ".dump" ); |
336 |
+ |
} |
337 |
+ |
else{ |
338 |
+ |
endTest = &(simnfo->sampleName[nameLength - 4]); |
339 |
+ |
if( !strcmp( endTest, ".bss" ) ){ |
340 |
+ |
strcpy( endTest, ".dump" ); |
341 |
+ |
} |
342 |
+ |
else if( !strcmp( endTest, ".mdl" ) ){ |
343 |
+ |
strcpy( endTest, ".dump" ); |
344 |
+ |
} |
345 |
+ |
else{ |
346 |
+ |
strcat( simnfo->sampleName, ".dump" ); |
347 |
+ |
} |
348 |
+ |
} |
349 |
+ |
|
350 |
+ |
strcpy( simnfo->statusName, inFileName ); |
351 |
+ |
nameLength = strlen( simnfo->statusName ); |
352 |
+ |
endTest = &(simnfo->statusName[nameLength - 5]); |
353 |
+ |
if( !strcmp( endTest, ".bass" ) ){ |
354 |
+ |
strcpy( endTest, ".stat" ); |
355 |
+ |
} |
356 |
+ |
else if( !strcmp( endTest, ".BASS" ) ){ |
357 |
+ |
strcpy( endTest, ".stat" ); |
358 |
+ |
} |
359 |
+ |
else{ |
360 |
+ |
endTest = &(simnfo->statusName[nameLength - 4]); |
361 |
+ |
if( !strcmp( endTest, ".bss" ) ){ |
362 |
+ |
strcpy( endTest, ".stat" ); |
363 |
+ |
} |
364 |
+ |
else if( !strcmp( endTest, ".mdl" ) ){ |
365 |
+ |
strcpy( endTest, ".stat" ); |
366 |
+ |
} |
367 |
+ |
else{ |
368 |
+ |
strcat( simnfo->statusName, ".stat" ); |
369 |
+ |
} |
370 |
+ |
} |
371 |
+ |
|
372 |
+ |
#ifdef IS_MPI |
373 |
+ |
} |
374 |
+ |
#endif // is_mpi |
375 |
|
|
376 |
|
// set the status, sample, and themal kick times |
377 |
|
|