64 |
|
nCutoffGroups_ += mol->getNCutoffGroups(); |
65 |
|
nConstraints_ += mol->getNConstraints(); |
66 |
|
|
67 |
+ |
globalIndexToMol_.insert(make_pair(mol->getGlobalIndex(), mol)); |
68 |
|
return true; |
69 |
|
} else { |
70 |
|
return false; |
86 |
|
nCutoffGroups_ -= mol->getNCutoffGroups(); |
87 |
|
nConstraints_ -= mol->getNConstraints(); |
88 |
|
|
89 |
+ |
globalIndexToMol_.erase(mol->getGlobalIndex()); |
90 |
|
return true; |
91 |
|
} else { |
92 |
|
return false; |
287 |
|
} |
288 |
|
|
289 |
|
} |
290 |
+ |
|
291 |
+ |
|
292 |
+ |
void SimInfo::addMoleculeStamp(MoleculeStamp* molStamp, int nmol) { |
293 |
+ |
int curStampId; |
294 |
|
|
295 |
+ |
//index from 0 |
296 |
+ |
curStampId = molStampIds_.size(); |
297 |
|
|
298 |
+ |
moleculeStamps_.push_back(molStamp); |
299 |
+ |
molStampIds_.insert(molStampIds_.end(), nmol, curStampId) |
300 |
+ |
} |
301 |
+ |
|
302 |
+ |
std::ostream& operator <<(ostream& o, SimInfo& info) { |
303 |
+ |
|
304 |
+ |
return o; |
305 |
+ |
} |
306 |
+ |
|
307 |
|
}//end namespace oopse |