241 |
|
} |
242 |
|
|
243 |
|
|
244 |
< |
// make sure every pair of atom types in this simulation has a |
245 |
< |
// non-bonded interaction: |
244 |
> |
// Make sure every pair of atom types in this simulation has a |
245 |
> |
// non-bonded interaction. If not, just inform the user. |
246 |
|
|
247 |
|
set<AtomType*> simTypes = info_->getSimulatedAtomTypes(); |
248 |
|
set<AtomType*>::iterator it, jt; |
249 |
+ |
|
250 |
|
for (it = simTypes.begin(); it != simTypes.end(); ++it) { |
251 |
|
atype1 = (*it); |
252 |
< |
for (jt = simTypes.begin(); jt != simTypes.end(); ++jt) { |
252 |
> |
for (jt = it; jt != simTypes.end(); ++jt) { |
253 |
|
atype2 = (*jt); |
254 |
|
key = make_pair(atype1, atype2); |
255 |
|
|
256 |
|
if (interactions_[key].size() == 0) { |
257 |
|
sprintf( painCave.errMsg, |
258 |
< |
"InteractionManager unable to find an appropriate non-bonded\n" |
259 |
< |
"\tinteraction for atom types %s - %s\n", |
258 |
> |
"InteractionManager could not find a matching non-bonded\n" |
259 |
> |
"\tinteraction for atom types %s - %s\n" |
260 |
> |
"\tProceeding without this interaction.\n", |
261 |
|
atype1->getName().c_str(), atype2->getName().c_str()); |
262 |
|
painCave.severity = OPENMD_INFO; |
263 |
< |
painCave.isFatal = 1; |
263 |
> |
painCave.isFatal = 0; |
264 |
|
simError(); |
265 |
|
} |
266 |
|
} |