OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
SelectionManager.hpp
1/*
2 * Copyright (c) 2004-present, The University of Notre Dame. All rights
3 * reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 *
11 * 2. Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 *
15 * 3. Neither the name of the copyright holder nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
30 *
31 * SUPPORT OPEN SCIENCE! If you use OpenMD or its source code in your
32 * research, please cite the appropriate papers when you publish your
33 * work. Good starting points are:
34 *
35 * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).
36 * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).
37 * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).
38 * [4] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
39 * [5] Kuang & Gezelter, Mol. Phys., 110, 691-701 (2012).
40 * [6] Lamichhane, Gezelter & Newman, J. Chem. Phys. 141, 134109 (2014).
41 * [7] Lamichhane, Newman & Gezelter, J. Chem. Phys. 141, 134110 (2014).
42 * [8] Bhattarai, Newman & Gezelter, Phys. Rev. B 99, 094106 (2019).
43 */
44
45#ifndef SELECTION_SELECTIONMANAGER_HPP
46#define SELECTION_SELECTIONMANAGER_HPP
47
48#include "primitives/Bend.hpp"
49#include "primitives/Bond.hpp"
54#include "selection/SelectionSet.hpp"
55
56namespace OpenMD {
57
58 class SimInfo;
60 public:
62
63 void addSelection(StuntDouble* sd) {
64 ss_.bitsets_[STUNTDOUBLE].setBitOn(sd->getGlobalIndex());
65 }
66 void addSelection(Bond* b) {
67 ss_.bitsets_[BOND].setBitOn(b->getGlobalIndex());
68 }
69 void addSelection(Bend* b) {
70 ss_.bitsets_[BEND].setBitOn(b->getGlobalIndex());
71 }
72 void addSelection(Torsion* t) {
73 ss_.bitsets_[TORSION].setBitOn(t->getGlobalIndex());
74 }
75 void addSelection(Inversion* i) {
76 ss_.bitsets_[INVERSION].setBitOn(i->getGlobalIndex());
77 }
78 void addSelection(Molecule* m) {
79 ss_.bitsets_[MOLECULE].setBitOn(m->getGlobalIndex());
80 }
81
82 void addSelectionSet(const SelectionSet& bs) {
83 ss_.bitsets_[STUNTDOUBLE] |= bs.bitsets_[STUNTDOUBLE];
84 }
85 void addBondSelectionSet(const SelectionSet& bs) {
86 ss_.bitsets_[BOND] |= bs.bitsets_[BOND];
87 }
88 void addBendSelectionSet(const SelectionSet& bs) {
89 ss_.bitsets_[BEND] |= bs.bitsets_[BEND];
90 }
91 void addTorsionSelectionSet(const SelectionSet& bs) {
92 ss_.bitsets_[TORSION] |= bs.bitsets_[TORSION];
93 }
94 void addInversionSelectionSet(const SelectionSet& bs) {
95 ss_.bitsets_[INVERSION] |= bs.bitsets_[INVERSION];
96 }
97 void addMoleculeSelectionSet(const SelectionSet& bs) {
98 ss_.bitsets_[MOLECULE] |= bs.bitsets_[MOLECULE];
99 }
100
101 bool isEmpty() {
102 return ss_.bitsets_[STUNTDOUBLE].none() && ss_.bitsets_[BOND].none() &&
103 ss_.bitsets_[BEND].none() && ss_.bitsets_[TORSION].none() &&
104 ss_.bitsets_[INVERSION].none() && ss_.bitsets_[MOLECULE].none();
105 }
106
107 void setSelectionSet(const SelectionSet& bs) {
108 for (int i = 0; i < N_SELECTIONTYPES; i++)
109 ss_.bitsets_[i] = bs.bitsets_[i];
110 }
111
112 // void setSelectionSet(const SelectionSet& bs) {
113 // ss_.bitsets_[STUNTDOUBLE] = bs.bitsets_[];
114 //}
115 void setBondSelectionSet(const SelectionSet& bs) {
116 ss_.bitsets_[BOND] = bs.bitsets_[BOND];
117 }
118 void setBendSelectionSet(const SelectionSet& bs) {
119 ss_.bitsets_[BEND] = bs.bitsets_[BEND];
120 }
121 void setTorsionSelectionSet(const SelectionSet& bs) {
122 ss_.bitsets_[TORSION] = bs.bitsets_[TORSION];
123 }
124 void setInversionSelectionSet(const SelectionSet& bs) {
125 ss_.bitsets_[INVERSION] = bs.bitsets_[INVERSION];
126 }
127 void setMoleculeSelectionSet(const SelectionSet& bs) {
128 ss_.bitsets_[MOLECULE] = bs.bitsets_[MOLECULE];
129 }
130
131 std::vector<int> getSelectionCounts() {
132 std::vector<int> counts(N_SELECTIONTYPES, 0);
133 for (int i = 0; i < N_SELECTIONTYPES; i++) {
134 counts[i] = ss_.bitsets_[i].countBits();
135 }
136 return counts;
137 }
138
139 int getSelectionCount() { return ss_.bitsets_[STUNTDOUBLE].countBits(); }
140 int getBondSelectionCount() { return ss_.bitsets_[BOND].countBits(); }
141 int getBendSelectionCount() { return ss_.bitsets_[BEND].countBits(); }
142 int getTorsionSelectionCount() { return ss_.bitsets_[TORSION].countBits(); }
143 int getInversionSelectionCount() {
144 return ss_.bitsets_[INVERSION].countBits();
145 }
146 int getMoleculeSelectionCount() {
147 return ss_.bitsets_[MOLECULE].countBits();
148 }
149 SelectionSet getSelectionSet() { return ss_; }
150 /* SelectionSet getBondSelectionSet() {
151 return ss_.bitsets_[BOND];
152 }
153 SelectionSet getBendSelectionSet() {
154 return ss_.bitsets_[BEND];
155 }
156 SelectionSet getTorsionSelectionSet() {
157 return ss_.bitsets_[TORSION];
158 }
159 SelectionSet getInversionSelectionSet() {
160 return ss_.bitsets_[INVERSION];
161 }
162 */
163
164 void setSelection(StuntDouble* sd) {
165 ss_.bitsets_[STUNTDOUBLE].clearAll();
166 ss_.bitsets_[STUNTDOUBLE].setBitOn(sd->getGlobalIndex());
167 }
168 void setSelection(Bond* b) {
169 ss_.bitsets_[BOND].clearAll();
170 ss_.bitsets_[BOND].setBitOn(b->getGlobalIndex());
171 }
172 void setSelection(Bend* b) {
173 ss_.bitsets_[BEND].clearAll();
174 ss_.bitsets_[BEND].setBitOn(b->getGlobalIndex());
175 }
176 void setSelection(Torsion* t) {
177 ss_.bitsets_[TORSION].clearAll();
178 ss_.bitsets_[TORSION].setBitOn(t->getGlobalIndex());
179 }
180 void setSelection(Inversion* i) {
181 ss_.bitsets_[INVERSION].clearAll();
182 ss_.bitsets_[INVERSION].setBitOn(i->getGlobalIndex());
183 }
184 void setSelection(Molecule* m) {
185 ss_.bitsets_[MOLECULE].clearAll();
186 ss_.bitsets_[MOLECULE].setBitOn(m->getGlobalIndex());
187 }
188
189 void toggleSelection(StuntDouble* sd) {
190 ss_.bitsets_[STUNTDOUBLE].flip(sd->getGlobalIndex());
191 }
192 void toggleSelection(Bond* b) {
193 ss_.bitsets_[BOND].flip(b->getGlobalIndex());
194 }
195 void toggleSelection(Bend* b) {
196 ss_.bitsets_[BEND].flip(b->getGlobalIndex());
197 }
198 void toggleSelection(Torsion* t) {
199 ss_.bitsets_[TORSION].flip(t->getGlobalIndex());
200 }
201 void toggleSelection(Inversion* i) {
202 ss_.bitsets_[INVERSION].flip(i->getGlobalIndex());
203 }
204 void toggleSelection(Molecule* m) {
205 ss_.bitsets_[MOLECULE].flip(m->getGlobalIndex());
206 }
207
208 void toggleSelection() {
209 for (int i = 0; i < N_SELECTIONTYPES; i++)
210 ss_.bitsets_[i].flip();
211 }
212
213 void selectAll() {
214 for (int i = 0; i < N_SELECTIONTYPES; i++)
215 ss_.bitsets_[i].setAll();
216 }
217
218 void clearSelection() {
219 for (int i = 0; i < N_SELECTIONTYPES; i++)
220 ss_.bitsets_[i].clearAll();
221 }
222
223 SelectionManager replaceRigidBodiesWithAtoms() const;
224 SelectionManager removeAtomsInRigidBodies() const;
225
226 void clearSelection(StuntDouble* sd) {
227 ss_.bitsets_[STUNTDOUBLE].setBitOff(sd->getGlobalIndex());
228 }
229 void clearSelection(Bond* b) {
230 ss_.bitsets_[BOND].setBitOff(b->getGlobalIndex());
231 }
232 void clearSelection(Bend* b) {
233 ss_.bitsets_[BEND].setBitOff(b->getGlobalIndex());
234 }
235 void clearSelection(Torsion* t) {
236 ss_.bitsets_[TORSION].setBitOff(t->getGlobalIndex());
237 }
238 void clearSelection(Inversion* i) {
239 ss_.bitsets_[INVERSION].setBitOff(i->getGlobalIndex());
240 }
241 void clearSelection(Molecule* m) {
242 ss_.bitsets_[MOLECULE].setBitOff(m->getGlobalIndex());
243 }
244
245 bool isGlobalIDSelected(int globalIndex) {
246 return ss_.bitsets_[STUNTDOUBLE][globalIndex];
247 }
248 bool isSelected(StuntDouble* sd) {
249 return ss_.bitsets_[STUNTDOUBLE][sd->getGlobalIndex()];
250 }
251 bool isSelected(Bond* b) { return ss_.bitsets_[BOND][b->getGlobalIndex()]; }
252 bool isSelected(Bend* b) { return ss_.bitsets_[BEND][b->getGlobalIndex()]; }
253 bool isSelected(Torsion* t) {
254 return ss_.bitsets_[TORSION][t->getGlobalIndex()];
255 }
256 bool isSelected(Inversion* i) {
257 return ss_.bitsets_[INVERSION][i->getGlobalIndex()];
258 }
259 bool isSelected(Molecule* m) {
260 return ss_.bitsets_[MOLECULE][m->getGlobalIndex()];
261 }
262
263 /**
264 * Finds the first selected StuntDouble in the selection. In
265 * parallel, this is the first selected StuntDouble that is the
266 * responsibility of the local processor, not the first
267 * StuntDouble in the global selection.
268 * @return a pointer to the StuntDouble object, returns NULL if no
269 * StuntDouble was found.
270 * @param i iterator used to keep track of the selection
271 */
272 StuntDouble* beginSelected(int& i);
273 /**
274 * Finds the next selected StuntDouble in the selection. In
275 * parallel, this is the next selected StuntDouble that is the
276 * responsibility of the local processor, not the next
277 * StuntDouble in the global selection.
278 * @return a pointer to the StuntDouble object, returns NULL if no
279 * StuntDouble was found.
280 * @param i iterator used to keep track of the selection
281 */
282 StuntDouble* nextSelected(int& i);
283 /**
284 * Finds the first unselected StuntDouble. In
285 * parallel, this is the first unselected StuntDouble that is the
286 * responsibility of the local processor, not the first
287 * StuntDouble in the global unselected pool.
288 * @return a pointer to the StuntDouble object, returns NULL if no
289 * StuntDouble was found.
290 * @param i iterator used to keep track of the selection
291 */
293 /**
294 * Finds the next unselected StuntDouble. In
295 * parallel, this is the next unselected StuntDouble that is the
296 * responsibility of the local processor, not the next
297 * StuntDouble in the global unselected pool.
298 * @return a pointer to the StuntDouble object, returns NULL if no
299 * StuntDouble was found.
300 * @param i iterator used to keep track of the selection
301 */
303 /**
304 * Finds the first selected Bond in the selection. In parallel,
305 * this is the first selected Bond that is the responsibility of
306 * the local processor, not the first Bond in the global
307 * selection.
308 * @return a pointer to the Bond object, returns NULL if no Bond was found.
309 * @param i iterator used to keep track of the selection
310 */
311 Bond* beginSelectedBond(int& i);
312 /**
313 * Finds the next selected Bond in the selection. In parallel,
314 * this is the next selected Bond that is the responsibility of
315 * the local processor, not the next Bond in the global selection.
316 * @return a pointer to the Bond object, returns NULL if no Bond was found.
317 * @param i iterator used to keep track of the selection
318 */
319 Bond* nextSelectedBond(int& i);
320 /**
321 * Finds the first unselected Bond. In parallel, this is the
322 * first unselected Bond that is the responsibility of the local
323 * processor, not the first Bond in the global unselected pool.
324 * @return a pointer to the Bond object, returns NULL if no Bond was found.
325 * @param i iterator used to keep track of the selection
326 */
327 Bond* beginUnselectedBond(int& i);
328 /**
329 * Finds the next unselected Bond. In parallel, this is the
330 * next unselected Bond that is the responsibility of the local
331 * processor, not the next Bond in the global unselected pool.
332 * @return a pointer to the Bond object, returns NULL if no Bond was found.
333 * @param i iterator used to keep track of the selection
334 */
335 Bond* nextUnselectedBond(int& i);
336
337 /**
338 * Finds the first selected Bend in the selection. In parallel,
339 * this is the first selected Bend that is the responsibility of
340 * the local processor, not the first Bend in the global
341 * selection.
342 * @return a pointer to the Bend object, returns NULL if no Bend was found.
343 * @param i iterator used to keep track of the selection
344 */
345 Bend* beginSelectedBend(int& i);
346 /**
347 * Finds the next selected Bend in the selection. In parallel,
348 * this is the next selected Bend that is the responsibility of
349 * the local processor, not the next Bend in the global selection.
350 * @return a pointer to the Bend object, returns NULL if no Bend was found.
351 * @param i iterator used to keep track of the selection
352 */
353 Bend* nextSelectedBend(int& i);
354 /**
355 * Finds the first unselected Bend. In parallel, this is the
356 * first unselected Bend that is the responsibility of the local
357 * processor, not the first Bend in the global unselected pool.
358 * @return a pointer to the Bend object, returns NULL if no Bend was found.
359 * @param i iterator used to keep track of the selection
360 */
361 Bend* beginUnselectedBend(int& i);
362 /**
363 * Finds the next unselected Bend. In parallel, this is the
364 * next unselected Bend that is the responsibility of the local
365 * processor, not the next Bend in the global unselected pool.
366 * @return a pointer to the Bend object, returns NULL if no Bend was found.
367 * @param i iterator used to keep track of the selection
368 */
369 Bend* nextUnselectedBend(int& i);
370 /**
371 * Finds the first selected Torsion in the selection. In parallel,
372 * this is the first selected Torsion that is the responsibility of
373 * the local processor, not the first Torsion in the global
374 * selection.
375 * @return a pointer to the Torsion object, returns NULL if no Torsion was
376 * found.
377 * @param i iterator used to keep track of the selection
378 */
380 /**
381 * Finds the next selected Torsion in the selection. In parallel,
382 * this is the next selected Torsion that is the responsibility of
383 * the local processor, not the next Torsion in the global selection.
384 * @return a pointer to the Torsion object, returns NULL if no Torsion was
385 * found.
386 * @param i iterator used to keep track of the selection
387 */
389 /**
390 * Finds the first unselected Torsion. In parallel, this is the
391 * first unselected Torsion that is the responsibility of the local
392 * processor, not the first Torsion in the global unselected pool.
393 * @return a pointer to the Torsion object, returns NULL if no Torsion was
394 * found.
395 * @param i iterator used to keep track of the selection
396 */
398 /**
399 * Finds the next unselected Torsion. In parallel, this is the
400 * next unselected Torsion that is the responsibility of the local
401 * processor, not the next Torsion in the global unselected pool.
402 * @return a pointer to the Torsion object, returns NULL if no Torsion was
403 * found.
404 * @param i iterator used to keep track of the selection
405 */
407 /**
408 * Finds the first selected Inversion in the selection. In parallel,
409 * this is the first selected Inversion that is the responsibility of
410 * the local processor, not the first Inversion in the global
411 * selection.
412 * @return a pointer to the Inversion object, returns NULL if no Inversion
413 * was found.
414 * @param i iterator used to keep track of the selection
415 */
417 /**
418 * Finds the next selected Inversion in the selection. In parallel,
419 * this is the next selected Inversion that is the responsibility of
420 * the local processor, not the next Inversion in the global selection.
421 * @return a pointer to the Inversion object, returns NULL if no Inversion
422 * was found.
423 * @param i iterator used to keep track of the selection
424 */
426 /**
427 * Finds the first unselected Inversion. In parallel, this is the
428 * first unselected Inversion that is the responsibility of the local
429 * processor, not the first Inversion in the global unselected pool.
430 * @return a pointer to the Inversion object, returns NULL if no Inversion
431 * was found.
432 * @param i iterator used to keep track of the selection
433 */
435 /**
436 * Finds the next unselected Inversion. In parallel, this is the
437 * next unselected Inversion that is the responsibility of the local
438 * processor, not the next Inversion in the global unselected pool.
439 * @return a pointer to the Inversion object, returns NULL if no Inversion
440 * was found.
441 * @param i iterator used to keep track of the selection
442 */
444 /**
445 * Finds the first selected Molecule in the selection. In parallel,
446 * this is the first selected Molecule that is the responsibility of
447 * the local processor, not the first Molecule in the global
448 * selection.
449 * @return a pointer to the Molecule object, returns NULL if no Molecule was
450 * found.
451 * @param i iterator used to keep track of the selection
452 */
454 /**
455 * Finds the next selected Molecule in the selection. In parallel,
456 * this is the next selected Molecule that is the responsibility of
457 * the local processor, not the next Molecule in the global selection.
458 * @return a pointer to the Molecule object, returns NULL if no Molecule was
459 * found.
460 * @param i iterator used to keep track of the selection
461 */
463 /**
464 * Finds the first unselected Molecule. In parallel, this is the
465 * first unselected Molecule that is the responsibility of the local
466 * processor, not the first Molecule in the global unselected pool.
467 * @return a pointer to the Molecule object, returns NULL if no Molecule was
468 * found.
469 * @param i iterator used to keep track of the selection
470 */
472 /**
473 * Finds the next unselected Molecule. In parallel, this is the
474 * next unselected Molecule that is the responsibility of the local
475 * processor, not the next Molecule in the global unselected pool.
476 * @return a pointer to the Molecule object, returns NULL if no Molecule was
477 * found.
478 * @param i iterator used to keep track of the selection
479 */
481
482 /**
483 * Finds the n^th selected Molecule in the selection. In parallel,
484 * if this molecule is not the responsibility of the local
485 * processor, a NULL is returned.
486 * @return a pointer to the Molecule object, returns NULL if no Molecule was
487 * found.
488 * @param n which molecule in the selection set to find
489 */
491
492 AtomTypeSet getSelectedAtomTypes();
493
494 SelectionManager& operator&=(const SelectionManager& sman) {
495 for (int i = 0; i < N_SELECTIONTYPES; i++)
496 ss_.bitsets_[i] &= sman.ss_.bitsets_[i];
497 return *this;
498 }
499
500 SelectionManager& operator|=(const SelectionManager& sman) {
501 for (int i = 0; i < N_SELECTIONTYPES; i++)
502 ss_.bitsets_[i] |= sman.ss_.bitsets_[i];
503 return *this;
504 }
505
506 SelectionManager& operator^=(const SelectionManager& sman) {
507 for (int i = 0; i < N_SELECTIONTYPES; i++)
508 ss_.bitsets_[i] ^= sman.ss_.bitsets_[i];
509 return *this;
510 }
511
512 SelectionManager& operator-=(const SelectionManager& sman) {
513 for (int i = 0; i < N_SELECTIONTYPES; i++)
514 ss_.bitsets_[i] -= sman.ss_.bitsets_[i];
515 return *this;
516 }
517
518 friend SelectionManager operator|(const SelectionManager& sman1,
519 const SelectionManager& sman2);
520 friend SelectionManager operator&(const SelectionManager& sman1,
521 const SelectionManager& sman2);
522 friend SelectionManager operator^(const SelectionManager& sman1,
523 const SelectionManager& sman2);
524 friend SelectionManager operator-(const SelectionManager& sman1,
525 const SelectionManager& sman2);
526
527 private:
528 SimInfo* info_ {nullptr};
529 SelectionSet ss_;
530 std::vector<int> nObjects_;
531 std::vector<StuntDouble*> stuntdoubles_;
532 std::vector<Bond*> bonds_;
533 std::vector<Bend*> bends_;
534 std::vector<Torsion*> torsions_;
535 std::vector<Inversion*> inversions_;
536 std::vector<Molecule*> molecules_;
537 };
538} // namespace OpenMD
539
540#endif
int getGlobalIndex()
Returns the global index of this molecule.
Definition Molecule.hpp:107
Bend * nextUnselectedBend(int &i)
Finds the next unselected Bend.
Bend * beginUnselectedBend(int &i)
Finds the first unselected Bend.
Bend * nextSelectedBend(int &i)
Finds the next selected Bend in the selection.
Bond * nextUnselectedBond(int &i)
Finds the next unselected Bond.
Torsion * nextUnselectedTorsion(int &i)
Finds the next unselected Torsion.
Molecule * nthSelectedMolecule(int &n)
Finds the n^th selected Molecule in the selection.
Bend * beginSelectedBend(int &i)
Finds the first selected Bend in the selection.
Bond * nextSelectedBond(int &i)
Finds the next selected Bond in the selection.
Bond * beginSelectedBond(int &i)
Finds the first selected Bond in the selection.
AtomTypeSet getSelectedAtomTypes()
getSelectedAtomTypes
Molecule * nextSelectedMolecule(int &i)
Finds the next selected Molecule in the selection.
StuntDouble * nextSelected(int &i)
Finds the next selected StuntDouble in the selection.
StuntDouble * nextUnselected(int &i)
Finds the next unselected StuntDouble.
Inversion * beginUnselectedInversion(int &i)
Finds the first unselected Inversion.
Inversion * beginSelectedInversion(int &i)
Finds the first selected Inversion in the selection.
StuntDouble * beginSelected(int &i)
Finds the first selected StuntDouble in the selection.
Bond * beginUnselectedBond(int &i)
Finds the first unselected Bond.
Molecule * beginSelectedMolecule(int &i)
Finds the first selected Molecule in the selection.
Torsion * beginSelectedTorsion(int &i)
Finds the first selected Torsion in the selection.
Torsion * beginUnselectedTorsion(int &i)
Finds the first unselected Torsion.
Inversion * nextSelectedInversion(int &i)
Finds the next selected Inversion in the selection.
Inversion * nextUnselectedInversion(int &i)
Finds the next unselected Inversion.
Molecule * beginUnselectedMolecule(int &i)
Finds the first unselected Molecule.
Molecule * nextUnselectedMolecule(int &i)
Finds the next unselected Molecule.
StuntDouble * beginUnselected(int &i)
Finds the first unselected StuntDouble.
Torsion * nextSelectedTorsion(int &i)
Finds the next selected Torsion in the selection.
int getGlobalIndex()
Returns the global index of this ShortRangeInteraction.
One of the heavy-weight classes of OpenMD, SimInfo maintains objects and variables relating to the cu...
Definition SimInfo.hpp:93
"Don't move, or you're dead! Stand up! Captain, we've got them!"
int getGlobalIndex()
Returns the global index of this stuntDouble.
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.
@ INVERSION
Inversions.
@ STUNTDOUBLE
StuntDoubles (Atoms & RigidBodies)
@ TORSION
Torsions.
@ BEND
Bends.
@ BOND
Bonds.
@ MOLECULE
Molecules.