# | Line 71 | Line 71 | namespace oopse { | |
---|---|---|
71 | if (worldRank == 0) { | |
72 | #endif // is_mpi | |
73 | ||
74 | – | simParams->initalize(); |
74 | set_interface_stamps(stamps, simParams); | |
75 | ||
76 | #ifdef IS_MPI | |
# | Line 96 | Line 95 | namespace oopse { | |
95 | ||
96 | } | |
97 | ||
98 | < | SimInfo* SimCreator::createSim(const std::string & mdFileName, bool loadInitCoords) { |
98 | > | SimInfo* SimCreator::createSim(const std::string & mdFileName, |
99 | > | bool loadInitCoords) { |
100 | ||
101 | MakeStamps * stamps = new MakeStamps(); | |
102 | ||
# | Line 106 | Line 106 | namespace oopse { | |
106 | parseFile(mdFileName, stamps, simParams); | |
107 | ||
108 | //create the force field | |
109 | < | ForceField * ff = ForceFieldFactory::getInstance()->createForceField( |
110 | < | simParams->getForceField()); |
109 | > | ForceField * ff = ForceFieldFactory::getInstance() |
110 | > | ->createForceField(simParams->getForceField()); |
111 | ||
112 | if (ff == NULL) { | |
113 | < | sprintf(painCave.errMsg, "ForceField Factory can not create %s force field\n", |
114 | < | simParams->getForceField()); |
113 | > | sprintf(painCave.errMsg, |
114 | > | "ForceField Factory can not create %s force field\n", |
115 | > | simParams->getForceField().c_str()); |
116 | painCave.isFatal = 1; | |
117 | simError(); | |
118 | } | |
# | Line 146 | Line 147 | namespace oopse { | |
147 | compList(stamps, simParams, moleculeStampPairs); | |
148 | ||
149 | //create SimInfo | |
150 | < | SimInfo * info = new SimInfo(moleculeStampPairs, ff, simParams); |
151 | < | |
150 | > | SimInfo * info = new SimInfo(stamps, moleculeStampPairs, ff, simParams); |
151 | > | |
152 | //gather parameters (SimCreator only retrieves part of the parameters) | |
153 | gatherParameters(info, mdFileName); | |
154 | ||
# | Line 397 | Line 398 | namespace oopse { | |
398 | std::vector < std::pair<MoleculeStamp *, int> > &moleculeStampPairs) { | |
399 | int i; | |
400 | char * id; | |
400 | – | LinkedMolStamp* extractedStamp = NULL; |
401 | MoleculeStamp * currentStamp; | |
402 | Component** the_components = simParams->getComponents(); | |
403 | int n_components = simParams->getNComponents(); | |
# | Line 418 | Line 418 | namespace oopse { | |
418 | } | |
419 | ||
420 | id = the_components[i]->getType(); | |
421 | < | |
422 | < | extractedStamp = stamps->extractMolStamp(id); |
423 | < | if (extractedStamp == NULL) { |
421 | > | |
422 | > | currentStamp = stamps->getMolStamp(id); |
423 | > | if (currentStamp == NULL) { |
424 | sprintf(painCave.errMsg, | |
425 | "SimCreator error: Component \"%s\" was not found in the " | |
426 | "list of declared molecules\n", id); | |
# | Line 429 | Line 429 | namespace oopse { | |
429 | simError(); | |
430 | } | |
431 | ||
432 | – | currentStamp = extractedStamp->getStamp(); |
433 | – | |
434 | – | |
432 | moleculeStampPairs.push_back( | |
433 | std::make_pair(currentStamp, the_components[i]->getNMol())); | |
434 | } //end for (i = 0; i < n_components; i++) | |
# | Line 606 | Line 603 | namespace oopse { | |
603 | //invalid initial coordinate file | |
604 | sprintf(painCave.errMsg, | |
605 | "Initial configuration file %s should at least contain one frame\n", | |
606 | < | simParams->getInitialConfig()); |
606 | > | simParams->getInitialConfig().c_str()); |
607 | painCave.isFatal = 1; | |
608 | simError(); | |
609 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |