--- trunk/OOPSE/libmdtools/DumpReader.cpp 2004/03/01 20:01:50 1074 +++ trunk/OOPSE/libmdtools/DumpReader.cpp 2004/04/12 20:32:20 1097 @@ -1,3 +1,4 @@ +#define _LARGEFILE_SOURCE64 #define _FILE_OFFSET_BITS 64 #include @@ -221,11 +222,10 @@ void DumpReader :: readSet( int whichFrame ){ double time; fpos_t *framePos; + framePos = frameStart[whichFrame]->getPos(); #ifndef IS_MPI - framePos = frameStart[whichFrame]->getPos(); - fsetpos(inFile, framePos); @@ -465,10 +465,10 @@ char* DumpReader::parseDumpLine(char* readLine, int gl char *foo; // the pointer to the current string token - double pos[3]; // position place holders - double vel[3]; // velocity placeholders - double q[4]; // the quaternions - double jx, jy, jz; // angular velocity placeholders; + double pos[3]; // position place holders + double vel[3]; // velocity placeholders + double q[4]; // the quaternions + double ji[3]; // angular velocity placeholders; double qSqr, qLength; // needed to normalize the quaternion vector. Atom **atoms = simnfo->atoms; @@ -629,7 +629,7 @@ char* DumpReader::parseDumpLine(char* readLine, int gl inName, n_atoms, atomIndex ); return strdup( painCave.errMsg ); } - jx = atof( foo ); + ji[0] = atof( foo ); foo = strtok(NULL, " ,;\t"); if(foo == NULL){ @@ -639,7 +639,7 @@ char* DumpReader::parseDumpLine(char* readLine, int gl inName, n_atoms, atomIndex ); return strdup( painCave.errMsg ); } - jy = atof(foo ); + ji[1] = atof(foo ); foo = strtok(NULL, " ,;\t"); if(foo == NULL){ @@ -649,7 +649,7 @@ char* DumpReader::parseDumpLine(char* readLine, int gl inName, n_atoms, atomIndex ); return strdup( painCave.errMsg ); } - jz = atof( foo ); + ji[2] = atof( foo ); dAtom = ( DirectionalAtom* )atoms[atomIndex]; @@ -667,9 +667,7 @@ char* DumpReader::parseDumpLine(char* readLine, int gl // add the angular velocities - dAtom->setJx( jx ); - dAtom->setJy( jy ); - dAtom->setJz( jz ); + dAtom->setJ( ji ); } // add the positions and velocities to the atom