diff --git a/src/core/EspressoSystemInterface.cpp b/src/core/EspressoSystemInterface.cpp
index 9ad901ddd92..58273f8bf61 100644
--- a/src/core/EspressoSystemInterface.cpp
+++ b/src/core/EspressoSystemInterface.cpp
@@ -17,10 +17,10 @@
* along with this program. If not, see .
*/
#include "EspressoSystemInterface.hpp"
+#include "Particle.hpp"
#include "cells.hpp"
#include "cuda_interface.hpp"
#include "grid.hpp"
-#include "particle_data.hpp"
/* Initialize instance pointer */
EspressoSystemInterface *EspressoSystemInterface::m_instance = nullptr;
diff --git a/src/core/PartCfg.hpp b/src/core/PartCfg.hpp
index 4eebceb4da3..cc05ecf73fa 100644
--- a/src/core/PartCfg.hpp
+++ b/src/core/PartCfg.hpp
@@ -19,10 +19,10 @@
#ifndef CORE_PART_CFG_HPP
#define CORE_PART_CFG_HPP
+#include "Particle.hpp"
#include "ParticleCache.hpp"
#include "cells.hpp"
#include "grid.hpp"
-#include "particle_data.hpp"
#include "serialization/Particle.hpp"
#include
diff --git a/src/core/Particle.hpp b/src/core/Particle.hpp
new file mode 100644
index 00000000000..12484af8f03
--- /dev/null
+++ b/src/core/Particle.hpp
@@ -0,0 +1,338 @@
+/*
+ * Copyright (C) 2010-2019 The ESPResSo project
+ *
+ * This file is part of ESPResSo.
+ *
+ * ESPResSo is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * ESPResSo is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+#ifndef ESPRESSO_CORE_PARTICLE_HPP
+#define ESPRESSO_CORE_PARTICLE_HPP
+
+#include "config.hpp"
+
+#include
+#include
+#include
+
+/** Properties of a particle which are not supposed to
+ * change during the integration, but have to be known
+ * for all ghosts. Ghosts are particles which are
+ * needed in the interaction calculation, but are just copies of
+ * particles stored on different nodes.
+ */
+struct ParticleProperties {
+ /** unique identifier for the particle. */
+ int identity = -1;
+ /** Molecule identifier. */
+ int mol_id = 0;
+ /** particle type, used for non bonded interactions. */
+ int type = 0;
+
+ /** particle mass */
+#ifdef MASS
+ double mass = 1.0;
+#else
+ constexpr static double mass{1.0};
+#endif /* MASS */
+
+#ifdef ROTATIONAL_INERTIA
+ /** rotational inertia */
+ Utils::Vector3d rinertia = {1., 1., 1.};
+#else
+ static constexpr Utils::Vector3d rinertia = {1., 1., 1.};
+#endif
+
+#ifdef MEMBRANE_COLLISION
+ /** parameters for membrane collision mechanisms */
+ Utils::Vector3d out_direction = {0., 0., 0.};
+#endif
+
+ /** bitfield for the particle axes of rotation */
+ int rotation = 0;
+
+ /** charge. */
+#ifdef ELECTROSTATICS
+ double q = 0.0;
+#else
+ constexpr static double q{0.0};
+#endif
+
+#ifdef LB_ELECTROHYDRODYNAMICS
+ /** electrophoretic mobility times E-field: mu_0 * E */
+ Utils::Vector3d mu_E = {0., 0., 0.};
+#endif
+
+#ifdef DIPOLES
+ /** dipole moment (absolute value) */
+ double dipm = 0.;
+#endif
+
+#ifdef VIRTUAL_SITES
+ /** is particle virtual */
+ bool is_virtual = false;
+#ifdef VIRTUAL_SITES_RELATIVE
+ /** The following properties define, with respect to which real particle a
+ * virtual site is placed and at what distance. The relative orientation of
+ * the vector pointing from real particle to virtual site with respect to the
+ * orientation of the real particle is stored in the virtual site's
+ * quaternion attribute.
+ */
+ struct VirtualSitesRelativeParameters {
+ int to_particle_id = 0;
+ double distance = 0;
+ /** Relative position of the virtual site. */
+ Utils::Vector4d rel_orientation = {0., 0., 0., 0.};
+ /** Orientation of the virtual particle in the body fixed frame. */
+ Utils::Vector4d quat = {0., 0., 0., 0.};
+
+ template void serialize(Archive &ar, long int) {
+ ar &to_particle_id;
+ ar &distance;
+ ar &rel_orientation;
+ ar &quat;
+ }
+ } vs_relative;
+#endif
+#else /* VIRTUAL_SITES */
+ static constexpr const bool is_virtual = false;
+#endif /* VIRTUAL_SITES */
+
+#ifdef LANGEVIN_PER_PARTICLE
+ double T = -1.;
+#ifndef PARTICLE_ANISOTROPY
+ double gamma = -1.;
+#else
+ Utils::Vector3d gamma = {-1., -1., -1.};
+#endif // PARTICLE_ANISOTROPY
+/** Friction coefficient gamma for rotation */
+#ifdef ROTATION
+#ifndef PARTICLE_ANISOTROPY
+ double gamma_rot = -1.;
+#else
+ Utils::Vector3d gamma_rot = {-1., -1., -1.};
+#endif // ROTATIONAL_INERTIA
+#endif // ROTATION
+#endif // LANGEVIN_PER_PARTICLE
+
+#ifdef EXTERNAL_FORCES
+ /** flag whether to fix a particle in space.
+ Values:
+ - 0 no external influence
+
- 1 apply external force \ref ParticleProperties::ext_force
+
- 2,3,4 fix particle coordinate 0,1,2
+
- 5 apply external torque \ref ParticleProperties::ext_torque
+
+ */
+ int ext_flag = 0;
+ /** External force, apply if \ref ParticleProperties::ext_flag == 1. */
+ Utils::Vector3d ext_force = {0, 0, 0};
+
+#ifdef ROTATION
+ /** External torque, apply if \ref ParticleProperties::ext_flag == 16. */
+ Utils::Vector3d ext_torque = {0, 0, 0};
+#endif
+#endif
+};
+
+/** Positional information on a particle. Information that is
+ * communicated to calculate interactions with ghost particles.
+ */
+struct ParticlePosition {
+ /** periodically folded position. */
+ Utils::Vector3d p = {0, 0, 0};
+
+#ifdef ROTATION
+ /** quaternion to define particle orientation */
+ Utils::Vector4d quat = {1., 0., 0., 0.};
+ /** unit director calculated from the quaternion */
+ Utils::Vector3d calc_director() const {
+ return Utils::convert_quaternion_to_director(quat);
+ };
+#endif
+
+#ifdef BOND_CONSTRAINT
+ /** particle position at the previous time step */
+ Utils::Vector3d p_old = {0., 0., 0.};
+#endif
+};
+
+/** Force information on a particle. Forces of ghost particles are
+ * collected and added up to the force of the original particle.
+ */
+struct ParticleForce {
+ ParticleForce() = default;
+ ParticleForce(ParticleForce const &) = default;
+ ParticleForce(const Utils::Vector3d &f) : f(f) {}
+#ifdef ROTATION
+ ParticleForce(const Utils::Vector3d &f, const Utils::Vector3d &torque)
+ : f(f), torque(torque) {}
+#endif
+
+ ParticleForce &operator+=(ParticleForce const &rhs) {
+ f += rhs.f;
+#ifdef ROTATION
+ torque += rhs.torque;
+#endif
+
+ return *this;
+ }
+
+ /** force. */
+ Utils::Vector3d f = {0., 0., 0.};
+
+#ifdef ROTATION
+ /** torque */
+ Utils::Vector3d torque = {0., 0., 0.};
+#endif
+};
+
+/** Momentum information on a particle. Information not contained in
+ communication of ghost particles so far, but a communication would
+ be necessary for velocity dependent potentials. */
+struct ParticleMomentum {
+ /** velocity. */
+ Utils::Vector3d v = {0., 0., 0.};
+
+#ifdef ROTATION
+ /** angular velocity
+ ALWAYS IN PARTICLE FIXED, I.E., CO-ROTATING COORDINATE SYSTEM */
+ Utils::Vector3d omega = {0., 0., 0.};
+#endif
+};
+
+/** Information on a particle that is needed only on the
+ * node the particle belongs to
+ */
+struct ParticleLocal {
+ /** check whether a particle is a ghost or not */
+ bool ghost = false;
+ /** position in the last time step before last Verlet list update. */
+ Utils::Vector3d p_old = {0, 0, 0};
+ /** index of the simulation box image where the particle really sits. */
+ Utils::Vector3i i = {0, 0, 0};
+};
+
+struct ParticleParametersSwimming {
+// ifdef inside because we need this type for some MPI prototypes
+#ifdef ENGINE
+ bool swimming = false;
+ double f_swim = 0.;
+ double v_swim = 0.;
+ int push_pull = 0;
+ double dipole_length = 0.;
+ Utils::Vector3d v_center;
+ Utils::Vector3d v_source;
+ double rotational_friction = 0.;
+#endif
+
+ template void serialize(Archive &ar, long int) {
+#ifdef ENGINE
+ ar &swimming &f_swim &v_swim &push_pull &dipole_length &v_center &v_source
+ &rotational_friction;
+#endif
+ }
+};
+
+/** Struct holding all information for one particle. */
+struct Particle {
+ int &identity() { return p.identity; }
+ int const &identity() const { return p.identity; }
+
+ bool operator==(Particle const &rhs) const {
+ return identity() == rhs.identity();
+ }
+
+ bool operator!=(Particle const &rhs) const {
+ return identity() != rhs.identity();
+ }
+
+ /**
+ * @brief Return a copy of the particle with
+ * only the fixed size parts.
+ *
+ * This creates a copy of the particle with
+ * only the parts than can be copied w/o heap
+ * allocation, e.g. w/o bonds and exclusions.
+ * This is more efficient if these parts are
+ * not actually needed.
+ */
+ Particle flat_copy() const {
+ Particle ret;
+
+ ret.p = p;
+ ret.r = r;
+ ret.m = m;
+ ret.f = f;
+ ret.l = l;
+#ifdef ENGINE
+ ret.swim = swim;
+#endif
+
+ return ret;
+ }
+
+ ///
+ ParticleProperties p;
+ ///
+ ParticlePosition r;
+#ifdef DIPOLES
+ Utils::Vector3d calc_dip() const { return r.calc_director() * p.dipm; }
+#endif
+ ///
+ ParticleMomentum m;
+ ///
+ ParticleForce f;
+ ///
+ ParticleLocal l;
+
+ /** Bonded interactions list
+ *
+ * The format is pretty simple: just the bond type, and then the particle
+ * ids. The number of particle ids can be determined easily from the
+ * bonded_ia_params entry for the type.
+ */
+ IntList bl;
+
+ IntList &bonds() { return bl; }
+ IntList const &bonds() const { return bl; }
+
+ IntList &exclusions() {
+#ifdef EXCLUSIONS
+ return el;
+#else
+ throw std::runtime_error{"Exclusions not enabled."};
+#endif
+ }
+
+ IntList const &exclusions() const {
+#ifdef EXCLUSIONS
+ return el;
+#else
+ throw std::runtime_error{"Exclusions not enabled."};
+#endif
+ }
+
+#ifdef EXCLUSIONS
+ /** list of particles, with which this particle has no nonbonded
+ * interactions
+ */
+ IntList el;
+#endif
+
+#ifdef ENGINE
+ ParticleParametersSwimming swim;
+#endif
+};
+
+#endif
diff --git a/src/core/bonded_interactions/bonded_coulomb_sr.hpp b/src/core/bonded_interactions/bonded_coulomb_sr.hpp
index 53431ad8c97..fe0f0a2354c 100644
--- a/src/core/bonded_interactions/bonded_coulomb_sr.hpp
+++ b/src/core/bonded_interactions/bonded_coulomb_sr.hpp
@@ -32,9 +32,9 @@
#ifdef ELECTROSTATICS
+#include "Particle.hpp"
#include "bonded_interaction_data.hpp"
#include "electrostatics_magnetostatics/coulomb_inline.hpp"
-#include "particle_data.hpp"
/** Set the parameters for the short-range bonded Coulomb potential
*
diff --git a/src/core/bonded_interactions/bonded_interaction_data.hpp b/src/core/bonded_interactions/bonded_interaction_data.hpp
index 736419ae9f6..68dd24e9ddf 100644
--- a/src/core/bonded_interactions/bonded_interaction_data.hpp
+++ b/src/core/bonded_interactions/bonded_interaction_data.hpp
@@ -21,8 +21,8 @@
#include
+#include "Particle.hpp"
#include "TabulatedPotential.hpp"
-#include "particle_data.hpp"
#include
/** @file
diff --git a/src/core/bonded_interactions/thermalized_bond.hpp b/src/core/bonded_interactions/thermalized_bond.hpp
index 91379645bd2..5db22853815 100644
--- a/src/core/bonded_interactions/thermalized_bond.hpp
+++ b/src/core/bonded_interactions/thermalized_bond.hpp
@@ -31,9 +31,9 @@
/** number of thermalized bonds */
extern int n_thermalized_bonds;
+#include "Particle.hpp"
#include "bonded_interaction_data.hpp"
#include "integrate.hpp"
-#include "particle_data.hpp"
#include "random.hpp"
#include
diff --git a/src/core/cells.cpp b/src/core/cells.cpp
index 780d3305a67..1638cbd2435 100644
--- a/src/core/cells.cpp
+++ b/src/core/cells.cpp
@@ -25,6 +25,7 @@
* Implementation of cells.hpp.
*/
#include "cells.hpp"
+#include "Particle.hpp"
#include "algorithm/link_cell.hpp"
#include "communication.hpp"
#include "debug.hpp"
@@ -37,7 +38,6 @@
#include "layered.hpp"
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
#include "nsquare.hpp"
-#include "particle_data.hpp"
#include
#include
diff --git a/src/core/cells.hpp b/src/core/cells.hpp
index 45b5229a298..6a4005d6ad7 100644
--- a/src/core/cells.hpp
+++ b/src/core/cells.hpp
@@ -60,9 +60,9 @@
#include
#include
+#include "Particle.hpp"
#include "ParticleIterator.hpp"
#include "ghosts.hpp"
-#include "particle_data.hpp"
#include "Cell.hpp"
#include "ParticleRange.hpp"
diff --git a/src/core/cluster_analysis/Cluster.cpp b/src/core/cluster_analysis/Cluster.cpp
index 02f17b9866f..2e2f3453980 100644
--- a/src/core/cluster_analysis/Cluster.cpp
+++ b/src/core/cluster_analysis/Cluster.cpp
@@ -16,8 +16,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+#include "Particle.hpp"
#include "partCfg_global.hpp"
-#include "particle_data.hpp"
#ifdef GSL
#include "gsl/gsl_fit.h"
#endif
diff --git a/src/core/cluster_analysis/Cluster.hpp b/src/core/cluster_analysis/Cluster.hpp
index 8f65e64fbb8..4da33faebe2 100644
--- a/src/core/cluster_analysis/Cluster.hpp
+++ b/src/core/cluster_analysis/Cluster.hpp
@@ -25,7 +25,7 @@
#include
#include
-#include "particle_data.hpp"
+#include "Particle.hpp"
#include
namespace ClusterAnalysis {
diff --git a/src/core/cluster_analysis/ClusterStructure.hpp b/src/core/cluster_analysis/ClusterStructure.hpp
index d7390cf7eb7..fcf2f74ab7d 100644
--- a/src/core/cluster_analysis/ClusterStructure.hpp
+++ b/src/core/cluster_analysis/ClusterStructure.hpp
@@ -26,8 +26,8 @@
#include
#include "Cluster.hpp"
+#include "Particle.hpp"
#include "pair_criteria/pair_criteria.hpp"
-#include "particle_data.hpp"
namespace ClusterAnalysis {
diff --git a/src/core/collision.cpp b/src/core/collision.cpp
index b9fdd265700..bf7045d6cfa 100644
--- a/src/core/collision.cpp
+++ b/src/core/collision.cpp
@@ -18,13 +18,13 @@
*/
#include "collision.hpp"
+#include "Particle.hpp"
#include "cells.hpp"
#include "communication.hpp"
#include "errorhandling.hpp"
#include "event.hpp"
#include "grid.hpp"
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
-#include "particle_data.hpp"
#include "rotation.hpp"
#include "virtual_sites/VirtualSitesRelative.hpp"
diff --git a/src/core/collision.hpp b/src/core/collision.hpp
index 1c0e4b8d109..2920b53e999 100644
--- a/src/core/collision.hpp
+++ b/src/core/collision.hpp
@@ -39,9 +39,9 @@
#define COLLISION_MODE_BIND_THREE_PARTICLES 16
/*@}*/
+#include "Particle.hpp"
#include "bonded_interactions/bonded_interaction_data.hpp"
#include "integrate.hpp"
-#include "particle_data.hpp"
#include "virtual_sites.hpp"
class Collision_parameters {
diff --git a/src/core/communication.cpp b/src/core/communication.cpp
index 1a04dbc531e..366271bba52 100644
--- a/src/core/communication.cpp
+++ b/src/core/communication.cpp
@@ -33,6 +33,7 @@
#include "errorhandling.hpp"
#include "EspressoSystemInterface.hpp"
+#include "Particle.hpp"
#include "bonded_interactions/bonded_tab.hpp"
#include "cells.hpp"
#include "collision.hpp"
@@ -53,7 +54,6 @@
#include "nonbonded_interactions/nonbonded_tab.hpp"
#include "npt.hpp"
#include "partCfg_global.hpp"
-#include "particle_data.hpp"
#include "pressure.hpp"
#include "rotation.hpp"
#include "statistics.hpp"
diff --git a/src/core/communication.hpp b/src/core/communication.hpp
index 2959e9700e4..90df761e477 100644
--- a/src/core/communication.hpp
+++ b/src/core/communication.hpp
@@ -52,9 +52,9 @@
#include "MpiCallbacks.hpp"
/** Included needed by callbacks. */
+#include "Particle.hpp"
#include "cuda_init.hpp"
#include "grid_based_algorithms/lb_constants.hpp"
-#include "particle_data.hpp"
#include
#include
diff --git a/src/core/constraints/Constraint.hpp b/src/core/constraints/Constraint.hpp
index 735917f8d4f..e363bb3fa2b 100644
--- a/src/core/constraints/Constraint.hpp
+++ b/src/core/constraints/Constraint.hpp
@@ -19,8 +19,8 @@
#ifndef CONSTRAINTS_CONSTRAINT_HPP
#define CONSTRAINTS_CONSTRAINT_HPP
+#include "Particle.hpp"
#include "energy.hpp"
-#include "particle_data.hpp"
namespace Constraints {
class Constraint {
diff --git a/src/core/constraints/HomogeneousMagneticField.hpp b/src/core/constraints/HomogeneousMagneticField.hpp
index 2c099c63d77..05a20c5bc1b 100644
--- a/src/core/constraints/HomogeneousMagneticField.hpp
+++ b/src/core/constraints/HomogeneousMagneticField.hpp
@@ -20,7 +20,7 @@
#define CONSTRAINTS_HOMOGENEOUSMAGNETICFIELD_HPP
#include "Constraint.hpp"
-#include "particle_data.hpp"
+#include "Particle.hpp"
namespace Constraints {
diff --git a/src/core/constraints/ShapeBasedConstraint.hpp b/src/core/constraints/ShapeBasedConstraint.hpp
index 7cb465207e6..87056588011 100644
--- a/src/core/constraints/ShapeBasedConstraint.hpp
+++ b/src/core/constraints/ShapeBasedConstraint.hpp
@@ -22,8 +22,8 @@
#include
#include "Constraint.hpp"
+#include "Particle.hpp"
#include "energy.hpp"
-#include "particle_data.hpp"
#include "shapes/NoWhere.hpp"
#include "shapes/Shape.hpp"
diff --git a/src/core/diamond.hpp b/src/core/diamond.hpp
index b6096d70088..b04f72cb369 100644
--- a/src/core/diamond.hpp
+++ b/src/core/diamond.hpp
@@ -30,7 +30,7 @@
*/
#include "PartCfg.hpp"
-#include "particle_data.hpp"
+#include "Particle.hpp"
#include "utils/Vector.hpp"
/** C implementation of 'counterions \ [options]'.
diff --git a/src/core/dpd.hpp b/src/core/dpd.hpp
index e5d4d4d9897..5da75ace6e2 100644
--- a/src/core/dpd.hpp
+++ b/src/core/dpd.hpp
@@ -30,7 +30,7 @@
#include "config.hpp"
#ifdef DPD
-#include "particle_data.hpp"
+#include "Particle.hpp"
#include
#include
diff --git a/src/core/electrostatics_magnetostatics/debye_hueckel.hpp b/src/core/electrostatics_magnetostatics/debye_hueckel.hpp
index d9e48774de3..b9ebf3f0e2c 100644
--- a/src/core/electrostatics_magnetostatics/debye_hueckel.hpp
+++ b/src/core/electrostatics_magnetostatics/debye_hueckel.hpp
@@ -28,7 +28,7 @@
#ifdef ELECTROSTATICS
-#include "particle_data.hpp"
+#include "Particle.hpp"
/** Structure to hold Debye-Hueckel Parameters. */
typedef struct {
diff --git a/src/core/electrostatics_magnetostatics/elc.cpp b/src/core/electrostatics_magnetostatics/elc.cpp
index 5bf43b1d1cf..9258dff0004 100644
--- a/src/core/electrostatics_magnetostatics/elc.cpp
+++ b/src/core/electrostatics_magnetostatics/elc.cpp
@@ -21,11 +21,11 @@
/** \file
* Implementation of \ref elc.hpp.
*/
+#include "Particle.hpp"
#include "cells.hpp"
#include "communication.hpp"
#include "errorhandling.hpp"
#include "mmm-common.hpp"
-#include "particle_data.hpp"
#include "pressure.hpp"
#include
#include
diff --git a/src/core/electrostatics_magnetostatics/elc.hpp b/src/core/electrostatics_magnetostatics/elc.hpp
index 24205daf42d..8754f785bc4 100644
--- a/src/core/electrostatics_magnetostatics/elc.hpp
+++ b/src/core/electrostatics_magnetostatics/elc.hpp
@@ -29,7 +29,7 @@
#ifndef _ELC_H
#define _ELC_H
-#include "particle_data.hpp"
+#include "Particle.hpp"
#ifdef P3M
diff --git a/src/core/electrostatics_magnetostatics/icc.cpp b/src/core/electrostatics_magnetostatics/icc.cpp
index be18f8a889e..a5dd13686c1 100644
--- a/src/core/electrostatics_magnetostatics/icc.cpp
+++ b/src/core/electrostatics_magnetostatics/icc.cpp
@@ -34,6 +34,7 @@
#include "electrostatics_magnetostatics/p3m_gpu.hpp"
+#include "Particle.hpp"
#include "cells.hpp"
#include "communication.hpp"
#include "config.hpp"
@@ -41,7 +42,6 @@
#include "event.hpp"
#include "forces.hpp"
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
-#include "particle_data.hpp"
#include "short_range_loop.hpp"
#include
diff --git a/src/core/electrostatics_magnetostatics/magnetic_non_p3m_methods.hpp b/src/core/electrostatics_magnetostatics/magnetic_non_p3m_methods.hpp
index b141b213048..c67cb9e85be 100644
--- a/src/core/electrostatics_magnetostatics/magnetic_non_p3m_methods.hpp
+++ b/src/core/electrostatics_magnetostatics/magnetic_non_p3m_methods.hpp
@@ -39,7 +39,7 @@
#include
#ifdef DIPOLES
-#include "particle_data.hpp"
+#include "Particle.hpp"
/** Calculates dipolar energy and/or force between two particles */
double calc_dipole_dipole_ia(Particle &p1, Particle &p2, bool force_flag);
diff --git a/src/core/electrostatics_magnetostatics/mdlc_correction.cpp b/src/core/electrostatics_magnetostatics/mdlc_correction.cpp
index 29914de906d..c59496e8531 100644
--- a/src/core/electrostatics_magnetostatics/mdlc_correction.cpp
+++ b/src/core/electrostatics_magnetostatics/mdlc_correction.cpp
@@ -36,6 +36,7 @@
#include "electrostatics_magnetostatics/mdlc_correction.hpp"
#if defined(DIPOLES) && defined(DP3M)
+#include "Particle.hpp"
#include "cells.hpp"
#include "communication.hpp"
#include "electrostatics_magnetostatics/dipole.hpp"
@@ -43,7 +44,6 @@
#include "errorhandling.hpp"
#include "global.hpp"
#include "grid.hpp"
-#include "particle_data.hpp"
DLC_struct dlc_params = {1e100, 0, 0, 0, 0};
diff --git a/src/core/electrostatics_magnetostatics/mmm1d.hpp b/src/core/electrostatics_magnetostatics/mmm1d.hpp
index b97e8b1e287..b062b6c7d1a 100644
--- a/src/core/electrostatics_magnetostatics/mmm1d.hpp
+++ b/src/core/electrostatics_magnetostatics/mmm1d.hpp
@@ -29,7 +29,7 @@
#ifndef MMM1D_H
#define MMM1D_H
-#include "particle_data.hpp"
+#include "Particle.hpp"
#ifdef ELECTROSTATICS
diff --git a/src/core/electrostatics_magnetostatics/mmm2d.cpp b/src/core/electrostatics_magnetostatics/mmm2d.cpp
index 2695e32a3d6..64e4a332d77 100644
--- a/src/core/electrostatics_magnetostatics/mmm2d.cpp
+++ b/src/core/electrostatics_magnetostatics/mmm2d.cpp
@@ -27,6 +27,7 @@
#include "electrostatics_magnetostatics/mmm2d.hpp"
#ifdef ELECTROSTATICS
+#include "Particle.hpp"
#include "cells.hpp"
#include "communication.hpp"
#include "electrostatics_magnetostatics/coulomb.hpp"
@@ -34,7 +35,6 @@
#include "grid.hpp"
#include "integrate.hpp"
#include "mmm-common.hpp"
-#include "particle_data.hpp"
#include "specfunc.hpp"
#include
diff --git a/src/core/electrostatics_magnetostatics/p3m-dipolar.cpp b/src/core/electrostatics_magnetostatics/p3m-dipolar.cpp
index a961feca124..6516a0a0ff5 100644
--- a/src/core/electrostatics_magnetostatics/p3m-dipolar.cpp
+++ b/src/core/electrostatics_magnetostatics/p3m-dipolar.cpp
@@ -36,6 +36,7 @@
#ifdef DP3M
+#include "Particle.hpp"
#include "cells.hpp"
#include "communication.hpp"
#include "domain_decomposition.hpp"
@@ -43,7 +44,6 @@
#include "global.hpp"
#include "grid.hpp"
#include "integrate.hpp"
-#include "particle_data.hpp"
#include "tuning.hpp"
#include
diff --git a/src/core/electrostatics_magnetostatics/p3m-dipolar.hpp b/src/core/electrostatics_magnetostatics/p3m-dipolar.hpp
index f65c31ddef4..4b0243c9c4b 100644
--- a/src/core/electrostatics_magnetostatics/p3m-dipolar.hpp
+++ b/src/core/electrostatics_magnetostatics/p3m-dipolar.hpp
@@ -39,10 +39,10 @@
#include "config.hpp"
#ifdef DP3M
+#include "Particle.hpp"
#include "electrostatics_magnetostatics/dipole.hpp"
#include "fft.hpp"
#include "p3m-common.hpp"
-#include "particle_data.hpp"
#include
#include
diff --git a/src/core/electrostatics_magnetostatics/p3m.cpp b/src/core/electrostatics_magnetostatics/p3m.cpp
index 4bc883048bf..378dba79569 100644
--- a/src/core/electrostatics_magnetostatics/p3m.cpp
+++ b/src/core/electrostatics_magnetostatics/p3m.cpp
@@ -26,6 +26,7 @@
#ifdef P3M
+#include "Particle.hpp"
#include "cells.hpp"
#include "communication.hpp"
#include "domain_decomposition.hpp"
@@ -38,7 +39,6 @@
#include "global.hpp"
#include "grid.hpp"
#include "integrate.hpp"
-#include "particle_data.hpp"
#include "tuning.hpp"
#ifdef CUDA
#include "p3m_gpu_error.hpp"
diff --git a/src/core/electrostatics_magnetostatics/reaction_field.hpp b/src/core/electrostatics_magnetostatics/reaction_field.hpp
index 91f84bed1ad..e4b844f0050 100644
--- a/src/core/electrostatics_magnetostatics/reaction_field.hpp
+++ b/src/core/electrostatics_magnetostatics/reaction_field.hpp
@@ -31,7 +31,7 @@
#include "config.hpp"
#ifdef ELECTROSTATICS
-#include "particle_data.hpp"
+#include "Particle.hpp"
/** Structure to hold Reaction Field Parameters. */
typedef struct {
diff --git a/src/core/electrostatics_magnetostatics/scafacos.hpp b/src/core/electrostatics_magnetostatics/scafacos.hpp
index d0dab532235..b08009c50ad 100644
--- a/src/core/electrostatics_magnetostatics/scafacos.hpp
+++ b/src/core/electrostatics_magnetostatics/scafacos.hpp
@@ -31,7 +31,7 @@
#include
#include
-#include "particle_data.hpp"
+#include "Particle.hpp"
namespace Scafacos {
#if defined(SCAFACOS)
diff --git a/src/core/event.cpp b/src/core/event.cpp
index 744741d3bce..2994938e988 100644
--- a/src/core/event.cpp
+++ b/src/core/event.cpp
@@ -25,6 +25,7 @@
*/
#include "event.hpp"
+#include "Particle.hpp"
#include "bonded_interactions/thermalized_bond.hpp"
#include "cells.hpp"
#include "collision.hpp"
@@ -45,7 +46,6 @@
#include "npt.hpp"
#include "nsquare.hpp"
#include "partCfg_global.hpp"
-#include "particle_data.hpp"
#include "pressure.hpp"
#include "random.hpp"
#include "rattle.hpp"
diff --git a/src/core/ghosts.cpp b/src/core/ghosts.cpp
index 9e030c331ef..057699a9e57 100644
--- a/src/core/ghosts.cpp
+++ b/src/core/ghosts.cpp
@@ -25,9 +25,9 @@
* see \ref ghosts.hpp "ghosts.hpp"
*/
#include "ghosts.hpp"
+#include "Particle.hpp"
#include "communication.hpp"
#include "errorhandling.hpp"
-#include "particle_data.hpp"
#include
#include
diff --git a/src/core/grid_based_algorithms/lbgpu.cpp b/src/core/grid_based_algorithms/lbgpu.cpp
index 95880dfc459..32d03be1c05 100644
--- a/src/core/grid_based_algorithms/lbgpu.cpp
+++ b/src/core/grid_based_algorithms/lbgpu.cpp
@@ -27,6 +27,7 @@
#include "errorhandling.hpp"
#include "lb-d3q19.hpp"
+#include "Particle.hpp"
#include "communication.hpp"
#include "cuda_interface.hpp"
#include "global.hpp"
@@ -35,7 +36,6 @@
#include "grid_based_algorithms/lbgpu.hpp"
#include "integrate.hpp"
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
-#include "particle_data.hpp"
#include "statistics.hpp"
#include
diff --git a/src/core/immersed_boundary/ImmersedBoundaries.cpp b/src/core/immersed_boundary/ImmersedBoundaries.cpp
index b207ec36b4d..7a80d56254f 100644
--- a/src/core/immersed_boundary/ImmersedBoundaries.cpp
+++ b/src/core/immersed_boundary/ImmersedBoundaries.cpp
@@ -19,12 +19,12 @@
#include "ImmersedBoundaries.hpp"
+#include "Particle.hpp"
#include "bonded_interactions/bonded_interaction_data.hpp"
#include "cells.hpp"
#include "communication.hpp"
#include "errorhandling.hpp"
#include "grid.hpp"
-#include "particle_data.hpp"
#include
@@ -133,7 +133,7 @@ void ImmersedBoundaries::calc_volumes() {
// triangles, not all particles First round to check for volume
// conservation and virtual Loop over all bonds of this particle Actually
// j loops over the bond-list, i.e. the bond partners (see
- // particle_data.hpp)
+ // Particle.hpp)
int softID = -1;
int j = 0;
while (j < p1.bl.n) {
@@ -240,7 +240,7 @@ void ImmersedBoundaries::calc_volume_force() {
// triangles, not all particles First round to check for volume
// conservation and virtual Loop over all bonds of this particle Actually
// j loops over the bond-list, i.e. the bond partners (see
- // particle_data.hpp)
+ // Particle.hpp)
int softID = -1;
double volRef = 0.;
double kappaV = 0.;
diff --git a/src/core/integrate.cpp b/src/core/integrate.cpp
index 30e171bf8e6..95afbbe04e1 100644
--- a/src/core/integrate.cpp
+++ b/src/core/integrate.cpp
@@ -27,6 +27,7 @@
*/
#include "integrate.hpp"
+#include "Particle.hpp"
#include "accumulators.hpp"
#include "bonded_interactions/bonded_interaction_data.hpp"
#include "bonded_interactions/thermalized_bond.hpp"
@@ -49,7 +50,6 @@
#include "immersed_boundaries.hpp"
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
#include "npt.hpp"
-#include "particle_data.hpp"
#include "pressure.hpp"
#include "rattle.hpp"
#include "rotation.hpp"
diff --git a/src/core/integrators/velocity_verlet_inline.hpp b/src/core/integrators/velocity_verlet_inline.hpp
index 6b19ab6ec41..0fe30e33ae1 100644
--- a/src/core/integrators/velocity_verlet_inline.hpp
+++ b/src/core/integrators/velocity_verlet_inline.hpp
@@ -19,9 +19,9 @@
#ifndef INTEGRATORS_VELOCITY_VERLET_HPP
#define INTEGRATORS_VELOCITY_VERLET_HPP
+#include "Particle.hpp"
#include "ParticleRange.hpp"
#include "config.hpp"
-#include "particle_data.hpp"
#include "rotation.hpp"
/** Propagate the velocities and positions. Integration steps before force
diff --git a/src/core/integrators/velocity_verlet_npt.cpp b/src/core/integrators/velocity_verlet_npt.cpp
index 9e738153720..3e7a0615c3b 100644
--- a/src/core/integrators/velocity_verlet_npt.cpp
+++ b/src/core/integrators/velocity_verlet_npt.cpp
@@ -20,6 +20,7 @@
#include "config.hpp"
#ifdef NPT
+#include "Particle.hpp"
#include "ParticleRange.hpp"
#include "cells.hpp"
#include "communication.hpp"
@@ -27,7 +28,6 @@
#include "integrate.hpp"
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
#include "npt.hpp"
-#include "particle_data.hpp"
#include "thermostat.hpp"
#include "utils/math/sqr.hpp"
diff --git a/src/core/integrators/velocity_verlet_npt.hpp b/src/core/integrators/velocity_verlet_npt.hpp
index 85255b9eddf..1b4769590f1 100644
--- a/src/core/integrators/velocity_verlet_npt.hpp
+++ b/src/core/integrators/velocity_verlet_npt.hpp
@@ -22,8 +22,8 @@
#include "config.hpp"
#ifdef NPT
+#include "Particle.hpp"
#include "ParticleRange.hpp"
-#include "particle_data.hpp"
/** Special propagator for NPT ISOTROPIC
Propagate the velocities and positions. Integration steps before force
diff --git a/src/core/io/mpiio/mpiio.cpp b/src/core/io/mpiio/mpiio.cpp
index 21dce043088..687a7b17a5c 100644
--- a/src/core/io/mpiio/mpiio.cpp
+++ b/src/core/io/mpiio/mpiio.cpp
@@ -50,13 +50,13 @@
#include "config.hpp"
+#include "Particle.hpp"
#include "bonded_interactions/bonded_interaction_data.hpp"
#include "cells.hpp"
#include "errorhandling.hpp"
#include "event.hpp"
#include "integrate.hpp"
#include "mpiio.hpp"
-#include "particle_data.hpp"
#include
diff --git a/src/core/io/reader/readpdb.cpp b/src/core/io/reader/readpdb.cpp
index b8de507c231..f50e7a7fa16 100644
--- a/src/core/io/reader/readpdb.cpp
+++ b/src/core/io/reader/readpdb.cpp
@@ -19,6 +19,7 @@
#include "readpdb.hpp"
#include "grid.hpp"
#include "nonbonded_interactions/lj.hpp"
+#include "particle_data.hpp"
#include
#include
diff --git a/src/core/io/reader/readpdb.hpp b/src/core/io/reader/readpdb.hpp
index 45f68d2ae8c..567e2a8cc8c 100644
--- a/src/core/io/reader/readpdb.hpp
+++ b/src/core/io/reader/readpdb.hpp
@@ -20,8 +20,8 @@
#ifndef __READ_PDB_HPP
#define __READ_PDB_HPP
+#include "Particle.hpp"
#include "PdbParser.hpp"
-#include "particle_data.hpp"
namespace Reader {
namespace PDB {
diff --git a/src/core/metadynamics.hpp b/src/core/metadynamics.hpp
index 8f2ff7243d7..97d21868e47 100644
--- a/src/core/metadynamics.hpp
+++ b/src/core/metadynamics.hpp
@@ -22,8 +22,8 @@
#ifndef METADYNAMICS_H
#define METADYNAMICS_H
+#include "Particle.hpp"
#include "ParticleRange.hpp"
-#include "particle_data.hpp"
/** \file
*
diff --git a/src/core/nonbonded_interactions/nonbonded_interaction_data.hpp b/src/core/nonbonded_interactions/nonbonded_interaction_data.hpp
index ae87235f4c1..60569cba990 100644
--- a/src/core/nonbonded_interactions/nonbonded_interaction_data.hpp
+++ b/src/core/nonbonded_interactions/nonbonded_interaction_data.hpp
@@ -24,9 +24,9 @@
* Various procedures concerning interactions between particles.
*/
+#include "Particle.hpp"
#include "TabulatedPotential.hpp"
#include "dpd.hpp"
-#include "particle_data.hpp"
#include
#include
diff --git a/src/core/nonbonded_interactions/thole.hpp b/src/core/nonbonded_interactions/thole.hpp
index e820c153595..ceb7f41fc0f 100644
--- a/src/core/nonbonded_interactions/thole.hpp
+++ b/src/core/nonbonded_interactions/thole.hpp
@@ -29,11 +29,11 @@
#include "config.hpp"
#ifdef THOLE
+#include "Particle.hpp"
#include "bonded_interactions/bonded_interaction_data.hpp"
#include "electrostatics_magnetostatics/coulomb_inline.hpp"
#include "grid.hpp"
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
-#include "particle_data.hpp"
int thole_set_params(int part_type_a, int part_type_b, double scaling_coeff,
double q1q2);
diff --git a/src/core/object-in-fluid/membrane_collision.hpp b/src/core/object-in-fluid/membrane_collision.hpp
index db3d385ae54..6ef8d0e1a6a 100644
--- a/src/core/object-in-fluid/membrane_collision.hpp
+++ b/src/core/object-in-fluid/membrane_collision.hpp
@@ -31,9 +31,9 @@
#ifdef MEMBRANE_COLLISION
+#include "Particle.hpp"
#include "integrate.hpp"
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
-#include "particle_data.hpp"
#include
diff --git a/src/core/object-in-fluid/oif_global_forces.cpp b/src/core/object-in-fluid/oif_global_forces.cpp
index 6d4b24c0053..4571f8a6850 100644
--- a/src/core/object-in-fluid/oif_global_forces.cpp
+++ b/src/core/object-in-fluid/oif_global_forces.cpp
@@ -18,13 +18,13 @@
*/
#include "oif_global_forces.hpp"
+#include "Particle.hpp"
#include "bonded_interactions/bonded_interaction_data.hpp"
#include "cells.hpp"
#include "communication.hpp"
#include "errorhandling.hpp"
#include "grid.hpp"
#include "grid_based_algorithms/lb_interface.hpp"
-#include "particle_data.hpp"
#include
using Utils::angle_btw_triangles;
diff --git a/src/core/object-in-fluid/oif_local_forces.hpp b/src/core/object-in-fluid/oif_local_forces.hpp
index b8ff9163a91..73534bbacf7 100644
--- a/src/core/object-in-fluid/oif_local_forces.hpp
+++ b/src/core/object-in-fluid/oif_local_forces.hpp
@@ -25,9 +25,9 @@
* (Dupin2007) \ref forces.cpp
*/
+#include "Particle.hpp"
#include "bonded_interactions/bonded_interaction_data.hpp"
#include "grid.hpp"
-#include "particle_data.hpp"
#include
#include
diff --git a/src/core/object-in-fluid/out_direction.hpp b/src/core/object-in-fluid/out_direction.hpp
index ae9e11e313b..56c43e5652d 100644
--- a/src/core/object-in-fluid/out_direction.hpp
+++ b/src/core/object-in-fluid/out_direction.hpp
@@ -27,9 +27,9 @@
#ifdef MEMBRANE_COLLISION
+#include "Particle.hpp"
#include "bonded_interactions/bonded_interaction_data.hpp"
#include "grid.hpp"
-#include "particle_data.hpp"
#include
using Utils::get_n_triangle;
diff --git a/src/core/observables/DPDStress.hpp b/src/core/observables/DPDStress.hpp
index 9159395e7fc..f29ae059667 100644
--- a/src/core/observables/DPDStress.hpp
+++ b/src/core/observables/DPDStress.hpp
@@ -20,8 +20,8 @@
#define OBSERVABLES_DPDSTRESS_HPP
#include "Observable.hpp"
+#include "Particle.hpp"
#include "dpd.hpp"
-#include "particle_data.hpp"
#include
namespace Observables {
diff --git a/src/core/observables/LBVelocityProfile.hpp b/src/core/observables/LBVelocityProfile.hpp
index 6ef3a51cf53..0064fde7a86 100644
--- a/src/core/observables/LBVelocityProfile.hpp
+++ b/src/core/observables/LBVelocityProfile.hpp
@@ -20,7 +20,7 @@
#define OBSERVABLES_LBVELOCITYPROFILE_HPP
#include "LBProfileObservable.hpp"
-#include "particle_data.hpp"
+#include "Particle.hpp"
#include
diff --git a/src/core/observables/ParticleForces.hpp b/src/core/observables/ParticleForces.hpp
index 5174450d873..b82f793be79 100644
--- a/src/core/observables/ParticleForces.hpp
+++ b/src/core/observables/ParticleForces.hpp
@@ -19,9 +19,9 @@
#ifndef OBSERVABLES_PARTICLEFORCES_HPP
#define OBSERVABLES_PARTICLEFORCES_HPP
+#include "Particle.hpp"
#include "PidObservable.hpp"
#include "integrate.hpp"
-#include "particle_data.hpp"
#include
namespace Observables {
diff --git a/src/core/observables/PidProfileObservable.hpp b/src/core/observables/PidProfileObservable.hpp
index ae30209b47f..1eecc4dc163 100644
--- a/src/core/observables/PidProfileObservable.hpp
+++ b/src/core/observables/PidProfileObservable.hpp
@@ -20,10 +20,10 @@
#define OBSERVABLES_PIDPROFILEOBSERVABLE_HPP
#include "Observable.hpp"
+#include "Particle.hpp"
#include "PidObservable.hpp"
#include "ProfileObservable.hpp"
#include "integrate.hpp"
-#include "particle_data.hpp"
#include
namespace Observables {
diff --git a/src/core/observables/StressTensor.hpp b/src/core/observables/StressTensor.hpp
index 79ee7855195..12e149fb739 100644
--- a/src/core/observables/StressTensor.hpp
+++ b/src/core/observables/StressTensor.hpp
@@ -19,7 +19,7 @@
#ifndef OBSERVABLES_STRESSTENSOR_HPP
#include "Observable.hpp"
-#include "particle_data.hpp"
+#include "Particle.hpp"
#include "pressure.hpp"
#include
diff --git a/src/core/pair_criteria/pair_criteria.hpp b/src/core/pair_criteria/pair_criteria.hpp
index a965492e2ae..66698782586 100644
--- a/src/core/pair_criteria/pair_criteria.hpp
+++ b/src/core/pair_criteria/pair_criteria.hpp
@@ -19,8 +19,8 @@
#ifndef PAIR_CRITERIA_HPP
#define PAIR_CRITERIA_HPP
+#include "Particle.hpp"
#include "energy_inline.hpp"
-#include "particle_data.hpp"
#include
namespace PairCriteria {
diff --git a/src/core/particle_data.cpp b/src/core/particle_data.cpp
index a64cea9235d..98f4801d4cc 100644
--- a/src/core/particle_data.cpp
+++ b/src/core/particle_data.cpp
@@ -21,10 +21,10 @@
/** \file
* Particles and particle lists.
*
- * The corresponding header file is particle_data.hpp.
+ * The corresponding header file is Particle.hpp.
*/
-#include "particle_data.hpp"
+#include "Particle.hpp"
#include "PartCfg.hpp"
#include "bonded_interactions/bonded_interaction_data.hpp"
diff --git a/src/core/particle_data.hpp b/src/core/particle_data.hpp
index adf6201fc2a..f5cac4eb0ad 100644
--- a/src/core/particle_data.hpp
+++ b/src/core/particle_data.hpp
@@ -36,10 +36,11 @@
#include "config.hpp"
+#include "Particle.hpp"
+
#include
#include
#include
-#include
#include
@@ -80,316 +81,6 @@ enum {
* data types
************************************************/
-/** Properties of a particle which are not supposed to
- * change during the integration, but have to be known
- * for all ghosts. Ghosts are particles which are
- * needed in the interaction calculation, but are just copies of
- * particles stored on different nodes.
- */
-struct ParticleProperties {
- /** unique identifier for the particle. */
- int identity = -1;
- /** Molecule identifier. */
- int mol_id = 0;
- /** particle type, used for non bonded interactions. */
- int type = 0;
-
- /** particle mass */
-#ifdef MASS
- double mass = 1.0;
-#else
- constexpr static double mass{1.0};
-#endif /* MASS */
-
-#ifdef ROTATIONAL_INERTIA
- /** rotational inertia */
- Utils::Vector3d rinertia = {1., 1., 1.};
-#else
- static constexpr Utils::Vector3d rinertia = {1., 1., 1.};
-#endif
-
-#ifdef MEMBRANE_COLLISION
- /** parameters for membrane collision mechanisms */
- Utils::Vector3d out_direction = {0., 0., 0.};
-#endif
-
- /** bitfield for the particle axes of rotation */
- int rotation = 0;
-
- /** charge. */
-#ifdef ELECTROSTATICS
- double q = 0.0;
-#else
- constexpr static double q{0.0};
-#endif
-
-#ifdef LB_ELECTROHYDRODYNAMICS
- /** electrophoretic mobility times E-field: mu_0 * E */
- Utils::Vector3d mu_E = {0., 0., 0.};
-#endif
-
-#ifdef DIPOLES
- /** dipole moment (absolute value) */
- double dipm = 0.;
-#endif
-
-#ifdef VIRTUAL_SITES
- /** is particle virtual */
- bool is_virtual = false;
-#ifdef VIRTUAL_SITES_RELATIVE
- /** The following properties define, with respect to which real particle a
- * virtual site is placed and at what distance. The relative orientation of
- * the vector pointing from real particle to virtual site with respect to the
- * orientation of the real particle is stored in the virtual site's
- * quaternion attribute.
- */
- struct VirtualSitesRelativeParameters {
- int to_particle_id = 0;
- double distance = 0;
- /** Relative position of the virtual site. */
- Utils::Vector4d rel_orientation = {0., 0., 0., 0.};
- /** Orientation of the virtual particle in the body fixed frame. */
- Utils::Vector4d quat = {0., 0., 0., 0.};
-
- template void serialize(Archive &ar, long int) {
- ar &to_particle_id;
- ar &distance;
- ar &rel_orientation;
- ar &quat;
- }
- } vs_relative;
-#endif
-#else /* VIRTUAL_SITES */
- static constexpr const bool is_virtual = false;
-#endif /* VIRTUAL_SITES */
-
-#ifdef LANGEVIN_PER_PARTICLE
- double T = -1.;
-#ifndef PARTICLE_ANISOTROPY
- double gamma = -1.;
-#else
- Utils::Vector3d gamma = {-1., -1., -1.};
-#endif // PARTICLE_ANISOTROPY
-/** Friction coefficient gamma for rotation */
-#ifdef ROTATION
-#ifndef PARTICLE_ANISOTROPY
- double gamma_rot = -1.;
-#else
- Utils::Vector3d gamma_rot = {-1., -1., -1.};
-#endif // ROTATIONAL_INERTIA
-#endif // ROTATION
-#endif // LANGEVIN_PER_PARTICLE
-
-#ifdef EXTERNAL_FORCES
- /** flag whether to fix a particle in space.
- Values:
- - 0 no external influence
-
- 1 apply external force \ref ParticleProperties::ext_force
-
- 2,3,4 fix particle coordinate 0,1,2
-
- 5 apply external torque \ref ParticleProperties::ext_torque
-
- */
- int ext_flag = 0;
- /** External force, apply if \ref ParticleProperties::ext_flag == 1. */
- Utils::Vector3d ext_force = {0, 0, 0};
-
-#ifdef ROTATION
- /** External torque, apply if \ref ParticleProperties::ext_flag == 16. */
- Utils::Vector3d ext_torque = {0, 0, 0};
-#endif
-#endif
-};
-
-/** Positional information on a particle. Information that is
- * communicated to calculate interactions with ghost particles.
- */
-struct ParticlePosition {
- /** periodically folded position. */
- Utils::Vector3d p = {0, 0, 0};
-
-#ifdef ROTATION
- /** quaternion to define particle orientation */
- Utils::Vector4d quat = {1., 0., 0., 0.};
- /** unit director calculated from the quaternion */
- Utils::Vector3d calc_director() const {
- return Utils::convert_quaternion_to_director(quat);
- };
-#endif
-
-#ifdef BOND_CONSTRAINT
- /** particle position at the previous time step */
- Utils::Vector3d p_old = {0., 0., 0.};
-#endif
-};
-
-/** Force information on a particle. Forces of ghost particles are
- * collected and added up to the force of the original particle.
- */
-struct ParticleForce {
- ParticleForce() = default;
- ParticleForce(ParticleForce const &) = default;
- ParticleForce(const Utils::Vector3d &f) : f(f) {}
-#ifdef ROTATION
- ParticleForce(const Utils::Vector3d &f, const Utils::Vector3d &torque)
- : f(f), torque(torque) {}
-#endif
-
- ParticleForce &operator+=(ParticleForce const &rhs) {
- f += rhs.f;
-#ifdef ROTATION
- torque += rhs.torque;
-#endif
-
- return *this;
- }
-
- /** force. */
- Utils::Vector3d f = {0., 0., 0.};
-
-#ifdef ROTATION
- /** torque */
- Utils::Vector3d torque = {0., 0., 0.};
-#endif
-};
-
-/** Momentum information on a particle. Information not contained in
- communication of ghost particles so far, but a communication would
- be necessary for velocity dependent potentials. */
-struct ParticleMomentum {
- /** velocity. */
- Utils::Vector3d v = {0., 0., 0.};
-
-#ifdef ROTATION
- /** angular velocity
- ALWAYS IN PARTICLE FIXED, I.E., CO-ROTATING COORDINATE SYSTEM */
- Utils::Vector3d omega = {0., 0., 0.};
-#endif
-};
-
-/** Information on a particle that is needed only on the
- * node the particle belongs to
- */
-struct ParticleLocal {
- /** check whether a particle is a ghost or not */
- bool ghost = false;
- /** position in the last time step before last Verlet list update. */
- Utils::Vector3d p_old = {0, 0, 0};
- /** index of the simulation box image where the particle really sits. */
- Utils::Vector3i i = {0, 0, 0};
-};
-
-struct ParticleParametersSwimming {
-// ifdef inside because we need this type for some MPI prototypes
-#ifdef ENGINE
- bool swimming = false;
- double f_swim = 0.;
- double v_swim = 0.;
- int push_pull = 0;
- double dipole_length = 0.;
- Utils::Vector3d v_center;
- Utils::Vector3d v_source;
- double rotational_friction = 0.;
-#endif
-
- template void serialize(Archive &ar, long int) {
-#ifdef ENGINE
- ar &swimming &f_swim &v_swim &push_pull &dipole_length &v_center &v_source
- &rotational_friction;
-#endif
- }
-};
-
-/** Struct holding all information for one particle. */
-struct Particle {
- int &identity() { return p.identity; }
- int const &identity() const { return p.identity; }
-
- bool operator==(Particle const &rhs) const {
- return identity() == rhs.identity();
- }
-
- bool operator!=(Particle const &rhs) const {
- return identity() != rhs.identity();
- }
-
- /**
- * @brief Return a copy of the particle with
- * only the fixed size parts.
- *
- * This creates a copy of the particle with
- * only the parts than can be copied w/o heap
- * allocation, e.g. w/o bonds and exclusions.
- * This is more efficient if these parts are
- * not actually needed.
- */
- Particle flat_copy() const {
- Particle ret;
-
- ret.p = p;
- ret.r = r;
- ret.m = m;
- ret.f = f;
- ret.l = l;
-#ifdef ENGINE
- ret.swim = swim;
-#endif
-
- return ret;
- }
-
- ///
- ParticleProperties p;
- ///
- ParticlePosition r;
-#ifdef DIPOLES
- Utils::Vector3d calc_dip() const { return r.calc_director() * p.dipm; }
-#endif
- ///
- ParticleMomentum m;
- ///
- ParticleForce f;
- ///
- ParticleLocal l;
-
- /** Bonded interactions list
- *
- * The format is pretty simple: just the bond type, and then the particle
- * ids. The number of particle ids can be determined easily from the
- * bonded_ia_params entry for the type.
- */
- IntList bl;
-
- IntList &bonds() { return bl; }
- IntList const &bonds() const { return bl; }
-
- IntList &exclusions() {
-#ifdef EXCLUSIONS
- return el;
-#else
- throw std::runtime_error{"Exclusions not enabled."};
-#endif
- }
-
- IntList const &exclusions() const {
-#ifdef EXCLUSIONS
- return el;
-#else
- throw std::runtime_error{"Exclusions not enabled."};
-#endif
- }
-
-#ifdef EXCLUSIONS
- /** list of particles, with which this particle has no nonbonded
- * interactions
- */
- IntList el;
-#endif
-
-#ifdef ENGINE
- ParticleParametersSwimming swim;
-#endif
-};
-
/** List of particles. The particle array is resized using a sophisticated
* (we hope) algorithm to avoid unnecessary resizes.
* Access using \ref realloc_particlelist, ...
diff --git a/src/core/polymer.hpp b/src/core/polymer.hpp
index 067e252d84d..8c3f2bc16a2 100644
--- a/src/core/polymer.hpp
+++ b/src/core/polymer.hpp
@@ -30,7 +30,7 @@
*/
#include "PartCfg.hpp"
-#include "particle_data.hpp"
+#include "Particle.hpp"
#include "utils/Vector.hpp"
Utils::Vector3d random_position(std::function const &generate_rn);
diff --git a/src/core/rattle.cpp b/src/core/rattle.cpp
index f9af950e796..4ea17e8be7c 100644
--- a/src/core/rattle.cpp
+++ b/src/core/rattle.cpp
@@ -25,6 +25,7 @@ int n_rigidbonds = 0;
#ifdef BOND_CONSTRAINT
+#include "Particle.hpp"
#include "bonded_interactions/bonded_interaction_data.hpp"
#include "cells.hpp"
#include "communication.hpp"
@@ -33,7 +34,6 @@ int n_rigidbonds = 0;
#include "grid.hpp"
#include "integrate.hpp"
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
-#include "particle_data.hpp"
#include
diff --git a/src/core/reaction_ensemble.cpp b/src/core/reaction_ensemble.cpp
index 20605af784e..507bafd92c8 100644
--- a/src/core/reaction_ensemble.cpp
+++ b/src/core/reaction_ensemble.cpp
@@ -20,11 +20,11 @@
/** @file */
#include "reaction_ensemble.hpp"
+#include "Particle.hpp"
#include "energy.hpp"
#include "global.hpp"
#include "integrate.hpp"
#include "partCfg_global.hpp"
-#include "particle_data.hpp"
#include
#include
diff --git a/src/core/rotate_system.cpp b/src/core/rotate_system.cpp
index a9c29483cd4..33501b3a52b 100644
--- a/src/core/rotate_system.cpp
+++ b/src/core/rotate_system.cpp
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+#include "Particle.hpp"
#include "cells.hpp"
#include "communication.hpp"
#include "event.hpp"
-#include "particle_data.hpp"
#include "rotation.hpp"
#include
diff --git a/src/core/rotation.cpp b/src/core/rotation.cpp
index 998e5e26f70..45fb6bcfe58 100644
--- a/src/core/rotation.cpp
+++ b/src/core/rotation.cpp
@@ -35,6 +35,7 @@
#include "rotation.hpp"
#ifdef ROTATION
+#include "Particle.hpp"
#include "cells.hpp"
#include "communication.hpp"
#include "cuda_interface.hpp"
@@ -42,7 +43,6 @@
#include "global.hpp"
#include "grid_based_algorithms/lb_interface.hpp"
#include "integrate.hpp"
-#include "particle_data.hpp"
#include "thermostat.hpp"
#include
diff --git a/src/core/rotation.hpp b/src/core/rotation.hpp
index 37578d8e731..777a8895e69 100644
--- a/src/core/rotation.hpp
+++ b/src/core/rotation.hpp
@@ -28,8 +28,8 @@
#ifdef ROTATION
+#include "Particle.hpp"
#include "ParticleRange.hpp"
-#include "particle_data.hpp"
#include
#include
diff --git a/src/core/serialization/Particle.hpp b/src/core/serialization/Particle.hpp
index 91adfa7ec3a..f2e839af124 100644
--- a/src/core/serialization/Particle.hpp
+++ b/src/core/serialization/Particle.hpp
@@ -19,7 +19,8 @@
#ifndef CORE_UTILS_SERIALIZATION_PARTICLE_HPP
#define CORE_UTILS_SERIALIZATION_PARTICLE_HPP
-#include "particle_data.hpp"
+#include "Particle.hpp"
+
#include
#include
diff --git a/src/core/serialization/ParticleParametersSwimming.hpp b/src/core/serialization/ParticleParametersSwimming.hpp
index c1fa325838a..7a20f27344c 100644
--- a/src/core/serialization/ParticleParametersSwimming.hpp
+++ b/src/core/serialization/ParticleParametersSwimming.hpp
@@ -19,7 +19,7 @@
#ifndef CORE_UTILS_SERIALIZATION_PARTICLE_SWIM_HPP
#define CORE_UTILS_SERIALIZATION_PARTICLE_SWIM_HPP
-#include "particle_data.hpp"
+#include "Particle.hpp"
#include
diff --git a/src/core/statistics.cpp b/src/core/statistics.cpp
index 1c48c33c058..111d9504e39 100644
--- a/src/core/statistics.cpp
+++ b/src/core/statistics.cpp
@@ -26,6 +26,7 @@
#include "statistics.hpp"
+#include "Particle.hpp"
#include "bonded_interactions/bonded_interaction_data.hpp"
#include "communication.hpp"
#include "energy.hpp"
@@ -36,7 +37,6 @@
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
#include "npt.hpp"
#include "partCfg_global.hpp"
-#include "particle_data.hpp"
#include "pressure.hpp"
#include "short_range_loop.hpp"
diff --git a/src/core/statistics.hpp b/src/core/statistics.hpp
index 513794f7fff..3fdd49219e0 100644
--- a/src/core/statistics.hpp
+++ b/src/core/statistics.hpp
@@ -28,8 +28,8 @@
#include "Observable_stat.hpp"
#include "PartCfg.hpp"
+#include "Particle.hpp"
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
-#include "particle_data.hpp"
#include