70 |
|
frameData.torsionPotential = 0.0; |
71 |
|
frameData.inversionPotential = 0.0; |
72 |
|
frameData.lrPotentials = potVec(0.0); |
73 |
+ |
frameData.reciprocalPotential = 0.0; |
74 |
|
frameData.excludedPotentials = potVec(0.0); |
75 |
|
frameData.restraintPotential = 0.0; |
76 |
|
frameData.rawPotential = 0.0; |
104 |
|
frameData.torsionPotential = 0.0; |
105 |
|
frameData.inversionPotential = 0.0; |
106 |
|
frameData.lrPotentials = potVec(0.0); |
107 |
+ |
frameData.reciprocalPotential = 0.0; |
108 |
|
frameData.excludedPotentials = potVec(0.0); |
109 |
|
frameData.restraintPotential = 0.0; |
110 |
|
frameData.rawPotential = 0.0; |
189 |
|
/** Returns the number of rigid bodies */ |
190 |
|
int Snapshot::getNumberOfCutoffGroups() { |
191 |
|
return cgData.getSize(); |
192 |
+ |
} |
193 |
+ |
|
194 |
+ |
/** Returns the number of bytes in a FrameData structure */ |
195 |
+ |
int Snapshot::getFrameDataSize() { |
196 |
+ |
return sizeof(FrameData); |
197 |
|
} |
198 |
|
|
199 |
|
/** Returns the H-Matrix */ |
303 |
|
hasVolume = true; |
304 |
|
frameData.volume = vol; |
305 |
|
} |
306 |
+ |
|
307 |
|
|
308 |
|
/** Wrap a vector according to periodic boundary conditions */ |
309 |
|
void Snapshot::wrapVector(Vector3d& pos) { |
310 |
|
|
311 |
|
if( !frameData.orthoRhombic ) { |
312 |
|
Vector3d scaled = frameData.invHmat * pos; |
313 |
< |
for (int i = 0; i < 3; i++) |
314 |
< |
scaled[i] -= roundMe(scaled[i]); |
313 |
> |
for (int i = 0; i < 3; i++) { |
314 |
> |
scaled[i] -= roundMe( scaled[i] ); |
315 |
> |
} |
316 |
|
// calc the wrapped real coordinates from the wrapped scaled coordinates |
317 |
|
pos = frameData.hmat * scaled; |
318 |
|
} else { |
310 |
– |
// calc the scaled coordinates. |
319 |
|
RealType scaled; |
320 |
< |
for (int i=0; i<3; i++) { |
321 |
< |
scaled = pos[i] * frameData.invHmat(i, i); |
322 |
< |
scaled -= roundMe(scaled); |
323 |
< |
pos[i] = scaled * frameData.hmat(i, i); |
320 |
> |
for (int i=0; i<3; i++) { |
321 |
> |
scaled = pos[i] * frameData.invHmat(i,i); |
322 |
> |
scaled -= roundMe( scaled ); |
323 |
> |
pos[i] = scaled * frameData.hmat(i,i); |
324 |
|
} |
325 |
|
} |
326 |
|
} |
327 |
|
|
320 |
– |
|
328 |
|
/** Scaling a vector to multiples of the periodic box */ |
329 |
|
inline Vector3d Snapshot::scaleVector(Vector3d& pos) { |
330 |
|
|
421 |
|
return frameData.shortRangePotential; |
422 |
|
} |
423 |
|
|
424 |
+ |
void Snapshot::setReciprocalPotential(RealType rp){ |
425 |
+ |
frameData.reciprocalPotential = rp; |
426 |
+ |
} |
427 |
+ |
|
428 |
+ |
RealType Snapshot::getReciprocalPotential() { |
429 |
+ |
return frameData.reciprocalPotential; |
430 |
+ |
} |
431 |
+ |
|
432 |
|
void Snapshot::setLongRangePotential(potVec lrPot) { |
433 |
|
frameData.lrPotentials = lrPot; |
434 |
|
} |
438 |
|
for (int i = 0; i < N_INTERACTION_FAMILIES; i++) { |
439 |
|
frameData.longRangePotential += frameData.lrPotentials[i]; |
440 |
|
} |
441 |
+ |
frameData.longRangePotential += frameData.reciprocalPotential; |
442 |
|
hasLongRangePotential = true; |
443 |
|
} |
444 |
|
return frameData.longRangePotential; |