--- branches/new_design/OOPSE-3.0/src/brains/SimCreator.cpp 2004/11/12 22:44:03 1737 +++ branches/new_design/OOPSE-3.0/src/brains/SimCreator.cpp 2004/11/13 05:08:12 1738 @@ -559,94 +559,9 @@ void SimCreator::setGlobalIndex(SimInfo *info) { std::copy(globalMolMembership.begin(), globalMolMembership.end(), info->getGlobalMolMembershipPointer()); #endif - -} - - -void SimCreator::initFortran(SimInfo* info) { - - //setup fortran simulation (Actually, in parallel version it will initialze the parallel part of fortran first) - info->update(); - //notify fortran whether reaction field is used or not - //deprecated - int isError; - isError = 0; - initFortranFF( &useReactionField, &isError ); - - if(isError){ - sprintf( painCave.errMsg, - "SimCreator::initFortran() error: There was an error initializing the forceField in fortran.\n" ); - painCave.isFatal = 1; - simError(); - } - - //figure out the cutoff radius and pass it to fortran - setCutoff(info); } -void SimCreator::setCutoff(SimInfo* info) { - Globals* globals = info->getGlobals(); - double rcut; //cutoff radius - double rsw; //switching radius - - simtype* st = info->getSimType(); - - if (st->SIM_uses_Charges | st->SIM_uses_Dipoles | st->SIM_uses_RF) { - - if (!globals->haveRcut()){ - sprintf(painCave.errMsg, - "SimCreator Warning: No value was set for the cutoffRadius.\n" - "\tOOPSE will use a default value of 15.0 angstroms" - "\tfor the cutoffRadius.\n"); - painCave.isFatal = 0; - simError(); - rcut = 15.0; - } else{ - rcut = globals->getRcut(); - } - - if (!globals->haveRsw()){ - sprintf(painCave.errMsg, - "SimCreator Warning: No value was set for switchingRadius.\n" - "\tOOPSE will use a default value of\n" - "\t0.95 * cutoffRadius for the switchingRadius\n"); - painCave.isFatal = 0; - simError(); - rsw = 0.95 * rcut; - } else{ - rsw = globals->getRsw(); - } - - } else { - // if charge, dipole or reaction field is not used and the cutofff radius is not specified in - //meta-data file, the maximum cutoff radius calculated from forcefiled will be used - - if (globals->haveRcut()) { - rcut = globals->getRcut(); - } else { - //set cutoff radius to the maximum cutoff radius based on atom types in the whole system - rcut = info->calcMaxCutoffRadius(); - } - - if (globals->haveRsw()) { - rsw = globals->getRsw() - } else { - rsw = rcut; - } - - } - - //store them into Siminfo - info->setRcut(rcut); - info->setRsw(rsw); - - double rnblist = rcut + 1; // skin of neighbor list - - //Pass these cutoff radius etc. to fortran. This function should be called once and only once - notifyFortranCutoffs(&rcut, &rsw, &rnblist); -} - void SimCreator::loadCoordinates(SimInfo* info) { Globals* globals; globals = info->getGlobals();