--- trunk/OOPSE/libmdtools/Atom.cpp 2003/06/20 20:29:36 561 +++ trunk/OOPSE/libmdtools/Atom.cpp 2003/07/14 21:48:43 599 @@ -244,3 +244,46 @@ void Atom::deleteRange(int startIndex, int stopIndex) nElements = nNew; } + + +void Atom::getPos( double theP[3] ){ + + theP[0] = pos[offsetX]; + theP[1] = pos[offsetY]; + theP[2] = pos[offsetZ]; +} + +void Atom::setPos( double theP[3] ){ + + pos[offsetX] = theP[0]; + pos[offsetY] = theP[1]; + pos[offsetZ] = theP[2]; +} + +void Atom::getVel( double theV[3] ){ + + theV[0] = vel[offsetX]; + theV[1] = vel[offsetY]; + theV[2] = vel[offsetZ]; +} + +void Atom::setVel( double theV[3] ){ + + vel[offsetX] = theV[0]; + vel[offsetY] = theV[1]; + vel[offsetZ] = theV[2]; +} + +void Atom::getFrc( double theF[3] ){ + + theF[0] = frc[offsetX]; + theF[1] = frc[offsetY]; + theF[2] = frc[offsetZ]; +} + +void Atom::addFrc( double theF[3] ){ + + frc[offsetX] += theF[0]; + frc[offsetY] += theF[1]; + frc[offsetZ] += theF[2]; +}