--- trunk/src/brains/SimCreator.cpp 2005/03/11 17:50:11 436 +++ trunk/src/brains/SimCreator.cpp 2005/04/21 14:12:19 514 @@ -96,7 +96,8 @@ namespace oopse { } - SimInfo* SimCreator::createSim(const std::string & mdFileName, bool loadInitCoords) { + SimInfo* SimCreator::createSim(const std::string & mdFileName, + bool loadInitCoords) { MakeStamps * stamps = new MakeStamps(); @@ -106,11 +107,12 @@ namespace oopse { parseFile(mdFileName, stamps, simParams); //create the force field - ForceField * ff = ForceFieldFactory::getInstance()->createForceField( - simParams->getForceField()); + ForceField * ff = ForceFieldFactory::getInstance() + ->createForceField(simParams->getForceField()); if (ff == NULL) { - sprintf(painCave.errMsg, "ForceField Factory can not create %s force field\n", + sprintf(painCave.errMsg, + "ForceField Factory can not create %s force field\n", simParams->getForceField()); painCave.isFatal = 1; simError(); @@ -146,8 +148,8 @@ namespace oopse { compList(stamps, simParams, moleculeStampPairs); //create SimInfo - SimInfo * info = new SimInfo(moleculeStampPairs, ff, simParams); - + SimInfo * info = new SimInfo(stamps, moleculeStampPairs, ff, simParams); + //gather parameters (SimCreator only retrieves part of the parameters) gatherParameters(info, mdFileName); @@ -397,7 +399,6 @@ namespace oopse { std::vector < std::pair > &moleculeStampPairs) { int i; char * id; - LinkedMolStamp* extractedStamp = NULL; MoleculeStamp * currentStamp; Component** the_components = simParams->getComponents(); int n_components = simParams->getNComponents(); @@ -418,9 +419,9 @@ namespace oopse { } id = the_components[i]->getType(); - - extractedStamp = stamps->extractMolStamp(id); - if (extractedStamp == NULL) { + + currentStamp = stamps->getMolStamp(id); + if (currentStamp == NULL) { sprintf(painCave.errMsg, "SimCreator error: Component \"%s\" was not found in the " "list of declared molecules\n", id); @@ -429,9 +430,6 @@ namespace oopse { simError(); } - currentStamp = extractedStamp->getStamp(); - - moleculeStampPairs.push_back( std::make_pair(currentStamp, the_components[i]->getNMol())); } //end for (i = 0; i < n_components; i++)