ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
Particle.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010-2022 The ESPResSo project
3 *
4 * This file is part of ESPResSo.
5 *
6 * ESPResSo is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * ESPResSo is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22#include "config/config.hpp"
23
24#include "BondList.hpp"
25#include "PropagationMode.hpp"
26
27#include <utils/Vector.hpp>
30#include <utils/quaternion.hpp>
31
32#include <boost/container/vector.hpp>
33#include <boost/serialization/is_bitwise_serializable.hpp>
34#include <boost/serialization/level.hpp>
35#include <boost/serialization/vector.hpp>
36
37#include <algorithm>
38#include <cassert>
39#include <cstdint>
40#include <vector>
41
42namespace detail {
43inline bool get_nth_bit(uint8_t const bitfield, unsigned int const bit_idx) {
44 return bitfield & (1u << bit_idx);
45}
46} // namespace detail
47
48#ifdef ENGINE
49/** Properties of a self-propelled particle. */
51 /** Imposed constant force. */
52 double f_swim = 0.;
53 /** Is the particle a swimmer. */
54 bool swimming = false;
55 /** Whether f_swim is applied to the particle or to the fluid. */
57
58 template <class Archive> void serialize(Archive &ar, long int /* version */) {
60 }
61};
62#endif
63
64/** Properties of a particle which are not supposed to
65 * change during the integration, but have to be known
66 * for all ghosts. Ghosts are particles which are
67 * needed in the interaction calculation, but are just copies of
68 * particles stored on different nodes.
69 */
71 /** unique identifier for the particle. */
72 int identity = -1;
73 /** Molecule identifier. */
74 int mol_id = 0;
75 /** particle type, used for non-bonded interactions. */
76 int type = 0;
77 /** which propagation schemes should be applied to the particle **/
79
80#ifdef ROTATION
81 /** Bitfield for the particle axes of rotation.
82 * Values:
83 * - 0: no rotation
84 * - 1: allow rotation around the x axis
85 * - 2: allow rotation around the y axis
86 * - 4: allow rotation around the z axis
87 * By default, the particle cannot rotate.
88 */
89 uint8_t rotation = static_cast<uint8_t>(0b000u);
90#else
91 /** Bitfield for the particle axes of rotation. Particle cannot rotate. */
92 static constexpr uint8_t rotation = static_cast<uint8_t>(0b000u);
93#endif
94
95#ifdef EXTERNAL_FORCES
96 /** Flag for fixed particle coordinates.
97 * Values:
98 * - 0: no fixed coordinates
99 * - 1: fix translation along the x axis
100 * - 2: fix translation along the y axis
101 * - 4: fix translation along the z axis
102 */
103 uint8_t ext_flag = static_cast<uint8_t>(0b000u);
104#else // EXTERNAL_FORCES
105 /** Bitfield for fixed particle coordinates. Coordinates cannot be fixed. */
106 static constexpr uint8_t ext_flag = static_cast<uint8_t>(0b000u);
107#endif // EXTERNAL_FORCES
108
109 /** particle mass */
110#ifdef MASS
111 double mass = 1.0;
112#else
113 constexpr static double mass{1.0};
114#endif
115
116 /** rotational inertia */
117#ifdef ROTATIONAL_INERTIA
118 Utils::Vector3d rinertia = {1., 1., 1.};
119#else
120 static constexpr Utils::Vector3d rinertia = {1., 1., 1.};
121#endif
122
123 /** charge. */
124#ifdef ELECTROSTATICS
125 double q = 0.0;
126#else
127 constexpr static double q{0.0};
128#endif
129
130#ifdef LB_ELECTROHYDRODYNAMICS
131 /** electrophoretic mobility times E-field: mu_0 * E */
132 Utils::Vector3d mu_E = {0., 0., 0.};
133#endif
134
135#ifdef DIPOLES
136 /** dipole moment (absolute value) */
137 double dipm = 0.;
138#endif
139
140#ifdef DIPOLE_FIELD_TRACKING
141 /** total dipole field */
142 Utils::Vector3d dip_fld = {0., 0., 0.};
143#endif
144
145#ifdef VIRTUAL_SITES_RELATIVE
146 /** The following properties define, with respect to which real particle a
147 * virtual site is placed and at what distance. The relative orientation of
148 * the vector pointing from real particle to virtual site with respect to the
149 * orientation of the real particle is stored in the virtual site's
150 * quaternion attribute.
151 */
154 double distance = 0.;
155 /** Relative position of the virtual site. */
158 /** Orientation of the virtual particle in the body fixed frame. */
160
161 template <class Archive> void serialize(Archive &ar, long int) {
162 ar & to_particle_id;
163 ar & distance;
164 ar & rel_orientation;
165 ar & quat;
166 }
168#endif // VIRTUAL_SITES_RELATIVE
169
170#ifdef THERMOSTAT_PER_PARTICLE
171/** Friction coefficient for translation */
172#ifndef PARTICLE_ANISOTROPY
173 double gamma = -1.;
174#else
175 Utils::Vector3d gamma = {-1., -1., -1.};
176#endif // PARTICLE_ANISOTROPY
177#ifdef ROTATION
178/** Friction coefficient for rotation */
179#ifndef PARTICLE_ANISOTROPY
180 double gamma_rot = -1.;
181#else
182 Utils::Vector3d gamma_rot = {-1., -1., -1.};
183#endif // PARTICLE_ANISOTROPY
184#endif // ROTATION
185#endif // THERMOSTAT_PER_PARTICLE
186
187#ifdef EXTERNAL_FORCES
188 /** External force. */
190#ifdef ROTATION
191 /** External torque. */
193#endif // ROTATION
194#endif // EXTERNAL_FORCES
195
196#ifdef ENGINE
198#endif
199
200 template <class Archive> void serialize(Archive &ar, long int /* version */) {
201 ar & identity;
202 ar & mol_id;
203 ar & type;
204 ar & propagation;
205
206#ifdef MASS
207 ar & mass;
208#endif
209#ifdef ROTATIONAL_INERTIA
210 ar & rinertia;
211#endif
212#ifdef ROTATION
213 ar & rotation;
214#endif
215#ifdef ELECTROSTATICS
216 ar & q;
217#endif
218
219#ifdef LB_ELECTROHYDRODYNAMICS
220 ar & mu_E;
221#endif
222#ifdef DIPOLES
223 ar & dipm;
224#endif
225#ifdef DIPOLE_FIELD_TRACKING
226 ar & dip_fld;
227#endif
228#ifdef VIRTUAL_SITES_RELATIVE
229 ar & vs_relative;
230#endif
231
232#ifdef THERMOSTAT_PER_PARTICLE
233 ar & gamma;
234#ifdef ROTATION
235 ar & gamma_rot;
236#endif
237#endif // THERMOSTAT_PER_PARTICLE
238#ifdef EXTERNAL_FORCES
239 ar & ext_flag;
240 ar & ext_force;
241#ifdef ROTATION
242 ar & ext_torque;
243#endif
244#endif // EXTERNAL_FORCES
245
246#ifdef ENGINE
247 ar & swim;
248#endif
249 }
250};
251
252/** Positional information on a particle. Information that is
253 * communicated to calculate interactions with ghost particles.
254 */
256 /** periodically folded position. */
257 Utils::Vector3d p = {0., 0., 0.};
258 /** index of the simulation box image where the particle really sits. */
259 Utils::Vector3i i = {0, 0, 0};
260
261#ifdef ROTATION
262 /** quaternion to define particle orientation */
264 /** unit director calculated from the quaternion */
268#endif
269
270#ifdef BOND_CONSTRAINT
271 /** particle position at the previous time step (RATTLE algorithm) */
273#endif
274
275 template <class Archive> void serialize(Archive &ar, long int /* version */) {
276 ar & p;
277 ar & i;
278#ifdef ROTATION
279 ar & quat;
280#endif
281#ifdef BOND_CONSTRAINT
282 ar & p_last_timestep;
283#endif
284 }
285};
286
287/** Force information on a particle. Forces of ghost particles are
288 * collected and added up to the force of the original particle.
289 */
291 ParticleForce() = default;
292 ParticleForce(ParticleForce const &) = default;
295#ifdef ROTATION
298#endif
299
301 ParticleForce const &rhs) {
302 ParticleForce result = lhs;
303 result += rhs;
304 return result;
305 }
306
308 f += rhs.f;
309#ifdef ROTATION
310 torque += rhs.torque;
311#endif
312 return *this;
313 }
314
315 /** force. */
316 Utils::Vector3d f = {0., 0., 0.};
317
318#ifdef ROTATION
319 /** torque. */
320 Utils::Vector3d torque = {0., 0., 0.};
321#endif
322
323 template <class Archive> void serialize(Archive &ar, long int /* version */) {
324 ar & f;
325#ifdef ROTATION
326 ar & torque;
327#endif
328 }
329};
330
331/** Momentum information on a particle. Information not contained in
332 * communication of ghost particles so far, but a communication would
333 * be necessary for velocity-dependent potentials.
334 */
336 /** velocity. */
337 Utils::Vector3d v = {0., 0., 0.};
338
339#ifdef ROTATION
340 /** angular velocity.
341 * ALWAYS IN PARTICLE FIXED, I.E., CO-ROTATING COORDINATE SYSTEM.
342 */
343 Utils::Vector3d omega = {0., 0., 0.};
344#endif
345
346 template <class Archive> void serialize(Archive &ar, long int /* version */) {
347 ar & v;
348#ifdef ROTATION
349 ar & omega;
350#endif
351 }
352};
353
354/** Information on a particle that is needed only on the
355 * node the particle belongs to.
356 */
358 /** is particle a ghost particle. */
359 bool ghost = false;
360 short int lees_edwards_flag = 0;
361 /** position from the last Verlet list update. */
362 Utils::Vector3d p_old = {0., 0., 0.};
363 /** Accumulated applied Lees-Edwards offset. */
365
366 template <class Archive> void serialize(Archive &ar, long int /* version */) {
367 ar & ghost;
369 ar & p_old;
371 }
372};
373
374#ifdef BOND_CONSTRAINT
376 /** position/velocity correction */
378
380 ParticleRattle const &rhs) {
381 return {lhs.correction + rhs.correction};
382 }
383
385 return *this = *this + rhs;
386 }
387
388 template <class Archive> void serialize(Archive &ar, long int /* version */) {
389 ar & correction;
390 }
391};
392#endif
393
394/** Struct holding all information for one particle. */
395struct Particle { // NOLINT(bugprone-exception-escape)
396private:
402#ifdef BOND_CONSTRAINT
403 ParticleRattle rattle;
404#endif
405 BondList bl;
406#ifdef EXCLUSIONS
407 /** list of particles, with which this particle has no non-bonded
408 * interactions
409 */
411#endif
412
413public:
414 auto const &id() const { return p.identity; }
415 auto &id() { return p.identity; }
416 auto const &mol_id() const { return p.mol_id; }
417 auto &mol_id() { return p.mol_id; }
418 auto const &type() const { return p.type; }
419 auto &type() { return p.type; }
420
421 auto const &propagation() const { return p.propagation; }
422 auto &propagation() { return p.propagation; }
423
424 bool operator==(Particle const &rhs) const { return id() == rhs.id(); }
425
426 bool operator!=(Particle const &rhs) const { return id() != rhs.id(); }
427
428 auto const &bonds() const { return bl; }
429 auto &bonds() { return bl; }
430
431 auto const &pos() const { return r.p; }
432 auto &pos() { return r.p; }
433 auto const &v() const { return m.v; }
434 auto &v() { return m.v; }
435 auto const &force() const { return f.f; }
436 auto &force() { return f.f; }
437 auto const &force_and_torque() const { return f; }
438 auto &force_and_torque() { return f; }
439
440 bool is_ghost() const { return l.ghost; }
441 void set_ghost(bool const ghost_flag) { l.ghost = ghost_flag; }
442 auto &pos_at_last_verlet_update() { return l.p_old; }
443 auto const &pos_at_last_verlet_update() const { return l.p_old; }
444 auto const &image_box() const { return r.i; }
445 auto &image_box() { return r.i; }
446 auto const &lees_edwards_offset() const { return l.lees_edwards_offset; }
448 auto const &lees_edwards_flag() const { return l.lees_edwards_flag; }
450
451#ifdef MASS
452 auto const &mass() const { return p.mass; }
453 auto &mass() { return p.mass; }
454#else
455 constexpr auto &mass() const { return p.mass; }
456#endif
457#ifdef ROTATION
458 auto const &rotation() const { return p.rotation; }
459 auto &rotation() { return p.rotation; }
460 bool can_rotate() const { return static_cast<bool>(p.rotation); }
461 bool can_rotate_around(unsigned int const axis) const {
462 assert(axis <= 2u);
463 return detail::get_nth_bit(p.rotation, axis);
464 }
465 void set_can_rotate_around(unsigned int const axis, bool const rot_flag) {
466 assert(axis <= 2u);
467 if (rot_flag) {
468 p.rotation |= static_cast<uint8_t>(1u << axis);
469 } else {
470 p.rotation &= static_cast<uint8_t>(~(1u << axis));
471 }
472 }
473 void set_can_rotate_all_axes() { p.rotation = static_cast<uint8_t>(0b111u); }
475 p.rotation = static_cast<uint8_t>(0b000u);
476 }
477 auto const &quat() const { return r.quat; }
478 auto &quat() { return r.quat; }
479 auto const &torque() const { return f.torque; }
480 auto &torque() { return f.torque; }
481 auto const &omega() const { return m.omega; }
482 auto &omega() { return m.omega; }
483#ifdef EXTERNAL_FORCES
484 auto const &ext_torque() const { return p.ext_torque; }
485 auto &ext_torque() { return p.ext_torque; }
486#endif // EXTERNAL_FORCES
487 auto calc_director() const { return r.calc_director(); }
488#else // ROTATION
489 auto can_rotate() const { return false; }
490 auto can_rotate_around(unsigned int const axis) const { return false; }
491#endif // ROTATION
492#ifdef DIPOLES
493 auto const &dipm() const { return p.dipm; }
494 auto &dipm() { return p.dipm; }
495 auto calc_dip() const { return calc_director() * dipm(); }
496#endif
497#ifdef DIPOLE_FIELD_TRACKING
498 auto const &dip_fld() const { return p.dip_fld; }
499 auto &dip_fld() { return p.dip_fld; }
500#endif
501#ifdef ROTATIONAL_INERTIA
502 auto const &rinertia() const { return p.rinertia; }
503 auto &rinertia() { return p.rinertia; }
504#else
505 constexpr auto &rinertia() const { return p.rinertia; }
506#endif
507#ifdef ELECTROSTATICS
508 auto const &q() const { return p.q; }
509 auto &q() { return p.q; }
510#else
511 constexpr auto &q() const { return p.q; }
512#endif
513#ifdef LB_ELECTROHYDRODYNAMICS
514 auto const &mu_E() const { return p.mu_E; }
515 auto &mu_E() { return p.mu_E; }
516#endif
517#ifdef VIRTUAL_SITES
523#else
524 constexpr auto is_virtual() const { return false; }
525#endif // VIRTUAL_SITES
526#ifdef VIRTUAL_SITES_RELATIVE
527 auto const &vs_relative() const { return p.vs_relative; }
528 auto &vs_relative() { return p.vs_relative; }
529#endif // VIRTUAL_SITES_RELATIVE
530#ifdef THERMOSTAT_PER_PARTICLE
531 auto const &gamma() const { return p.gamma; }
532 auto &gamma() { return p.gamma; }
533#ifdef ROTATION
534 auto const &gamma_rot() const { return p.gamma_rot; }
535 auto &gamma_rot() { return p.gamma_rot; }
536#endif // ROTATION
537#endif // THERMOSTAT_PER_PARTICLE
538#ifdef EXTERNAL_FORCES
539 auto const &fixed() const { return p.ext_flag; }
540 auto &fixed() { return p.ext_flag; }
541 bool has_fixed_coordinates() const { return static_cast<bool>(p.ext_flag); }
542 bool is_fixed_along(unsigned int const axis) const {
543 assert(axis <= 2u);
544 return detail::get_nth_bit(p.ext_flag, axis);
545 }
546 void set_fixed_along(int const axis, bool const fixed_flag) {
547 // set new flag
548 if (fixed_flag) {
549 p.ext_flag |= static_cast<uint8_t>(1u << axis);
550 } else {
551 p.ext_flag &= static_cast<uint8_t>(~(1u << axis));
552 }
553 }
554 auto const &ext_force() const { return p.ext_force; }
555 auto &ext_force() { return p.ext_force; }
556#else // EXTERNAL_FORCES
557 constexpr bool has_fixed_coordinates() const { return false; }
558 constexpr bool is_fixed_along(unsigned int const) const { return false; }
559#endif // EXTERNAL_FORCES
560#ifdef ENGINE
561 auto const &swimming() const { return p.swim; }
562 auto &swimming() { return p.swim; }
563#endif
564#ifdef BOND_CONSTRAINT
565 auto const &pos_last_time_step() const { return r.p_last_timestep; }
567 auto const &rattle_params() const { return rattle; }
568 auto &rattle_params() { return rattle; }
569 auto const &rattle_correction() const { return rattle.correction; }
570 auto &rattle_correction() { return rattle.correction; }
571#endif
572
573#ifdef EXCLUSIONS
575 Utils::compact_vector<int> const &exclusions() const { return el; }
576 bool has_exclusion(int pid) const {
577 return std::find(el.begin(), el.end(), pid) != el.end();
578 }
579#endif
580
581private:
582 friend boost::serialization::access;
583 template <class Archive> void serialize(Archive &ar, long int /* version */) {
584 ar & p;
585 ar & r;
586 ar & m;
587 ar & f;
588 ar & l;
589 ar & bl;
590#ifdef EXCLUSIONS
591 ar & el;
592#endif
593 }
594};
595
596BOOST_CLASS_IMPLEMENTATION(Particle, object_serializable)
597#ifdef ENGINE
598BOOST_CLASS_IMPLEMENTATION(ParticleParametersSwimming, object_serializable)
599#endif
600BOOST_CLASS_IMPLEMENTATION(ParticleProperties, object_serializable)
601BOOST_CLASS_IMPLEMENTATION(ParticlePosition, object_serializable)
602BOOST_CLASS_IMPLEMENTATION(ParticleMomentum, object_serializable)
603BOOST_CLASS_IMPLEMENTATION(ParticleForce, object_serializable)
604BOOST_CLASS_IMPLEMENTATION(ParticleLocal, object_serializable)
605#ifdef BOND_CONSTRAINT
606BOOST_CLASS_IMPLEMENTATION(ParticleRattle, object_serializable)
607#endif
608#ifdef VIRTUAL_SITES_RELATIVE
609BOOST_CLASS_IMPLEMENTATION(decltype(ParticleProperties::vs_relative),
610 object_serializable)
611#endif
612
613#ifdef ENGINE
614BOOST_IS_BITWISE_SERIALIZABLE(ParticleParametersSwimming)
615#endif
616BOOST_IS_BITWISE_SERIALIZABLE(ParticleProperties)
617BOOST_IS_BITWISE_SERIALIZABLE(ParticlePosition)
618BOOST_IS_BITWISE_SERIALIZABLE(ParticleMomentum)
619BOOST_IS_BITWISE_SERIALIZABLE(ParticleForce)
620BOOST_IS_BITWISE_SERIALIZABLE(ParticleLocal)
621#ifdef BOND_CONSTRAINT
622BOOST_IS_BITWISE_SERIALIZABLE(ParticleRattle)
623#endif
624#ifdef VIRTUAL_SITES_RELATIVE
625BOOST_IS_BITWISE_SERIALIZABLE(decltype(ParticleProperties::vs_relative))
626#endif
Vector implementation and trait types for boost qvm interoperability.
Bond storage.
Definition BondList.hpp:84
Custom vector container optimized for size.
This file contains the defaults for ESPResSo.
Quaternion algebra.
Vector< T, 3 > convert_quaternion_to_director(Quaternion< T > const &quat)
Convert quaternion to director.
Quaternion implementation and trait types for boost qvm interoperability.
Force information on a particle.
Definition Particle.hpp:290
Utils::Vector3d torque
torque.
Definition Particle.hpp:320
ParticleForce(const Utils::Vector3d &f, const Utils::Vector3d &torque)
Definition Particle.hpp:296
void serialize(Archive &ar, long int)
Definition Particle.hpp:323
Utils::Vector3d f
force.
Definition Particle.hpp:316
friend ParticleForce operator+(ParticleForce const &lhs, ParticleForce const &rhs)
Definition Particle.hpp:300
ParticleForce(const Utils::Vector3d &f)
Definition Particle.hpp:294
ParticleForce(ParticleForce const &)=default
ParticleForce()=default
ParticleForce & operator+=(ParticleForce const &rhs)
Definition Particle.hpp:307
ParticleForce & operator=(ParticleForce const &)=default
Information on a particle that is needed only on the node the particle belongs to.
Definition Particle.hpp:357
bool ghost
is particle a ghost particle.
Definition Particle.hpp:359
short int lees_edwards_flag
Definition Particle.hpp:360
void serialize(Archive &ar, long int)
Definition Particle.hpp:366
double lees_edwards_offset
Accumulated applied Lees-Edwards offset.
Definition Particle.hpp:364
Utils::Vector3d p_old
position from the last Verlet list update.
Definition Particle.hpp:362
Momentum information on a particle.
Definition Particle.hpp:335
Utils::Vector3d v
velocity.
Definition Particle.hpp:337
Utils::Vector3d omega
angular velocity.
Definition Particle.hpp:343
void serialize(Archive &ar, long int)
Definition Particle.hpp:346
Properties of a self-propelled particle.
Definition Particle.hpp:50
void serialize(Archive &ar, long int)
Definition Particle.hpp:58
bool swimming
Is the particle a swimmer.
Definition Particle.hpp:54
bool is_engine_force_on_fluid
Whether f_swim is applied to the particle or to the fluid.
Definition Particle.hpp:56
double f_swim
Imposed constant force.
Definition Particle.hpp:52
Positional information on a particle.
Definition Particle.hpp:255
Utils::Vector3d calc_director() const
unit director calculated from the quaternion
Definition Particle.hpp:265
Utils::Quaternion< double > quat
quaternion to define particle orientation
Definition Particle.hpp:263
Utils::Vector3i i
index of the simulation box image where the particle really sits.
Definition Particle.hpp:259
Utils::Vector3d p_last_timestep
particle position at the previous time step (RATTLE algorithm)
Definition Particle.hpp:272
void serialize(Archive &ar, long int)
Definition Particle.hpp:275
Utils::Vector3d p
periodically folded position.
Definition Particle.hpp:257
The following properties define, with respect to which real particle a virtual site is placed and at ...
Definition Particle.hpp:152
Utils::Quaternion< double > rel_orientation
Relative position of the virtual site.
Definition Particle.hpp:156
Utils::Quaternion< double > quat
Orientation of the virtual particle in the body fixed frame.
Definition Particle.hpp:159
Properties of a particle which are not supposed to change during the integration, but have to be know...
Definition Particle.hpp:70
Utils::Vector3d gamma_rot
Friction coefficient for rotation.
Definition Particle.hpp:182
double mass
particle mass
Definition Particle.hpp:111
double dipm
dipole moment (absolute value)
Definition Particle.hpp:137
Utils::Vector3d rinertia
rotational inertia
Definition Particle.hpp:118
ParticleParametersSwimming swim
Definition Particle.hpp:197
int identity
unique identifier for the particle.
Definition Particle.hpp:72
Utils::Vector3d ext_torque
External torque.
Definition Particle.hpp:192
void serialize(Archive &ar, long int)
Definition Particle.hpp:200
Utils::Vector3d ext_force
External force.
Definition Particle.hpp:189
Utils::Vector3d mu_E
electrophoretic mobility times E-field: mu_0 * E
Definition Particle.hpp:132
int mol_id
Molecule identifier.
Definition Particle.hpp:74
Utils::Vector3d dip_fld
total dipole field
Definition Particle.hpp:142
uint8_t ext_flag
Flag for fixed particle coordinates.
Definition Particle.hpp:103
int propagation
which propagation schemes should be applied to the particle
Definition Particle.hpp:78
struct ParticleProperties::VirtualSitesRelativeParameters vs_relative
Utils::Vector3d gamma
Friction coefficient for translation.
Definition Particle.hpp:175
uint8_t rotation
Bitfield for the particle axes of rotation.
Definition Particle.hpp:89
double q
charge.
Definition Particle.hpp:125
int type
particle type, used for non-bonded interactions.
Definition Particle.hpp:76
friend ParticleRattle operator+(ParticleRattle const &lhs, ParticleRattle const &rhs)
Definition Particle.hpp:379
Utils::Vector3d correction
position/velocity correction
Definition Particle.hpp:377
ParticleRattle & operator+=(ParticleRattle const &rhs)
Definition Particle.hpp:384
void serialize(Archive &ar, long int)
Definition Particle.hpp:388
Struct holding all information for one particle.
Definition Particle.hpp:395
auto const & dip_fld() const
Definition Particle.hpp:498
auto & image_box()
Definition Particle.hpp:445
bool has_exclusion(int pid) const
Definition Particle.hpp:576
auto & ext_torque()
Definition Particle.hpp:485
auto const & swimming() const
Definition Particle.hpp:561
auto const & rattle_params() const
Definition Particle.hpp:567
auto & lees_edwards_offset()
Definition Particle.hpp:447
bool can_rotate() const
Definition Particle.hpp:460
auto const & lees_edwards_offset() const
Definition Particle.hpp:446
auto const & propagation() const
Definition Particle.hpp:421
auto & id()
Definition Particle.hpp:415
auto & bonds()
Definition Particle.hpp:429
auto const & rinertia() const
Definition Particle.hpp:502
auto & dip_fld()
Definition Particle.hpp:499
Utils::compact_vector< int > const & exclusions() const
Definition Particle.hpp:575
auto & rinertia()
Definition Particle.hpp:503
auto & rattle_params()
Definition Particle.hpp:568
auto is_virtual() const
Definition Particle.hpp:518
auto const & mass() const
Definition Particle.hpp:452
Utils::compact_vector< int > & exclusions()
Definition Particle.hpp:574
auto & rotation()
Definition Particle.hpp:459
auto & force_and_torque()
Definition Particle.hpp:438
auto const & quat() const
Definition Particle.hpp:477
bool has_fixed_coordinates() const
Definition Particle.hpp:541
auto const & rotation() const
Definition Particle.hpp:458
auto & rattle_correction()
Definition Particle.hpp:570
auto & propagation()
Definition Particle.hpp:422
bool operator==(Particle const &rhs) const
Definition Particle.hpp:424
auto const & vs_relative() const
Definition Particle.hpp:527
auto & vs_relative()
Definition Particle.hpp:528
void set_can_rotate_around(unsigned int const axis, bool const rot_flag)
Definition Particle.hpp:465
auto const & q() const
Definition Particle.hpp:508
auto & gamma_rot()
Definition Particle.hpp:535
auto & dipm()
Definition Particle.hpp:494
auto & pos_at_last_verlet_update()
Definition Particle.hpp:442
auto const & gamma() const
Definition Particle.hpp:531
auto & lees_edwards_flag()
Definition Particle.hpp:449
auto & mu_E()
Definition Particle.hpp:515
void set_ghost(bool const ghost_flag)
Definition Particle.hpp:441
auto const & pos_at_last_verlet_update() const
Definition Particle.hpp:443
auto const & pos_last_time_step() const
Definition Particle.hpp:565
bool can_rotate_around(unsigned int const axis) const
Definition Particle.hpp:461
auto const & gamma_rot() const
Definition Particle.hpp:534
auto const & force_and_torque() const
Definition Particle.hpp:437
auto const & lees_edwards_flag() const
Definition Particle.hpp:448
auto calc_dip() const
Definition Particle.hpp:495
auto const & v() const
Definition Particle.hpp:433
void set_fixed_along(int const axis, bool const fixed_flag)
Definition Particle.hpp:546
auto const & torque() const
Definition Particle.hpp:479
auto & quat()
Definition Particle.hpp:478
auto const & fixed() const
Definition Particle.hpp:539
auto const & ext_force() const
Definition Particle.hpp:554
auto const & omega() const
Definition Particle.hpp:481
auto const & image_box() const
Definition Particle.hpp:444
auto & force()
Definition Particle.hpp:436
auto & v()
Definition Particle.hpp:434
auto const & type() const
Definition Particle.hpp:418
auto const & ext_torque() const
Definition Particle.hpp:484
auto const & bonds() const
Definition Particle.hpp:428
bool is_ghost() const
Definition Particle.hpp:440
auto & mol_id()
Definition Particle.hpp:417
auto & fixed()
Definition Particle.hpp:540
bool operator!=(Particle const &rhs) const
Definition Particle.hpp:426
auto & ext_force()
Definition Particle.hpp:555
auto const & dipm() const
Definition Particle.hpp:493
auto & swimming()
Definition Particle.hpp:562
auto const & mol_id() const
Definition Particle.hpp:416
auto const & pos() const
Definition Particle.hpp:431
auto & pos()
Definition Particle.hpp:432
void set_cannot_rotate_all_axes()
Definition Particle.hpp:474
bool is_fixed_along(unsigned int const axis) const
Definition Particle.hpp:542
auto & type()
Definition Particle.hpp:419
auto & omega()
Definition Particle.hpp:482
auto & gamma()
Definition Particle.hpp:532
void set_can_rotate_all_axes()
Definition Particle.hpp:473
auto & pos_last_time_step()
Definition Particle.hpp:566
auto const & mu_E() const
Definition Particle.hpp:514
auto const & force() const
Definition Particle.hpp:435
auto & q()
Definition Particle.hpp:509
auto const & id() const
Definition Particle.hpp:414
auto const & rattle_correction() const
Definition Particle.hpp:569
auto & mass()
Definition Particle.hpp:453
auto calc_director() const
Definition Particle.hpp:487
auto & torque()
Definition Particle.hpp:480
Quaternion representation.
static Quaternion< T > identity()
Construct an identity quaternion.