| 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; | 
| 130 |  | frameData.pressure = 0.0; | 
| 131 |  | frameData.temperature = 0.0; | 
| 132 |  | frameData.pressureTensor = Mat3x3d(0.0); | 
| 133 | < | frameData.systemDipole = Vector3d(0.0); | 
| 133 | > | frameData.systemDipole = Vector3d(0.0); | 
| 134 | > | frameData.systemQuadrupole = Mat3x3d(0.0); | 
| 135 |  | frameData.convectiveHeatFlux = Vector3d(0.0, 0.0, 0.0); | 
| 136 |  | frameData.electronicTemperature = 0.0; | 
| 137 |  | frameData.COM = V3Zero; | 
| 155 |  | hasCOMw = false; | 
| 156 |  | hasPressureTensor = false; | 
| 157 |  | hasSystemDipole = false; | 
| 158 | + | hasSystemQuadrupole = false; | 
| 159 |  | hasConvectiveHeatFlux = false; | 
| 160 |  | hasInertiaTensor = false; | 
| 161 |  | hasGyrationalVolume = false; | 
| 191 |  | /** Returns the number of rigid bodies */ | 
| 192 |  | int Snapshot::getNumberOfCutoffGroups() { | 
| 193 |  | return cgData.getSize(); | 
| 194 | + | } | 
| 195 | + |  | 
| 196 | + | /** Returns the number of bytes in a FrameData structure */ | 
| 197 | + | int Snapshot::getFrameDataSize() { | 
| 198 | + | return sizeof(FrameData); | 
| 199 |  | } | 
| 200 |  |  | 
| 201 |  | /** Returns the H-Matrix */ | 
| 306 |  | frameData.volume = vol; | 
| 307 |  | } | 
| 308 |  |  | 
| 309 | + |  | 
| 310 |  | /** Wrap a vector according to periodic boundary conditions */ | 
| 311 |  | void Snapshot::wrapVector(Vector3d& pos) { | 
| 312 |  |  | 
| 313 |  | if( !frameData.orthoRhombic ) { | 
| 314 |  | Vector3d scaled = frameData.invHmat * pos; | 
| 315 | < | for (int i = 0; i < 3; i++) | 
| 316 | < | scaled[i] -= roundMe(scaled[i]); | 
| 315 | > | for (int i = 0; i < 3; i++) { | 
| 316 | > | scaled[i] -= roundMe( scaled[i] ); | 
| 317 | > | } | 
| 318 |  | // calc the wrapped real coordinates from the wrapped scaled coordinates | 
| 319 |  | pos = frameData.hmat * scaled; | 
| 320 |  | } else { | 
| 310 | – | // calc the scaled coordinates. | 
| 321 |  | RealType scaled; | 
| 322 | < | for (int i=0; i<3; i++) { | 
| 323 | < | scaled = pos[i] * frameData.invHmat(i, i); | 
| 324 | < | scaled -= roundMe(scaled); | 
| 325 | < | pos[i] = scaled * frameData.hmat(i, i); | 
| 322 | > | for (int i=0; i<3; i++) { | 
| 323 | > | scaled = pos[i] * frameData.invHmat(i,i); | 
| 324 | > | scaled -= roundMe( scaled ); | 
| 325 | > | pos[i] = scaled * frameData.hmat(i,i); | 
| 326 |  | } | 
| 327 |  | } | 
| 328 |  | } | 
| 329 |  |  | 
| 320 | – |  | 
| 330 |  | /** Scaling a vector to multiples of the periodic box */ | 
| 331 |  | inline Vector3d Snapshot::scaleVector(Vector3d& pos) { | 
| 332 |  |  | 
| 421 |  | hasShortRangePotential = true; | 
| 422 |  | } | 
| 423 |  | return frameData.shortRangePotential; | 
| 424 | + | } | 
| 425 | + |  | 
| 426 | + | void Snapshot::setReciprocalPotential(RealType rp){ | 
| 427 | + | frameData.reciprocalPotential = rp; | 
| 428 | + | } | 
| 429 | + |  | 
| 430 | + | RealType Snapshot::getReciprocalPotential() { | 
| 431 | + | return frameData.reciprocalPotential; | 
| 432 |  | } | 
| 433 |  |  | 
| 434 |  | void Snapshot::setLongRangePotential(potVec lrPot) { | 
| 440 |  | for (int i = 0; i < N_INTERACTION_FAMILIES; i++) { | 
| 441 |  | frameData.longRangePotential += frameData.lrPotentials[i]; | 
| 442 |  | } | 
| 443 | + | frameData.longRangePotential += frameData.reciprocalPotential; | 
| 444 |  | hasLongRangePotential = true; | 
| 445 |  | } | 
| 446 |  | return frameData.longRangePotential; | 
| 604 |  | frameData.systemDipole = bd; | 
| 605 |  | } | 
| 606 |  |  | 
| 607 | + | Mat3x3d Snapshot::getSystemQuadrupole() { | 
| 608 | + | return frameData.systemQuadrupole; | 
| 609 | + | } | 
| 610 | + |  | 
| 611 | + | void Snapshot::setSystemQuadrupole(const Mat3x3d& bq) { | 
| 612 | + | hasSystemQuadrupole = true; | 
| 613 | + | frameData.systemQuadrupole = bq; | 
| 614 | + | } | 
| 615 | + |  | 
| 616 |  | void Snapshot::setThermostat(const pair<RealType, RealType>& thermostat) { | 
| 617 |  | frameData.thermostat = thermostat; | 
| 618 |  | } |