412 |
|
|
413 |
|
// initialize the atoms |
414 |
|
|
415 |
+ |
double bigSigma = 0.0; |
416 |
|
Atom* thisAtom; |
417 |
|
|
418 |
|
for( i=0; i<nAtoms; i++ ){ |
431 |
|
the_atoms[i]->setSigma( currentAtomType->sigma ); |
432 |
|
the_atoms[i]->setIdent( currentAtomType->ident ); |
433 |
|
the_atoms[i]->setLJ(); |
434 |
+ |
|
435 |
+ |
if( bigSigma < currentAtomType->sigma ) bigSigma = currentAtomType->sigma; |
436 |
|
} |
437 |
+ |
|
438 |
+ |
|
439 |
+ |
#ifdef IS_MPI |
440 |
+ |
double tempBig = bigSigma; |
441 |
+ |
MPI::COMM_WORLD::Allreduce( &tempBig, &bigSigma, 1, MPI_DOUBLE, MPI_MAX ); |
442 |
+ |
#endif //is_mpi |
443 |
+ |
|
444 |
+ |
//calc rCut and rList |
445 |
|
|
446 |
+ |
entry_plug->rCut = 2.5 * bigSigma; |
447 |
+ |
if(entry_plug->rCut > (entry_plug->box_x / 2.0)) entry_plug->rCut = entry_plug->box_x / 2.0; |
448 |
+ |
if(entry_plug->rCut > (entry_plug->box_y / 2.0)) entry_plug->rCut = entry_plug->box_y / 2.0; |
449 |
+ |
if(entry_plug->rCut > (entry_plug->box_z / 2.0)) entry_plug->rCut = entry_plug->box_z / 2.0; |
450 |
|
|
451 |
+ |
entry_plug->rList = entry_plug->rCut + 1.0; |
452 |
+ |
|
453 |
|
// clean up the memory |
454 |
|
|
455 |
|
delete headAtomType; |
460 |
|
#endif // is_mpi |
461 |
|
|
462 |
|
initFortran(); |
463 |
+ |
entry_plug->refreshSim(); |
464 |
|
|
465 |
|
} |
466 |
|
|