| 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; | 
| 298 |  | hasVolume = true; | 
| 299 |  | frameData.volume = vol; | 
| 300 |  | } | 
| 301 | + |  | 
| 302 |  |  | 
| 303 |  | /** Wrap a vector according to periodic boundary conditions */ | 
| 304 |  | void Snapshot::wrapVector(Vector3d& pos) { | 
| 305 |  |  | 
| 306 |  | if( !frameData.orthoRhombic ) { | 
| 307 |  | Vector3d scaled = frameData.invHmat * pos; | 
| 308 | < | for (int i = 0; i < 3; i++) | 
| 309 | < | scaled[i] -= roundMe(scaled[i]); | 
| 308 | > | for (int i = 0; i < 3; i++) { | 
| 309 | > | scaled[i] -= roundMe( scaled[i] ); | 
| 310 | > | } | 
| 311 |  | // calc the wrapped real coordinates from the wrapped scaled coordinates | 
| 312 |  | pos = frameData.hmat * scaled; | 
| 313 |  | } else { | 
| 310 | – | // calc the scaled coordinates. | 
| 314 |  | RealType scaled; | 
| 315 | < | for (int i=0; i<3; i++) { | 
| 316 | < | scaled = pos[i] * frameData.invHmat(i, i); | 
| 317 | < | scaled -= roundMe(scaled); | 
| 318 | < | pos[i] = scaled * frameData.hmat(i, i); | 
| 315 | > | for (int i=0; i<3; i++) { | 
| 316 | > | scaled = pos[i] * frameData.invHmat(i,i); | 
| 317 | > | scaled -= roundMe( scaled ); | 
| 318 | > | pos[i] = scaled * frameData.hmat(i,i); | 
| 319 |  | } | 
| 320 |  | } | 
| 321 |  | } | 
| 322 |  |  | 
| 320 | – |  | 
| 323 |  | /** Scaling a vector to multiples of the periodic box */ | 
| 324 |  | inline Vector3d Snapshot::scaleVector(Vector3d& pos) { | 
| 325 |  |  | 
| 416 |  | return frameData.shortRangePotential; | 
| 417 |  | } | 
| 418 |  |  | 
| 419 | + | void Snapshot::setReciprocalPotential(RealType rp){ | 
| 420 | + | frameData.reciprocalPotential = rp; | 
| 421 | + | } | 
| 422 | + |  | 
| 423 | + | RealType Snapshot::getReciprocalPotential() { | 
| 424 | + | return frameData.reciprocalPotential; | 
| 425 | + | } | 
| 426 | + |  | 
| 427 |  | void Snapshot::setLongRangePotential(potVec lrPot) { | 
| 428 |  | frameData.lrPotentials = lrPot; | 
| 429 |  | } | 
| 433 |  | for (int i = 0; i < N_INTERACTION_FAMILIES; i++) { | 
| 434 |  | frameData.longRangePotential += frameData.lrPotentials[i]; | 
| 435 |  | } | 
| 436 | + | frameData.longRangePotential += frameData.reciprocalPotential; | 
| 437 |  | hasLongRangePotential = true; | 
| 438 |  | } | 
| 439 |  | return frameData.longRangePotential; |