ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/brains/SimCreator.cpp
(Generate patch)

Comparing trunk/OOPSE-3.0/src/brains/SimCreator.cpp (file contents):
Revision 2120 by tim, Fri Mar 11 17:50:11 2005 UTC vs.
Revision 2211 by chrisfen, Thu Apr 21 14:12:19 2005 UTC

# Line 96 | Line 96 | namespace oopse {
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      
# Line 106 | Line 107 | namespace oopse {
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();
# Line 146 | Line 148 | namespace oopse {
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      
# Line 397 | Line 399 | namespace oopse {
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();
# Line 418 | Line 419 | namespace oopse {
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);
# Line 429 | Line 430 | namespace oopse {
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++)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines