OpenMD 3.2
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 following paper when you publish your work:
33 *
34 * [1] Drisko et al., J. Open Source Softw. 9, 7004 (2024).
35 *
36 * Good starting points for code and simulation methodology are:
37 *
38 * [2] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).
39 * [3] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).
40 * [4] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).
41 * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
42 * [6] Kuang & Gezelter, Mol. Phys., 110, 691-701 (2012).
43 * [7] Lamichhane, Gezelter & Newman, J. Chem. Phys. 141, 134109 (2014).
44 * [8] Bhattarai, Newman & Gezelter, Phys. Rev. B 99, 094106 (2019).
45 * [9] Drisko & Gezelter, J. Chem. Theory Comput. 20, 4986-4997 (2024).
46 */
47
48#ifndef SELECTION_SELECTIONMANAGER_HPP
49#define SELECTION_SELECTIONMANAGER_HPP
50
51#include "primitives/Bend.hpp"
52#include "primitives/Bond.hpp"
57#include "selection/SelectionSet.hpp"
58
59namespace OpenMD {
60
61 class SimInfo;
62 class SelectionManager {
63 public:
64 SelectionManager(SimInfo* info);
65
66 void addSelection(StuntDouble* sd) {
67 ss_.bitsets_[STUNTDOUBLE].setBitOn(sd->getGlobalIndex());
68 }
69 void addSelection(Bond* b) {
70 ss_.bitsets_[BOND].setBitOn(b->getGlobalIndex());
71 }
72 void addSelection(Bend* b) {
73 ss_.bitsets_[BEND].setBitOn(b->getGlobalIndex());
74 }
75 void addSelection(Torsion* t) {
76 ss_.bitsets_[TORSION].setBitOn(t->getGlobalIndex());
77 }
78 void addSelection(Inversion* i) {
79 ss_.bitsets_[INVERSION].setBitOn(i->getGlobalIndex());
80 }
81 void addSelection(Molecule* m) {
82 ss_.bitsets_[MOLECULE].setBitOn(m->getGlobalIndex());
83 }
84
85 void addSelectionSet(const SelectionSet& bs) {
86 ss_.bitsets_[STUNTDOUBLE] |= bs.bitsets_[STUNTDOUBLE];
87 }
88 void addBondSelectionSet(const SelectionSet& bs) {
89 ss_.bitsets_[BOND] |= bs.bitsets_[BOND];
90 }
91 void addBendSelectionSet(const SelectionSet& bs) {
92 ss_.bitsets_[BEND] |= bs.bitsets_[BEND];
93 }
94 void addTorsionSelectionSet(const SelectionSet& bs) {
95 ss_.bitsets_[TORSION] |= bs.bitsets_[TORSION];
96 }
97 void addInversionSelectionSet(const SelectionSet& bs) {
98 ss_.bitsets_[INVERSION] |= bs.bitsets_[INVERSION];
99 }
100 void addMoleculeSelectionSet(const SelectionSet& bs) {
101 ss_.bitsets_[MOLECULE] |= bs.bitsets_[MOLECULE];
102 }
103
104 bool isEmpty() {
105 return ss_.bitsets_[STUNTDOUBLE].none() && ss_.bitsets_[BOND].none() &&
106 ss_.bitsets_[BEND].none() && ss_.bitsets_[TORSION].none() &&
107 ss_.bitsets_[INVERSION].none() && ss_.bitsets_[MOLECULE].none();
108 }
109
110 void setSelectionSet(const SelectionSet& bs) {
111 for (int i = 0; i < N_SELECTIONTYPES; i++)
112 ss_.bitsets_[i] = bs.bitsets_[i];
113 }
114
115 // void setSelectionSet(const SelectionSet& bs) {
116 // ss_.bitsets_[STUNTDOUBLE] = bs.bitsets_[];
117 //}
118 void setBondSelectionSet(const SelectionSet& bs) {
119 ss_.bitsets_[BOND] = bs.bitsets_[BOND];
120 }
121 void setBendSelectionSet(const SelectionSet& bs) {
122 ss_.bitsets_[BEND] = bs.bitsets_[BEND];
123 }
124 void setTorsionSelectionSet(const SelectionSet& bs) {
125 ss_.bitsets_[TORSION] = bs.bitsets_[TORSION];
126 }
127 void setInversionSelectionSet(const SelectionSet& bs) {
128 ss_.bitsets_[INVERSION] = bs.bitsets_[INVERSION];
129 }
130 void setMoleculeSelectionSet(const SelectionSet& bs) {
131 ss_.bitsets_[MOLECULE] = bs.bitsets_[MOLECULE];
132 }
133
134 std::vector<int> getSelectionCounts() {
135 std::vector<int> counts(N_SELECTIONTYPES, 0);
136 for (int i = 0; i < N_SELECTIONTYPES; i++) {
137 counts[i] = ss_.bitsets_[i].countBits();
138 }
139 return counts;
140 }
141
142 int getSelectionCount() { return ss_.bitsets_[STUNTDOUBLE].countBits(); }
143 int getBondSelectionCount() { return ss_.bitsets_[BOND].countBits(); }
144 int getBendSelectionCount() { return ss_.bitsets_[BEND].countBits(); }
145 int getTorsionSelectionCount() { return ss_.bitsets_[TORSION].countBits(); }
146 int getInversionSelectionCount() {
147 return ss_.bitsets_[INVERSION].countBits();
148 }
149 int getMoleculeSelectionCount() {
150 return ss_.bitsets_[MOLECULE].countBits();
151 }
152 SelectionSet getSelectionSet() { return ss_; }
153 /* SelectionSet getBondSelectionSet() {
154 return ss_.bitsets_[BOND];
155 }
156 SelectionSet getBendSelectionSet() {
157 return ss_.bitsets_[BEND];
158 }
159 SelectionSet getTorsionSelectionSet() {
160 return ss_.bitsets_[TORSION];
161 }
162 SelectionSet getInversionSelectionSet() {
163 return ss_.bitsets_[INVERSION];
164 }
165 */
166
167 void setSelection(StuntDouble* sd) {
168 ss_.bitsets_[STUNTDOUBLE].clearAll();
169 ss_.bitsets_[STUNTDOUBLE].setBitOn(sd->getGlobalIndex());
170 }
171 void setSelection(Bond* b) {
172 ss_.bitsets_[BOND].clearAll();
173 ss_.bitsets_[BOND].setBitOn(b->getGlobalIndex());
174 }
175 void setSelection(Bend* b) {
176 ss_.bitsets_[BEND].clearAll();
177 ss_.bitsets_[BEND].setBitOn(b->getGlobalIndex());
178 }
179 void setSelection(Torsion* t) {
180 ss_.bitsets_[TORSION].clearAll();
181 ss_.bitsets_[TORSION].setBitOn(t->getGlobalIndex());
182 }
183 void setSelection(Inversion* i) {
184 ss_.bitsets_[INVERSION].clearAll();
185 ss_.bitsets_[INVERSION].setBitOn(i->getGlobalIndex());
186 }
187 void setSelection(Molecule* m) {
188 ss_.bitsets_[MOLECULE].clearAll();
189 ss_.bitsets_[MOLECULE].setBitOn(m->getGlobalIndex());
190 }
191
192 void toggleSelection(StuntDouble* sd) {
193 ss_.bitsets_[STUNTDOUBLE].flip(sd->getGlobalIndex());
194 }
195 void toggleSelection(Bond* b) {
196 ss_.bitsets_[BOND].flip(b->getGlobalIndex());
197 }
198 void toggleSelection(Bend* b) {
199 ss_.bitsets_[BEND].flip(b->getGlobalIndex());
200 }
201 void toggleSelection(Torsion* t) {
202 ss_.bitsets_[TORSION].flip(t->getGlobalIndex());
203 }
204 void toggleSelection(Inversion* i) {
205 ss_.bitsets_[INVERSION].flip(i->getGlobalIndex());
206 }
207 void toggleSelection(Molecule* m) {
208 ss_.bitsets_[MOLECULE].flip(m->getGlobalIndex());
209 }
210
211 void toggleSelection() {
212 for (int i = 0; i < N_SELECTIONTYPES; i++)
213 ss_.bitsets_[i].flip();
214 }
215
216 void selectAll() {
217 for (int i = 0; i < N_SELECTIONTYPES; i++)
218 ss_.bitsets_[i].setAll();
219 }
220
221 void clearSelection() {
222 for (int i = 0; i < N_SELECTIONTYPES; i++)
223 ss_.bitsets_[i].clearAll();
224 }
225
226 SelectionManager replaceRigidBodiesWithAtoms() const;
227 SelectionManager removeAtomsInRigidBodies() const;
228
229 void clearSelection(StuntDouble* sd) {
230 ss_.bitsets_[STUNTDOUBLE].setBitOff(sd->getGlobalIndex());
231 }
232 void clearSelection(Bond* b) {
233 ss_.bitsets_[BOND].setBitOff(b->getGlobalIndex());
234 }
235 void clearSelection(Bend* b) {
236 ss_.bitsets_[BEND].setBitOff(b->getGlobalIndex());
237 }
238 void clearSelection(Torsion* t) {
239 ss_.bitsets_[TORSION].setBitOff(t->getGlobalIndex());
240 }
241 void clearSelection(Inversion* i) {
242 ss_.bitsets_[INVERSION].setBitOff(i->getGlobalIndex());
243 }
244 void clearSelection(Molecule* m) {
245 ss_.bitsets_[MOLECULE].setBitOff(m->getGlobalIndex());
246 }
247
248 bool isGlobalIDSelected(int globalIndex) {
249 return ss_.bitsets_[STUNTDOUBLE][globalIndex];
250 }
251 bool isSelected(StuntDouble* sd) {
252 return ss_.bitsets_[STUNTDOUBLE][sd->getGlobalIndex()];
253 }
254 bool isSelected(Bond* b) { return ss_.bitsets_[BOND][b->getGlobalIndex()]; }
255 bool isSelected(Bend* b) { return ss_.bitsets_[BEND][b->getGlobalIndex()]; }
256 bool isSelected(Torsion* t) {
257 return ss_.bitsets_[TORSION][t->getGlobalIndex()];
258 }
259 bool isSelected(Inversion* i) {
260 return ss_.bitsets_[INVERSION][i->getGlobalIndex()];
261 }
262 bool isSelected(Molecule* m) {
263 return ss_.bitsets_[MOLECULE][m->getGlobalIndex()];
264 }
265
266 /**
267 * Finds the first selected StuntDouble in the selection. In
268 * parallel, this is the first selected StuntDouble that is the
269 * responsibility of the local processor, not the first
270 * StuntDouble in the global selection.
271 * @return a pointer to the StuntDouble object, returns NULL if no
272 * StuntDouble was found.
273 * @param i iterator used to keep track of the selection
274 */
275 StuntDouble* beginSelected(int& i);
276 /**
277 * Finds the next selected StuntDouble in the selection. In
278 * parallel, this is the next selected StuntDouble that is the
279 * responsibility of the local processor, not the next
280 * StuntDouble in the global selection.
281 * @return a pointer to the StuntDouble object, returns NULL if no
282 * StuntDouble was found.
283 * @param i iterator used to keep track of the selection
284 */
285 StuntDouble* nextSelected(int& i);
286 /**
287 * Finds the first unselected StuntDouble. In
288 * parallel, this is the first unselected StuntDouble that is the
289 * responsibility of the local processor, not the first
290 * StuntDouble in the global unselected pool.
291 * @return a pointer to the StuntDouble object, returns NULL if no
292 * StuntDouble was found.
293 * @param i iterator used to keep track of the selection
294 */
296 /**
297 * Finds the next unselected StuntDouble. In
298 * parallel, this is the next unselected StuntDouble that is the
299 * responsibility of the local processor, not the next
300 * StuntDouble in the global unselected pool.
301 * @return a pointer to the StuntDouble object, returns NULL if no
302 * StuntDouble was found.
303 * @param i iterator used to keep track of the selection
304 */
306 /**
307 * Finds the first selected Bond in the selection. In parallel,
308 * this is the first selected Bond that is the responsibility of
309 * the local processor, not the first Bond in the global
310 * selection.
311 * @return a pointer to the Bond object, returns NULL if no Bond was found.
312 * @param i iterator used to keep track of the selection
313 */
314 Bond* beginSelectedBond(int& i);
315 /**
316 * Finds the next selected Bond in the selection. In parallel,
317 * this is the next selected Bond that is the responsibility of
318 * the local processor, not the next Bond in the global selection.
319 * @return a pointer to the Bond object, returns NULL if no Bond was found.
320 * @param i iterator used to keep track of the selection
321 */
322 Bond* nextSelectedBond(int& i);
323 /**
324 * Finds the first unselected Bond. In parallel, this is the
325 * first unselected Bond that is the responsibility of the local
326 * processor, not the first Bond in the global unselected pool.
327 * @return a pointer to the Bond object, returns NULL if no Bond was found.
328 * @param i iterator used to keep track of the selection
329 */
330 Bond* beginUnselectedBond(int& i);
331 /**
332 * Finds the next unselected Bond. In parallel, this is the
333 * next unselected Bond that is the responsibility of the local
334 * processor, not the next Bond in the global unselected pool.
335 * @return a pointer to the Bond object, returns NULL if no Bond was found.
336 * @param i iterator used to keep track of the selection
337 */
338 Bond* nextUnselectedBond(int& i);
339
340 /**
341 * Finds the first selected Bend in the selection. In parallel,
342 * this is the first selected Bend that is the responsibility of
343 * the local processor, not the first Bend in the global
344 * selection.
345 * @return a pointer to the Bend object, returns NULL if no Bend was found.
346 * @param i iterator used to keep track of the selection
347 */
348 Bend* beginSelectedBend(int& i);
349 /**
350 * Finds the next selected Bend in the selection. In parallel,
351 * this is the next selected Bend that is the responsibility of
352 * the local processor, not the next Bend in the global selection.
353 * @return a pointer to the Bend object, returns NULL if no Bend was found.
354 * @param i iterator used to keep track of the selection
355 */
356 Bend* nextSelectedBend(int& i);
357 /**
358 * Finds the first unselected Bend. In parallel, this is the
359 * first unselected Bend that is the responsibility of the local
360 * processor, not the first Bend in the global unselected pool.
361 * @return a pointer to the Bend object, returns NULL if no Bend was found.
362 * @param i iterator used to keep track of the selection
363 */
364 Bend* beginUnselectedBend(int& i);
365 /**
366 * Finds the next unselected Bend. In parallel, this is the
367 * next unselected Bend that is the responsibility of the local
368 * processor, not the next Bend in the global unselected pool.
369 * @return a pointer to the Bend object, returns NULL if no Bend was found.
370 * @param i iterator used to keep track of the selection
371 */
372 Bend* nextUnselectedBend(int& i);
373 /**
374 * Finds the first selected Torsion in the selection. In parallel,
375 * this is the first selected Torsion that is the responsibility of
376 * the local processor, not the first Torsion in the global
377 * selection.
378 * @return a pointer to the Torsion object, returns NULL if no Torsion was
379 * found.
380 * @param i iterator used to keep track of the selection
381 */
383 /**
384 * Finds the next selected Torsion in the selection. In parallel,
385 * this is the next selected Torsion that is the responsibility of
386 * the local processor, not the next Torsion in the global selection.
387 * @return a pointer to the Torsion object, returns NULL if no Torsion was
388 * found.
389 * @param i iterator used to keep track of the selection
390 */
392 /**
393 * Finds the first unselected Torsion. In parallel, this is the
394 * first unselected Torsion that is the responsibility of the local
395 * processor, not the first Torsion in the global unselected pool.
396 * @return a pointer to the Torsion object, returns NULL if no Torsion was
397 * found.
398 * @param i iterator used to keep track of the selection
399 */
401 /**
402 * Finds the next unselected Torsion. In parallel, this is the
403 * next unselected Torsion that is the responsibility of the local
404 * processor, not the next Torsion in the global unselected pool.
405 * @return a pointer to the Torsion object, returns NULL if no Torsion was
406 * found.
407 * @param i iterator used to keep track of the selection
408 */
410 /**
411 * Finds the first selected Inversion in the selection. In parallel,
412 * this is the first selected Inversion that is the responsibility of
413 * the local processor, not the first Inversion in the global
414 * selection.
415 * @return a pointer to the Inversion object, returns NULL if no Inversion
416 * was found.
417 * @param i iterator used to keep track of the selection
418 */
420 /**
421 * Finds the next selected Inversion in the selection. In parallel,
422 * this is the next selected Inversion that is the responsibility of
423 * the local processor, not the next Inversion in the global selection.
424 * @return a pointer to the Inversion object, returns NULL if no Inversion
425 * was found.
426 * @param i iterator used to keep track of the selection
427 */
429 /**
430 * Finds the first unselected Inversion. In parallel, this is the
431 * first unselected Inversion that is the responsibility of the local
432 * processor, not the first Inversion in the global unselected pool.
433 * @return a pointer to the Inversion object, returns NULL if no Inversion
434 * was found.
435 * @param i iterator used to keep track of the selection
436 */
438 /**
439 * Finds the next unselected Inversion. In parallel, this is the
440 * next unselected Inversion that is the responsibility of the local
441 * processor, not the next Inversion in the global unselected pool.
442 * @return a pointer to the Inversion object, returns NULL if no Inversion
443 * was found.
444 * @param i iterator used to keep track of the selection
445 */
447 /**
448 * Finds the first selected Molecule in the selection. In parallel,
449 * this is the first selected Molecule that is the responsibility of
450 * the local processor, not the first Molecule in the global
451 * selection.
452 * @return a pointer to the Molecule object, returns NULL if no Molecule was
453 * found.
454 * @param i iterator used to keep track of the selection
455 */
457 /**
458 * Finds the next selected Molecule in the selection. In parallel,
459 * this is the next selected Molecule that is the responsibility of
460 * the local processor, not the next Molecule in the global selection.
461 * @return a pointer to the Molecule object, returns NULL if no Molecule was
462 * found.
463 * @param i iterator used to keep track of the selection
464 */
466 /**
467 * Finds the first unselected Molecule. In parallel, this is the
468 * first unselected Molecule that is the responsibility of the local
469 * processor, not the first Molecule in the global unselected pool.
470 * @return a pointer to the Molecule object, returns NULL if no Molecule was
471 * found.
472 * @param i iterator used to keep track of the selection
473 */
475 /**
476 * Finds the next unselected Molecule. In parallel, this is the
477 * next unselected Molecule that is the responsibility of the local
478 * processor, not the next Molecule in the global unselected pool.
479 * @return a pointer to the Molecule object, returns NULL if no Molecule was
480 * found.
481 * @param i iterator used to keep track of the selection
482 */
484
485 /**
486 * Finds the n^th selected Molecule in the selection. In parallel,
487 * if this molecule is not the responsibility of the local
488 * processor, a NULL is returned.
489 * @return a pointer to the Molecule object, returns NULL if no Molecule was
490 * found.
491 * @param n which molecule in the selection set to find
492 */
494
495 AtomTypeSet getSelectedAtomTypes();
496 MoleculeStampSet getSelectedMoleculeStamps();
497
498 SelectionManager& operator&=(const SelectionManager& sman) {
499 for (int i = 0; i < N_SELECTIONTYPES; i++)
500 ss_.bitsets_[i] &= sman.ss_.bitsets_[i];
501 return *this;
502 }
503
504 SelectionManager& operator|=(const SelectionManager& sman) {
505 for (int i = 0; i < N_SELECTIONTYPES; i++)
506 ss_.bitsets_[i] |= sman.ss_.bitsets_[i];
507 return *this;
508 }
509
510 SelectionManager& operator^=(const SelectionManager& sman) {
511 for (int i = 0; i < N_SELECTIONTYPES; i++)
512 ss_.bitsets_[i] ^= sman.ss_.bitsets_[i];
513 return *this;
514 }
515
516 SelectionManager& operator-=(const SelectionManager& sman) {
517 for (int i = 0; i < N_SELECTIONTYPES; i++)
518 ss_.bitsets_[i] -= sman.ss_.bitsets_[i];
519 return *this;
520 }
521
522 friend SelectionManager operator|(const SelectionManager& sman1,
523 const SelectionManager& sman2);
524 friend SelectionManager operator&(const SelectionManager& sman1,
525 const SelectionManager& sman2);
526 friend SelectionManager operator^(const SelectionManager& sman1,
527 const SelectionManager& sman2);
528 friend SelectionManager operator-(const SelectionManager& sman1,
529 const SelectionManager& sman2);
530
531 private:
532 SimInfo* info_ {nullptr};
533 SelectionSet ss_;
534 std::vector<int> nObjects_;
535 std::vector<StuntDouble*> stuntdoubles_;
536 std::vector<Bond*> bonds_;
537 std::vector<Bend*> bends_;
538 std::vector<Torsion*> torsions_;
539 std::vector<Inversion*> inversions_;
540 std::vector<Molecule*> molecules_;
541 };
542} // namespace OpenMD
543
544#endif
int getGlobalIndex()
Returns the global index of this molecule.
Definition Molecule.hpp:109
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:96
"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.