OpenMD 3.0
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 void clearSelection(StuntDouble* sd) {
224 ss_.bitsets_[STUNTDOUBLE].setBitOff(sd->getGlobalIndex());
225 }
226 void clearSelection(Bond* b) {
227 ss_.bitsets_[BOND].setBitOff(b->getGlobalIndex());
228 }
229 void clearSelection(Bend* b) {
230 ss_.bitsets_[BEND].setBitOff(b->getGlobalIndex());
231 }
232 void clearSelection(Torsion* t) {
233 ss_.bitsets_[TORSION].setBitOff(t->getGlobalIndex());
234 }
235 void clearSelection(Inversion* i) {
236 ss_.bitsets_[INVERSION].setBitOff(i->getGlobalIndex());
237 }
238 void clearSelection(Molecule* m) {
239 ss_.bitsets_[MOLECULE].setBitOff(m->getGlobalIndex());
240 }
241
242 bool isGlobalIDSelected(int globalIndex) {
243 return ss_.bitsets_[STUNTDOUBLE][globalIndex];
244 }
245 bool isSelected(StuntDouble* sd) {
246 return ss_.bitsets_[STUNTDOUBLE][sd->getGlobalIndex()];
247 }
248 bool isSelected(Bond* b) { return ss_.bitsets_[BOND][b->getGlobalIndex()]; }
249 bool isSelected(Bend* b) { return ss_.bitsets_[BEND][b->getGlobalIndex()]; }
250 bool isSelected(Torsion* t) {
251 return ss_.bitsets_[TORSION][t->getGlobalIndex()];
252 }
253 bool isSelected(Inversion* i) {
254 return ss_.bitsets_[INVERSION][i->getGlobalIndex()];
255 }
256 bool isSelected(Molecule* m) {
257 return ss_.bitsets_[MOLECULE][m->getGlobalIndex()];
258 }
259
260 /**
261 * Finds the first selected StuntDouble in the selection. In
262 * parallel, this is the first selected StuntDouble that is the
263 * responsibility of the local processor, not the first
264 * StuntDouble in the global selection.
265 * @return a pointer to the StuntDouble object, returns NULL if no
266 * StuntDouble was found.
267 * @param i iterator used to keep track of the selection
268 */
269 StuntDouble* beginSelected(int& i);
270 /**
271 * Finds the next selected StuntDouble in the selection. In
272 * parallel, this is the next selected StuntDouble that is the
273 * responsibility of the local processor, not the next
274 * StuntDouble in the global selection.
275 * @return a pointer to the StuntDouble object, returns NULL if no
276 * StuntDouble was found.
277 * @param i iterator used to keep track of the selection
278 */
279 StuntDouble* nextSelected(int& i);
280 /**
281 * Finds the first unselected StuntDouble. In
282 * parallel, this is the first unselected StuntDouble that is the
283 * responsibility of the local processor, not the first
284 * StuntDouble in the global unselected pool.
285 * @return a pointer to the StuntDouble object, returns NULL if no
286 * StuntDouble was found.
287 * @param i iterator used to keep track of the selection
288 */
290 /**
291 * Finds the next unselected StuntDouble. In
292 * parallel, this is the next unselected StuntDouble that is the
293 * responsibility of the local processor, not the next
294 * StuntDouble in the global unselected pool.
295 * @return a pointer to the StuntDouble object, returns NULL if no
296 * StuntDouble was found.
297 * @param i iterator used to keep track of the selection
298 */
300 /**
301 * Finds the first selected Bond in the selection. In parallel,
302 * this is the first selected Bond that is the responsibility of
303 * the local processor, not the first Bond in the global
304 * selection.
305 * @return a pointer to the Bond object, returns NULL if no Bond was found.
306 * @param i iterator used to keep track of the selection
307 */
308 Bond* beginSelectedBond(int& i);
309 /**
310 * Finds the next selected Bond in the selection. In parallel,
311 * this is the next selected Bond that is the responsibility of
312 * the local processor, not the next Bond in the global selection.
313 * @return a pointer to the Bond object, returns NULL if no Bond was found.
314 * @param i iterator used to keep track of the selection
315 */
316 Bond* nextSelectedBond(int& i);
317 /**
318 * Finds the first unselected Bond. In parallel, this is the
319 * first unselected Bond that is the responsibility of the local
320 * processor, not the first Bond in the global unselected pool.
321 * @return a pointer to the Bond object, returns NULL if no Bond was found.
322 * @param i iterator used to keep track of the selection
323 */
324 Bond* beginUnselectedBond(int& i);
325 /**
326 * Finds the next unselected Bond. In parallel, this is the
327 * next unselected Bond that is the responsibility of the local
328 * processor, not the next Bond in the global unselected pool.
329 * @return a pointer to the Bond object, returns NULL if no Bond was found.
330 * @param i iterator used to keep track of the selection
331 */
332 Bond* nextUnselectedBond(int& i);
333
334 /**
335 * Finds the first selected Bend in the selection. In parallel,
336 * this is the first selected Bend that is the responsibility of
337 * the local processor, not the first Bend in the global
338 * selection.
339 * @return a pointer to the Bend object, returns NULL if no Bend was found.
340 * @param i iterator used to keep track of the selection
341 */
342 Bend* beginSelectedBend(int& i);
343 /**
344 * Finds the next selected Bend in the selection. In parallel,
345 * this is the next selected Bend that is the responsibility of
346 * the local processor, not the next Bend in the global selection.
347 * @return a pointer to the Bend object, returns NULL if no Bend was found.
348 * @param i iterator used to keep track of the selection
349 */
350 Bend* nextSelectedBend(int& i);
351 /**
352 * Finds the first unselected Bend. In parallel, this is the
353 * first unselected Bend that is the responsibility of the local
354 * processor, not the first Bend in the global unselected pool.
355 * @return a pointer to the Bend object, returns NULL if no Bend was found.
356 * @param i iterator used to keep track of the selection
357 */
358 Bend* beginUnselectedBend(int& i);
359 /**
360 * Finds the next unselected Bend. In parallel, this is the
361 * next unselected Bend that is the responsibility of the local
362 * processor, not the next Bend in the global unselected pool.
363 * @return a pointer to the Bend object, returns NULL if no Bend was found.
364 * @param i iterator used to keep track of the selection
365 */
366 Bend* nextUnselectedBend(int& i);
367 /**
368 * Finds the first selected Torsion in the selection. In parallel,
369 * this is the first selected Torsion that is the responsibility of
370 * the local processor, not the first Torsion in the global
371 * selection.
372 * @return a pointer to the Torsion object, returns NULL if no Torsion was
373 * found.
374 * @param i iterator used to keep track of the selection
375 */
377 /**
378 * Finds the next selected Torsion in the selection. In parallel,
379 * this is the next selected Torsion that is the responsibility of
380 * the local processor, not the next Torsion in the global selection.
381 * @return a pointer to the Torsion object, returns NULL if no Torsion was
382 * found.
383 * @param i iterator used to keep track of the selection
384 */
386 /**
387 * Finds the first unselected Torsion. In parallel, this is the
388 * first unselected Torsion that is the responsibility of the local
389 * processor, not the first Torsion in the global unselected pool.
390 * @return a pointer to the Torsion object, returns NULL if no Torsion was
391 * found.
392 * @param i iterator used to keep track of the selection
393 */
395 /**
396 * Finds the next unselected Torsion. In parallel, this is the
397 * next unselected Torsion that is the responsibility of the local
398 * processor, not the next Torsion in the global unselected pool.
399 * @return a pointer to the Torsion object, returns NULL if no Torsion was
400 * found.
401 * @param i iterator used to keep track of the selection
402 */
404 /**
405 * Finds the first selected Inversion in the selection. In parallel,
406 * this is the first selected Inversion that is the responsibility of
407 * the local processor, not the first Inversion in the global
408 * selection.
409 * @return a pointer to the Inversion object, returns NULL if no Inversion
410 * was found.
411 * @param i iterator used to keep track of the selection
412 */
414 /**
415 * Finds the next selected Inversion in the selection. In parallel,
416 * this is the next selected Inversion that is the responsibility of
417 * the local processor, not the next Inversion in the global selection.
418 * @return a pointer to the Inversion object, returns NULL if no Inversion
419 * was found.
420 * @param i iterator used to keep track of the selection
421 */
423 /**
424 * Finds the first unselected Inversion. In parallel, this is the
425 * first unselected Inversion that is the responsibility of the local
426 * processor, not the first Inversion in the global unselected pool.
427 * @return a pointer to the Inversion object, returns NULL if no Inversion
428 * was found.
429 * @param i iterator used to keep track of the selection
430 */
432 /**
433 * Finds the next unselected Inversion. In parallel, this is the
434 * next unselected Inversion that is the responsibility of the local
435 * processor, not the next Inversion in the global unselected pool.
436 * @return a pointer to the Inversion object, returns NULL if no Inversion
437 * was found.
438 * @param i iterator used to keep track of the selection
439 */
441 /**
442 * Finds the first selected Molecule in the selection. In parallel,
443 * this is the first selected Molecule that is the responsibility of
444 * the local processor, not the first Molecule in the global
445 * selection.
446 * @return a pointer to the Molecule object, returns NULL if no Molecule was
447 * found.
448 * @param i iterator used to keep track of the selection
449 */
451 /**
452 * Finds the next selected Molecule in the selection. In parallel,
453 * this is the next selected Molecule that is the responsibility of
454 * the local processor, not the next Molecule in the global selection.
455 * @return a pointer to the Molecule object, returns NULL if no Molecule was
456 * found.
457 * @param i iterator used to keep track of the selection
458 */
460 /**
461 * Finds the first unselected Molecule. In parallel, this is the
462 * first unselected Molecule that is the responsibility of the local
463 * processor, not the first Molecule in the global unselected pool.
464 * @return a pointer to the Molecule object, returns NULL if no Molecule was
465 * found.
466 * @param i iterator used to keep track of the selection
467 */
469 /**
470 * Finds the next unselected Molecule. In parallel, this is the
471 * next unselected Molecule that is the responsibility of the local
472 * processor, not the next Molecule in the global unselected pool.
473 * @return a pointer to the Molecule object, returns NULL if no Molecule was
474 * found.
475 * @param i iterator used to keep track of the selection
476 */
478
479 /**
480 * Finds the n^th selected Molecule in the selection. In parallel,
481 * if this molecule is not the responsibility of the local
482 * processor, a NULL is returned.
483 * @return a pointer to the Molecule object, returns NULL if no Molecule was
484 * found.
485 * @param n which molecule in the selection set to find
486 */
488
489 AtomTypeSet getSelectedAtomTypes();
490
491 SelectionManager& operator&=(const SelectionManager& sman) {
492 for (int i = 0; i < N_SELECTIONTYPES; i++)
493 ss_.bitsets_[i] &= sman.ss_.bitsets_[i];
494 return *this;
495 }
496
497 SelectionManager& operator|=(const SelectionManager& sman) {
498 for (int i = 0; i < N_SELECTIONTYPES; i++)
499 ss_.bitsets_[i] |= sman.ss_.bitsets_[i];
500 return *this;
501 }
502
503 SelectionManager& operator^=(const SelectionManager& sman) {
504 for (int i = 0; i < N_SELECTIONTYPES; i++)
505 ss_.bitsets_[i] ^= sman.ss_.bitsets_[i];
506 return *this;
507 }
508
509 SelectionManager& operator-=(const SelectionManager& sman) {
510 for (int i = 0; i < N_SELECTIONTYPES; i++)
511 ss_.bitsets_[i] -= sman.ss_.bitsets_[i];
512 return *this;
513 }
514
515 friend SelectionManager operator|(const SelectionManager& sman1,
516 const SelectionManager& sman2);
517 friend SelectionManager operator&(const SelectionManager& sman1,
518 const SelectionManager& sman2);
519 friend SelectionManager operator^(const SelectionManager& sman1,
520 const SelectionManager& sman2);
521 friend SelectionManager operator-(const SelectionManager& sman1,
522 const SelectionManager& sman2);
523
524 private:
525 SimInfo* info_ {nullptr};
526 SelectionSet ss_;
527 std::vector<int> nObjects_;
528 std::vector<StuntDouble*> stuntdoubles_;
529 std::vector<Bond*> bonds_;
530 std::vector<Bend*> bends_;
531 std::vector<Torsion*> torsions_;
532 std::vector<Inversion*> inversions_;
533 std::vector<Molecule*> molecules_;
534 };
535} // namespace OpenMD
536
537#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.