| 96 |  |  | 
| 97 |  | } | 
| 98 |  |  | 
| 99 | < | SimInfo*  SimCreator::createSim(const std::string & mdFileName, bool loadInitCoords) { | 
| 99 | > | SimInfo*  SimCreator::createSim(const std::string & mdFileName, | 
| 100 | > | bool loadInitCoords) { | 
| 101 |  |  | 
| 102 |  | MakeStamps * stamps = new MakeStamps(); | 
| 103 |  |  | 
| 107 |  | parseFile(mdFileName, stamps, simParams); | 
| 108 |  |  | 
| 109 |  | //create the force field | 
| 110 | < | ForceField * ff = ForceFieldFactory::getInstance()->createForceField( | 
| 111 | < | simParams->getForceField()); | 
| 110 | > | ForceField * ff = ForceFieldFactory::getInstance() | 
| 111 | > | ->createForceField(simParams->getForceField()); | 
| 112 |  |  | 
| 113 |  | if (ff == NULL) { | 
| 114 | < | sprintf(painCave.errMsg, "ForceField Factory can not create %s force field\n", | 
| 114 | > | sprintf(painCave.errMsg, | 
| 115 | > | "ForceField Factory can not create %s force field\n", | 
| 116 |  | simParams->getForceField()); | 
| 117 |  | painCave.isFatal = 1; | 
| 118 |  | simError(); | 
| 148 |  | compList(stamps, simParams, moleculeStampPairs); | 
| 149 |  |  | 
| 150 |  | //create SimInfo | 
| 151 | < | SimInfo * info = new SimInfo(moleculeStampPairs, ff, simParams); | 
| 152 | < |  | 
| 151 | > | SimInfo * info = new SimInfo(stamps, moleculeStampPairs, ff, simParams); | 
| 152 | > |  | 
| 153 |  | //gather parameters (SimCreator only retrieves part of the parameters) | 
| 154 |  | gatherParameters(info, mdFileName); | 
| 155 |  |  | 
| 399 |  | std::vector < std::pair<MoleculeStamp *, int> > &moleculeStampPairs) { | 
| 400 |  | int i; | 
| 401 |  | char * id; | 
| 400 | – | LinkedMolStamp* extractedStamp = NULL; | 
| 402 |  | MoleculeStamp * currentStamp; | 
| 403 |  | Component** the_components = simParams->getComponents(); | 
| 404 |  | int n_components = simParams->getNComponents(); | 
| 419 |  | } | 
| 420 |  |  | 
| 421 |  | id = the_components[i]->getType(); | 
| 422 | < |  | 
| 423 | < | extractedStamp = stamps->extractMolStamp(id); | 
| 424 | < | if (extractedStamp == NULL) { | 
| 422 | > |  | 
| 423 | > | currentStamp = stamps->getMolStamp(id); | 
| 424 | > | if (currentStamp == NULL) { | 
| 425 |  | sprintf(painCave.errMsg, | 
| 426 |  | "SimCreator error: Component \"%s\" was not found in the " | 
| 427 |  | "list of declared molecules\n", id); | 
| 430 |  | simError(); | 
| 431 |  | } | 
| 432 |  |  | 
| 432 | – | currentStamp = extractedStamp->getStamp(); | 
| 433 | – |  | 
| 434 | – |  | 
| 433 |  | moleculeStampPairs.push_back( | 
| 434 |  | std::make_pair(currentStamp, the_components[i]->getNMol())); | 
| 435 |  | } //end for (i = 0; i < n_components; i++) |