ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/interface_implementation/LJ_FF.cpp
(Generate patch)

Comparing trunk/mdtools/interface_implementation/LJ_FF.cpp (file contents):
Revision 240 by chuckv, Wed Jan 22 21:45:20 2003 UTC vs.
Revision 248 by chuckv, Mon Jan 27 19:28:21 2003 UTC

# Line 412 | Line 412 | void LJ_FF::initializeAtoms( void ){
412  
413    // initialize the atoms
414    
415 +  double bigSigma = 0.0;
416    Atom* thisAtom;
417  
418    for( i=0; i<nAtoms; i++ ){
# Line 430 | Line 431 | void LJ_FF::initializeAtoms( void ){
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;
# Line 443 | Line 460 | void LJ_FF::initializeAtoms( void ){
460   #endif // is_mpi
461  
462    initFortran();
463 +  entry_plug->refreshSim();
464  
465   }
466  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines