--- trunk/OOPSE/libmdtools/SimSetup.cpp 2003/04/07 14:30:36 466 +++ trunk/OOPSE/libmdtools/SimSetup.cpp 2003/04/07 21:42:19 474 @@ -88,9 +88,12 @@ void SimSetup::createSim( void ){ the_extendedsystem = new ExtendedSystem( simnfo ); the_extendedsystem->setTargetTemp(the_globals->getTargetTemp()); the_extendedsystem->setTargetPressure(the_globals->getTargetPressure()); + the_extendedsystem->setQmass(the_globals->getQmass()); + the_extendedsystem->setTauRelax(the_globals->getTauRelax()); } else if ( !strcasecmp( ensemble, "NVT") ) { the_extendedsystem = new ExtendedSystem( simnfo ); the_extendedsystem->setTargetTemp(the_globals->getTargetTemp()); + the_extendedsystem->setQmass(the_globals->getQmass()); } else if ( !strcasecmp( ensemble, "NVE") ) { } else { sprintf( painCave.errMsg, @@ -106,7 +109,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 +485,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 +505,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 +680,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