197 |
|
|
198 |
|
} |
199 |
|
|
200 |
+ |
void SimInfo::addExcludePairs(Molecule* mol) { |
201 |
+ |
std::vector<Bond*>::iterator bondIter; |
202 |
+ |
std::vector<Bend*>::iterator bendIter; |
203 |
+ |
std::vector<Torsion*>::iterator torsionIter; |
204 |
+ |
Bond* bond; |
205 |
+ |
Bend* bend; |
206 |
+ |
Torsion* torsion; |
207 |
+ |
int a; |
208 |
+ |
int b; |
209 |
+ |
int c; |
210 |
+ |
int d; |
211 |
+ |
|
212 |
+ |
for (bond= mol->beginBond(bondIter); bond != NULL; bond = mol->nextBond(bondIter)) { |
213 |
+ |
a = bond->getAtomA()->getGlobalIndex(); |
214 |
+ |
b = bond->getAtomB()->getGlobalIndex(); |
215 |
+ |
exclude_.addPair(a, b); |
216 |
+ |
} |
217 |
|
|
218 |
+ |
for (bend= mol->beginBend(bendIter); bend != NULL; bend = mol->nextBend(bendIter)) { |
219 |
+ |
a = bend->getAtomA()->getGlobalIndex(); |
220 |
+ |
b = bend->getAtomB()->getGlobalIndex(); |
221 |
+ |
c = bend->getAtomC()->getGlobalIndex(); |
222 |
+ |
|
223 |
+ |
exclude_.addPair(a, b); |
224 |
+ |
exclude_.addPair(a, c); |
225 |
+ |
exclude_.addPair(b, c); |
226 |
+ |
} |
227 |
+ |
|
228 |
+ |
for (torsion= mol->beginTorsion(torsionIter); torsion != NULL; torsion = mol->nextBond(torsionIter)) { |
229 |
+ |
a = torsion->getAtomA()->getGlobalIndex(); |
230 |
+ |
b = torsion->getAtomB()->getGlobalIndex(); |
231 |
+ |
c = torsion->getAtomC()->getGlobalIndex(); |
232 |
+ |
d = torsion->getAtomD()->getGlobalIndex(); |
233 |
+ |
|
234 |
+ |
exclude_.addPair(a, b); |
235 |
+ |
exclude_.addPair(a, c); |
236 |
+ |
exclude_.addPair(a, d); |
237 |
+ |
exclude_.addPair(b, c); |
238 |
+ |
exclude_.addPair(b, d); |
239 |
+ |
exclude_.addPair(c, d); |
240 |
+ |
} |
241 |
+ |
|
242 |
+ |
|
243 |
+ |
} |
244 |
+ |
|
245 |
+ |
void SimInfo::removeExcludePairs(Molecule* mol) { |
246 |
+ |
std::vector<Bond*>::iterator bondIter; |
247 |
+ |
std::vector<Bend*>::iterator bendIter; |
248 |
+ |
std::vector<Torsion*>::iterator torsionIter; |
249 |
+ |
Bond* bond; |
250 |
+ |
Bend* bend; |
251 |
+ |
Torsion* torsion; |
252 |
+ |
int a; |
253 |
+ |
int b; |
254 |
+ |
int c; |
255 |
+ |
int d; |
256 |
+ |
|
257 |
+ |
for (bond= mol->beginBond(bondIter); bond != NULL; bond = mol->nextBond(bondIter)) { |
258 |
+ |
a = bond->getAtomA()->getGlobalIndex(); |
259 |
+ |
b = bond->getAtomB()->getGlobalIndex(); |
260 |
+ |
exclude_.removePair(a, b); |
261 |
+ |
} |
262 |
+ |
|
263 |
+ |
for (bend= mol->beginBend(bendIter); bend != NULL; bend = mol->nextBend(bendIter)) { |
264 |
+ |
a = bend->getAtomA()->getGlobalIndex(); |
265 |
+ |
b = bend->getAtomB()->getGlobalIndex(); |
266 |
+ |
c = bend->getAtomC()->getGlobalIndex(); |
267 |
+ |
|
268 |
+ |
exclude_.removePair(a, b); |
269 |
+ |
exclude_.removePair(a, c); |
270 |
+ |
exclude_.removePair(b, c); |
271 |
+ |
} |
272 |
+ |
|
273 |
+ |
for (torsion= mol->beginTorsion(torsionIter); torsion != NULL; torsion = mol->nextBond(torsionIter)) { |
274 |
+ |
a = torsion->getAtomA()->getGlobalIndex(); |
275 |
+ |
b = torsion->getAtomB()->getGlobalIndex(); |
276 |
+ |
c = torsion->getAtomC()->getGlobalIndex(); |
277 |
+ |
d = torsion->getAtomD()->getGlobalIndex(); |
278 |
+ |
|
279 |
+ |
exclude_.removePair(a, b); |
280 |
+ |
exclude_.removePair(a, c); |
281 |
+ |
exclude_.removePair(a, d); |
282 |
+ |
exclude_.removePair(b, c); |
283 |
+ |
exclude_.removePair(b, d); |
284 |
+ |
exclude_.removePair(c, d); |
285 |
+ |
} |
286 |
+ |
|
287 |
+ |
} |
288 |
+ |
|
289 |
+ |
|
290 |
|
}//end namespace oopse |