--- trunk/OOPSE/libmdtools/SimSetup.cpp 2003/04/07 14:30:36 466 +++ trunk/OOPSE/libmdtools/SimSetup.cpp 2003/04/07 20:06:31 469 @@ -106,7 +106,11 @@ void SimSetup::createSim( void ){ strcpy( simnfo->mixingRule, the_globals->getMixingRule() ); simnfo->usePBC = the_globals->getPBC(); - if( !strcmp( force_field, "TraPPE_Ex" ) ) the_ff = new TraPPE_ExFF(); + int usesDipoles = 0; + if( !strcmp( force_field, "TraPPE_Ex" ) ){ + the_ff = new TraPPE_ExFF(); + usesDipoles = 1; + } else if( !strcasecmp( force_field, "LJ" ) ) the_ff = new LJ_FF(); else{ sprintf( painCave.errMsg, @@ -478,11 +482,11 @@ void SimSetup::createSim( void ){ } simnfo->dielectric = the_globals->getDielectric(); } else { - if (simnfo->n_dipoles) { + if (usesDipoles) { if( !the_globals->haveECR() ){ sprintf( painCave.errMsg, - "SimSetup Warning: using default value of 1/2 the smallest" + "SimSetup Warning: using default value of 1/2 the smallest " "box length for the electrostaticCutoffRadius.\n" "I hope you have a very fast processor!\n"); painCave.isFatal = 0; @@ -498,7 +502,7 @@ void SimSetup::createSim( void ){ if( !the_globals->haveEST() ){ sprintf( painCave.errMsg, - "SimSetup Warning: using default value of 5% of the" + "SimSetup Warning: using default value of 5%% of the " "electrostaticCutoffRadius for the " "electrostaticSkinThickness\n" ); @@ -673,13 +677,21 @@ void SimSetup::createSim( void ){ // new AllLong( simnfo ); - if( !strcmp( force_field, "TraPPE_Ex" ) ) new Symplectic(simnfo, - the_ff, - the_extendedsystem); - if( !strcmp( force_field, "LJ" ) ) new Verlet( *simnfo, - the_ff, - the_extendedsystem ); - + + if( !strcmp( force_field, "TraPPE_Ex" ) ){ + new Symplectic(simnfo, the_ff, the_extendedsystem); + std::cerr << "called new Symplecic\n"; + fprintf( stderr, "called new Symplectic. stderr\n" ); + } + else if( !strcmp( force_field, "LJ" ) ){ + new Verlet( *simnfo, the_ff, the_extendedsystem ); + std::cerr << "called new Verlet\n"; + fprintf( stderr, "called new Verlet. stderr\n" ); + } + else { + std::cerr << "I'm a bug.\n"; + fprintf( stderr, "Ima bug. stderr %s\n", force_field); + } #ifdef IS_MPI mpiSim->mpiRefresh(); #endif