73 |
|
nGlobalIntegrableObjects_(0), nGlobalRigidBodies_(0), |
74 |
|
nAtoms_(0), nBonds_(0), nBends_(0), nTorsions_(0), nRigidBodies_(0), |
75 |
|
nIntegrableObjects_(0), nCutoffGroups_(0), nConstraints_(0), |
76 |
< |
sman_(NULL), fortranInitialized_(false), selectMan_(NULL) { |
76 |
> |
sman_(NULL), fortranInitialized_(false) { |
77 |
|
|
78 |
|
|
79 |
|
std::vector<std::pair<MoleculeStamp*, int> >::iterator i; |
139 |
|
molToProcMap_.resize(nGlobalMols_); |
140 |
|
#endif |
141 |
|
|
142 |
– |
selectMan_ = new SelectionManager(this); |
143 |
– |
selectMan_->selectAll(); |
142 |
|
} |
143 |
|
|
144 |
|
SimInfo::~SimInfo() { |
145 |
< |
//MemoryUtils::deleteVectorOfPointer(molecules_); |
146 |
< |
|
147 |
< |
MemoryUtils::deleteVectorOfPointer(moleculeStamps_); |
145 |
> |
std::map<int, Molecule*>::iterator i; |
146 |
> |
for (i = molecules_.begin(); i != molecules_.end(); ++i) { |
147 |
> |
delete i->second; |
148 |
> |
} |
149 |
> |
molecules_.clear(); |
150 |
> |
|
151 |
> |
MemoryUtils::deletePointers(moleculeStamps_); |
152 |
|
|
153 |
|
delete sman_; |
154 |
|
delete simParams_; |
155 |
|
delete forceField_; |
154 |
– |
delete selectMan_; |
156 |
|
} |
157 |
|
|
158 |
|
int SimInfo::getNGlobalConstraints() { |
836 |
|
} |
837 |
|
|
838 |
|
void SimInfo::setSnapshotManager(SnapshotManager* sman) { |
839 |
+ |
//if (sman_ == sman_) { |
840 |
+ |
// return; |
841 |
+ |
//} |
842 |
+ |
|
843 |
+ |
//delete sman_; |
844 |
|
sman_ = sman; |
845 |
|
|
846 |
|
Molecule* mol; |