--- trunk/OOPSE/libmdtools/SimSetup.cpp 2003/03/27 22:16:27 431 +++ trunk/OOPSE/libmdtools/SimSetup.cpp 2003/03/28 19:33:37 435 @@ -240,8 +240,6 @@ void SimSetup::createSim( void ){ globalIndex = mpiSim->divideLabor(); - - // set up the local variables int localMol, allMol; @@ -659,11 +657,14 @@ void SimSetup::createSim( void ){ if( !strcmp( force_field, "TraPPE_Ex" ) ) new Symplectic( simnfo, the_ff ); if( !strcmp( force_field, "LJ" ) ) new Verlet( *simnfo, the_ff ); - +#ifdef IS_MPI + mpiSim->mpiRefresh(); +#endif // initialize the Fortran - + + simnfo->refreshSim(); if( !strcmp( simnfo->mixingRule, "standard") ){ @@ -782,8 +783,8 @@ void SimSetup::makeMolecules( void ){ theBonds[j].a = currentBond->getA() + atomOffset; theBonds[j].b = currentBond->getB() + atomOffset; - exI = theBonds[i].a; - exJ = theBonds[i].b; + exI = theBonds[j].a; + exJ = theBonds[j].b; // exclude_I must always be the smaller of the pair if( exI > exJ ){ @@ -799,6 +800,7 @@ void SimSetup::makeMolecules( void ){ the_excludes[j+excludeOffset]->setPair( exI, exJ ); #else // isn't MPI + the_excludes[j+excludeOffset]->setPair( (exI+1), (exJ+1) ); #endif //is_mpi } @@ -836,7 +838,7 @@ void SimSetup::makeMolecules( void ){ default: sprintf( painCave.errMsg, - "SimSetup Error: ghostVectorSource was neiter a " + "SimSetup Error: ghostVectorSource was neither a " "double nor an int.\n" "-->Bend[%d] in %s\n", j, comp_stamps[stampID]->getID() ); @@ -935,10 +937,16 @@ void SimSetup::makeMolecules( void ){ delete[] theBends; delete[] theTorsions; } + +#ifdef IS_MPI + sprintf( checkPointMsg, "all molecules initialized succesfully" ); + MPIcheckPoint(); +#endif // is_mpi // clean up the forcefield the_ff->calcRcut(); the_ff->cleanMe(); + } void SimSetup::initFromBass( void ){