1#ifndef SRC_MOLECULES_MOLECULERMM_H_
2#define SRC_MOLECULES_MOLECULERMM_H_
4#include "MoleculeInterface.h"
8#define DEBUG_FUNCTIONALITY_HACKS
22 double rx = 0.,
double ry = 0.,
double rz = 0.,
23 double vx = 0.,
double vy = 0.,
double vz = 0.,
24 double = 0.,
double = 0.,
double = 0.,
double = 0.,
25 double = 0.,
double = 0.,
double = 0.
38 if(component !=
nullptr) {
39 _component = component;
42 }
else if(not _initCalled) {
50 for (
int d = 0; d < 3; ++d) {
64 if (not _initCalled) {
71 unsigned long getID()
const override;
72 void setid(
unsigned long id)
override;
73 void setr(
unsigned short d,
double r)
override;
74 void setv(
unsigned short d,
double v)
override;
75 void setF(
unsigned short,
double F)
override;
76 double r(
unsigned short d)
const override;
77 double v(
unsigned short d)
const override;
80 void setComponent(
Component *component)
override {
81 _component = component;
82 this->updateMassInertia();
89#ifndef DEBUG_FUNCTIONALITY_HACKS
90 double F(
unsigned short )
const override {
95 double F(
unsigned short d)
const override {
return v(d);}
106 double D(
unsigned short )
const override {
109 double M(
unsigned short )
const override {
112 double Vi(
unsigned short )
const override {
116 void setD(
unsigned short ,
double )
override {}
118 inline void move(
int d,
double dr)
override {
122 double getI(
unsigned short )
const override {
123 mardyn_assert(
false);
128 void updateMassInertia()
override {}
131 double U_rot()
override {
135 double U_rot_2()
override {
139 void setupSoACache(
CellDataSoABase *
const s,
unsigned iLJ,
unsigned ,
unsigned ,
unsigned )
override {
140 mardyn_assert(
false);
148 void setStartIndexSoA_LJ(
unsigned i)
override {
151 void setStartIndexSoA_C(
unsigned )
override {
152 mardyn_assert(
false);
154 void setStartIndexSoA_D(
unsigned )
override {
155 mardyn_assert(
false);
157 void setStartIndexSoA_Q(
unsigned )
override {
158 mardyn_assert(
false);
161 unsigned int numSites()
const override {
164 unsigned int numOrientedSites()
const override {
167 unsigned int numLJcenters()
const override {
170 unsigned int numCharges()
const override {
173 unsigned int numDipoles()
const override {
176 unsigned int numQuadrupoles()
const override {
180 std::array<double, 3> site_d(
unsigned int )
const override {
return emptyArray3(); }
182 std::array<double, 3> ljcenter_d(
unsigned int i)
const override {
return emptyArray3(); }
183 std::array<double, 3> charge_d(
unsigned int )
const override {
return emptyArray3(); }
184 std::array<double, 3> dipole_d(
unsigned int )
const override {
return emptyArray3(); }
185 std::array<double, 3> quadrupole_d(
unsigned int )
const override {
return emptyArray3(); }
187 std::array<double, 3> site_d_abs(
unsigned int i)
const override {
return ljcenter_d_abs(i); }
188 std::array<double, 3> ljcenter_d_abs(
unsigned int i)
const override {
189 mardyn_assert(i == 0);
192 std::array<double, 3> charge_d_abs(
unsigned int )
const override {
return emptyArray3(); }
193 std::array<double, 3> dipole_d_abs(
unsigned int )
const override {
return emptyArray3(); }
194 std::array<double, 3> quadrupole_d_abs(
unsigned int )
const override {
return emptyArray3(); }
196 std::array<double, 3> dipole_e(
unsigned int )
const override {
return emptyArray3(); }
197 std::array<double, 3> quadrupole_e(
unsigned int )
const override {
return emptyArray3(); }
199 std::array<double, 3> site_F(
unsigned int )
const override {
return emptyArray3(); }
200 std::array<double, 3> ljcenter_F(
unsigned int )
const override {
return emptyArray3(); }
201 std::array<double, 3> charge_F(
unsigned int )
const override {
return emptyArray3(); }
202 std::array<double, 3> dipole_F(
unsigned int )
const override {
return emptyArray3(); }
203 std::array<double, 3> quadrupole_F(
unsigned int )
const override {
return emptyArray3(); }
205 void normalizeQuaternion()
override {}
206 std::array<double, 3> computeLJcenter_d(
unsigned int )
const override {
return emptyArray3(); }
207 std::array<double, 3> computeCharge_d(
unsigned int )
const override {
return emptyArray3(); }
208 std::array<double, 3> computeDipole_d(
unsigned int )
const override {
return emptyArray3(); }
209 std::array<double, 3> computeQuadrupole_d(
unsigned int )
const override {
return emptyArray3(); }
210 std::array<double, 3> computeDipole_e(
unsigned int )
const override {
return emptyArray3(); }
211 std::array<double, 3> computeQuadrupole_e(
unsigned int )
const override {
return emptyArray3(); }
213 unsigned long totalMemsize()
const override {
215 mardyn_assert(
false);
216 return sizeof(*this);
219 void setF(
double [3])
override {}
220 void setM(
double [3])
override {}
221 void setVi(
double [3])
override {}
222 void Fadd(
const double [])
override {}
223 void Madd(
const double [])
override {}
224 void Viadd(
const double [])
override {}
225 void vadd(
const double ax,
const double ay,
const double az)
override {
226 setv(0, v(0) + ax); setv(1, v(1) + ay); setv(2, v(2) + az);
228 void vsub(
const double ax,
const double ay,
const double az)
override {
229 setv(0, v(0) - ax); setv(1, v(1) - ay); setv(2, v(2) - az);
232#ifndef DEBUG_FUNCTIONALITY_HACKS
233 void Fljcenteradd(
unsigned int ,
double [])
override {}
234 void Fljcentersub(
unsigned int ,
double [])
override {}
236 void Fljcenteradd(
unsigned int i,
double a[])
override {
237 mardyn_assert(i == 0);
238 for(
int d = 0; d < 3; ++d)
239 setv(d, v(d) + a[d]);
241 void Fljcentersub(
unsigned int i,
double a[])
override {
242 mardyn_assert(i == 0);
243 for(
int d = 0; d < 3; ++d)
244 setv(d, v(d) - a[d]);
248 void Fchargeadd(
unsigned int ,
double [])
override {}
249 void Fchargesub(
unsigned int ,
double [])
override {}
250 void Fdipoleadd(
unsigned int ,
double [])
override {}
251 void Fdipolesub(
unsigned int ,
double [])
override {}
252 void Fquadrupoleadd(
unsigned int ,
double [])
override {}
253 void Fquadrupolesub(
unsigned int ,
double [])
override {}
254 void upd_preF(
double )
override {
255 mardyn_assert(
false);
257 void upd_postF(
double ,
double& ,
double& )
override {
258 mardyn_assert(
false);
260 void calculate_mv2_Iw2(
double& summv2,
double& )
override {
261 summv2 += _component->
m() * v2();
263 void calculate_mv2_Iw2(
double& summv2,
double& ,
double offx,
double offy,
double offz)
override {
264 double vcx = _v[0] - offx;
265 double vcy = _v[1] - offy;
266 double vcz = _v[2] - offz;
267 summv2 += _component->
m() * (vcx*vcx + vcy*vcy + vcz*vcz);
270 void write(std::ostream& )
const override;
271 void writeBinary(std::ostream& )
const override {}
272 void clearFM()
override {}
273 void calcFM()
override {}
274 void check(
unsigned long )
override {}
276 static Component * getStaticRMMComponent() {
280 void setStorageState(StorageState s) {
284 StorageState getStorageState()
const {
290 mardyn_assert(_state == STORAGE_AOS);
293 mardyn_assert(_state == STORAGE_AOS);
297 static std::array<double, 3> emptyArray3() {
299 std::array<double, 3> ret{0., 0., 0.};
303 static void initStaticVars();
307 static bool _initCalled;
313 vcp_real_accum _v[3];
Defines the length of the vectors and the corresponding functions.
Definition: CellDataSoABase.h:13
Structure of Arrays for single-center lennard-Jones molecules for the RMM run.
Definition: CellDataSoARMM.h:16
Class implementing molecules as rigid rotators consisting out of different interaction sites (LJcente...
Definition: Component.h:14
double m() const
Definition: Component.h:53
Definition: MoleculeInterface.h:18
Definition: MoleculeRMM.h:13
void releaseOwnSoA() override
Definition: MoleculeRMM.h:292
void buildOwnSoA() override
Definition: MoleculeRMM.h:289
Definition: Quaternion.h:10
std::ostream & operator<<(std::ostream &stream, const Vector3< type > &v)
Definition: Vector3.h:22
::xsd::cxx::tree::id< char, ncname > id
C++ type corresponding to the ID XML Schema built-in type.
Definition: vtk-punstructured.h:322
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition: vtk-punstructured.h:270