--- trunk/mdtools/interface_implementation/LJ_FF.cpp 2003/01/22 21:45:20 240 +++ trunk/mdtools/interface_implementation/LJ_FF.cpp 2003/01/27 19:28:21 248 @@ -412,6 +412,7 @@ void LJ_FF::initializeAtoms( void ){ // initialize the atoms + double bigSigma = 0.0; Atom* thisAtom; for( i=0; isetSigma( currentAtomType->sigma ); the_atoms[i]->setIdent( currentAtomType->ident ); the_atoms[i]->setLJ(); + + if( bigSigma < currentAtomType->sigma ) bigSigma = currentAtomType->sigma; } + + +#ifdef IS_MPI + double tempBig = bigSigma; + MPI::COMM_WORLD::Allreduce( &tempBig, &bigSigma, 1, MPI_DOUBLE, MPI_MAX ); +#endif //is_mpi + + //calc rCut and rList + entry_plug->rCut = 2.5 * bigSigma; + if(entry_plug->rCut > (entry_plug->box_x / 2.0)) entry_plug->rCut = entry_plug->box_x / 2.0; + if(entry_plug->rCut > (entry_plug->box_y / 2.0)) entry_plug->rCut = entry_plug->box_y / 2.0; + if(entry_plug->rCut > (entry_plug->box_z / 2.0)) entry_plug->rCut = entry_plug->box_z / 2.0; + entry_plug->rList = entry_plug->rCut + 1.0; + // clean up the memory delete headAtomType; @@ -443,6 +460,7 @@ void LJ_FF::initializeAtoms( void ){ #endif // is_mpi initFortran(); + entry_plug->refreshSim(); }