--- trunk/mdtools/md_code/InitializeFromFile.cpp 2002/12/12 21:21:59 206 +++ trunk/mdtools/md_code/InitializeFromFile.cpp 2003/01/30 20:03:37 254 @@ -11,6 +11,9 @@ #include "ReadWrite.hpp" #include "simError.h" +#ifdef IS_MPI +#include "mpiSimulation.hpp" +#endif // is_mpi InitializeFromFile :: InitializeFromFile( char *in_name ){ #ifdef IS_MPI @@ -59,31 +62,31 @@ void InitializeFromFile :: read_xyz( SimInfo* the_entr int i; // loop counter + const int BUFFERSIZE = 2000; // size of the read buffer int n_atoms; // the number of atoms - char read_buffer[2000]; //the line buffer for reading + char read_buffer[BUFFERSIZE]; //the line buffer for reading #ifdef IS_MPI - char send_buffer[2000]; + char send_buffer[BUFFERSIZE]; #endif char *eof_test; // ptr to see when we reach the end of the file - char *foo; // the pointer to the current string token + char *parseErr; + int procIndex; - double rx, ry, rz; // position place holders - double vx, vy, vz; // velocity placeholders - double q[4]; // the quaternions - double jx, jy, jz; // angular velocity placeholders; - double qSqr, qLength; // needed to normalize the quaternion vector. + entry_plug = the_entry_plug; - entry_plug = the_entry_plug - #ifndef IS_MPI eof_test = fgets(read_buffer, sizeof(read_buffer), c_in_file); if( eof_test == NULL ){ - std::cerr << "error reading 1st line of" << c_in_name << "\n"; + sprintf( painCave.errMsg, + "InitializeFromFile error: error reading 1st line of \"%s\"\n", + c_in_name ); + painCave.isFatal = 1; + simError(); } - (void)sscanf(read_buffer, "%d", &n_atoms); + n_atoms = atoi( read_buffer ); Atom **atoms = entry_plug->atoms; DirectionalAtom* dAtom; @@ -120,214 +123,27 @@ void InitializeFromFile :: read_xyz( SimInfo* the_entr simError(); } - foo = strtok(read_buffer, " ,;\t"); - // check the atom name to the current atom - - if( strcmp( foo, atoms[i]->getType() ) ){ - sprintf( painCave.errMsg, - "Initialize from file error. Atom %s at index %d " - "in file %s does not" - " match the BASS atom %s.\n", - foo, i, c_in_name, atoms[i]->getType() ); + parseErr = parseDumpLine( read_buffer, i ); + if( parseErr != NULL ){ + strcpy( painCave.errMsg, parseErr ); painCave.isFatal = 1; simError(); - } - - // get the positions - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading postition x from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &rx ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading postition y from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &ry ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading postition z from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &rz ); - - // get the velocities - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading velocity x from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &vx ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading velocity y from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &vy ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading velocity z from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &vz ); - - - // get the quaternions - - if( atoms[i]->isDirectional() ){ - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf(painCave.errMsg, - "error in reading quaternion 0 from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &q[0] ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading quaternion 1 from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &q[1] ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading quaternion 2 from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &q[2] ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading quaternion 3 from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &q[3] ); - - // get the angular velocities - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading angular momentum jx from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &jx ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading angular momentum jy from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &jy ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading angular momentum jz from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &jz ); - - dAtom = ( DirectionalAtom* )atoms[i]; - - // check that the quaternion vector is normalized - - qSqr = (q[0] * q[0]) + (q[1] * q[1]) + (q[2] * q[2]) + (q[3] * q[3]); - - qLength = sqrt( qSqr ); - q[0] = q[0] / qLength; - q[1] = q[1] / qLength; - q[2] = q[2] / qLength; - q[3] = q[3] / qLength; - - dAtom->setQ( q ); - - // add the angular velocities - - dAtom->setJx( jx ); - dAtom->setJy( jy ); - dAtom->setJz( jz ); - } - - // add the positions and velocities to the atom - - atoms[i]->setX( rx ); - atoms[i]->setY( ry ); - atoms[i]->setZ( rz ); - - atoms[i]->set_vx( vx ); - atoms[i]->set_vy( vy ); - atoms[i]->set_vz( vz ); - + } } // MPI Section of code.......... #else //IS_MPI + int masterIndex; + int nodeAtomsStart; + int nodeAtomsEnd; + int mpiErr; + int sendError; + MPI_Status istatus[MPI_STATUS_SIZE]; - if (worldRank == 0) { eof_test = fgets(read_buffer, sizeof(read_buffer), c_in_file); if( eof_test == NULL ){ @@ -337,12 +153,15 @@ void InitializeFromFile :: read_xyz( SimInfo* the_entr simError(); } - (void)sscanf(read_buffer, "%d", &n_atoms); + n_atoms = atoi( read_buffer ); Atom **atoms = entry_plug->atoms; DirectionalAtom* dAtom; + + // Check to see that the number of atoms in the intial configuration file is the + // same as declared in simBass. - if( n_atoms != entry_plug->n_atoms ){ + if( n_atoms != mpiSim->getTotAtoms() ){ sprintf( painCave.errMsg, "Initialize from File error. %s n_atoms, %d, " "does not match the BASS file's n_atoms, %d.\n", @@ -360,221 +179,334 @@ void InitializeFromFile :: read_xyz( SimInfo* the_entr painCave.isFatal = 1; simError(); } - } - for( i=0; i < n_atoms; i++){ + + // Read Proc 0 share of the xyz file... + masterIndex = 0; + for( i=0; i <= mpiSim->getMyAtomEnd(); i++){ - eof_test = fgets(read_buffer, sizeof(read_buffer), c_in_file); - if(eof_test == NULL){ - sprintf(painCave.errMsg, - "error in reading file %s\n" - "natoms = %d; index = %d\n" - "error reading the line from the file.\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); + eof_test = fgets(read_buffer, sizeof(read_buffer), c_in_file); + if(eof_test == NULL){ + sprintf(painCave.errMsg, + "error in reading file %s\n" + "natoms = %d; index = %d\n" + "error reading the line from the file.\n", + c_in_name, n_atoms, i ); + painCave.isFatal = 1; + simError(); + } + + parseErr = parseDumpLine( read_buffer, i ); + if( parseErr != NULL ){ + strcpy( painCave.errMsg, parseErr ); + painCave.isFatal = 1; + simError(); + } + masterIndex++; } + } - foo = strtok(read_buffer, " ,;\t"); - - // check the atom name to the current atom + sprintf(checkPointMsg, + "Node 0 has successfully read positions from input file."); + MPIcheckPoint(); - if( strcmp( foo, atoms[i]->getType() ) ){ - sprintf( painCave.errMsg, - "Initialize from file error. Atom %s at index %d " - "in file %s does not" - " match the BASS atom %s.\n", - foo, i, c_in_name, atoms[i]->getType() ); - painCave.isFatal = 1; - simError(); + for (procIndex = 1; procIndex < mpiSim->getNumberProcessors(); + procIndex++){ + if (worldRank == 0) { + + mpiErr = MPI_Recv(&nodeAtomsStart,1,MPI_INT,procIndex,MPI_ANY_TAG,MPI_COMM_WORLD, + istatus); + + mpiErr = MPI_Recv(&nodeAtomsEnd,1,MPI_INT,procIndex,MPI_ANY_TAG,MPI_COMM_WORLD, + istatus); + // Make sure where node 0 is reading from, matches where the receiving node + // expects it to be. + + if (masterIndex != nodeAtomsStart){ + sendError = 1; + mpiErr = MPI_Send(&sendError,1,MPI_INT,procIndex,MPI_ANY_TAG,MPI_COMM_WORLD); + sprintf(painCave.errMsg, + "Initialize from file error: atoms start index (%d) for " + "node %d not equal to master index (%d)",nodeAtomsStart,procIndex,masterIndex ); + painCave.isFatal = 1; + simError(); + } + sendError = 0; + mpiErr = MPI_Send(&sendError,1,MPI_INT,procIndex,MPI_ANY_TAG,MPI_COMM_WORLD); + + for ( i = nodeAtomsStart; i <= nodeAtomsEnd; i++){ + eof_test = fgets(read_buffer, sizeof(read_buffer), c_in_file); + if(eof_test == NULL){ + + sprintf(read_buffer,"ERROR"); + mpiErr = MPI_Send(read_buffer,BUFFERSIZE,MPI_CHAR,procIndex,MPI_ANY_TAG,MPI_COMM_WORLD); + + sprintf(painCave.errMsg, + "error in reading file %s\n" + "natoms = %d; index = %d\n" + "error reading the line from the file.\n", + c_in_name, n_atoms, i ); + painCave.isFatal = 1; + simError(); + } + + mpiErr = MPI_Send(read_buffer,BUFFERSIZE,MPI_CHAR,procIndex,MPI_ANY_TAG,MPI_COMM_WORLD); + mpiErr = MPI_Recv(&sendError,1,MPI_INT,procIndex,MPI_ANY_TAG,MPI_COMM_WORLD, + istatus); + if (sendError) MPIcheckPoint(); + + masterIndex++; + } } - - // get the positions + + + else if(worldRank == procIndex){ + nodeAtomsStart = mpiSim->getMyAtomStart(); + nodeAtomsEnd = mpiSim->getMyAtomEnd(); + mpiErr = MPI_Send(&nodeAtomsStart,1,MPI_INT,0,MPI_ANY_TAG,MPI_COMM_WORLD); + mpiErr = MPI_Send(&nodeAtomsEnd,1,MPI_INT,0,MPI_ANY_TAG,MPI_COMM_WORLD); + + mpiErr = MPI_Recv(&sendError,1,MPI_INT,0,MPI_ANY_TAG,MPI_COMM_WORLD, + istatus); + if (sendError) MPIcheckPoint(); + + for ( i = 0; i < entry_plug->n_atoms; i++){ + + mpiErr = MPI_Recv(&read_buffer,BUFFERSIZE,MPI_CHAR,0,MPI_ANY_TAG,MPI_COMM_WORLD, + istatus); + + if(!strcmp(read_buffer, "ERROR")) MPIcheckPoint(); + + parseErr = parseDumpLine( read_buffer, i ); + if( parseErr != NULL ){ + sendError = 1; + mpiErr = MPI_Send(&sendError,1,MPI_INT,0,MPI_ANY_TAG,MPI_COMM_WORLD); + + + strcpy( painCave.errMsg, parseErr ); + painCave.isFatal = 1; + simError(); + } + sendError = 0; + mpiErr = MPI_Send(&sendError,1,MPI_INT,0,MPI_ANY_TAG,MPI_COMM_WORLD); + } + } + sprintf(checkPointMsg,"Node %d received initial configuration.",procIndex); + MPIcheckPoint(); + } +#endif +} + + +char* InitializeFromFile::parseDumpLine(char* readLine, int atomIndex){ + + char *foo; // the pointer to the current string token + + double rx, ry, rz; // position place holders + double vx, vy, vz; // velocity placeholders + double q[4]; // the quaternions + double jx, jy, jz; // angular velocity placeholders; + double qSqr, qLength; // needed to normalize the quaternion vector. + + Atom **atoms = entry_plug->atoms; + DirectionalAtom* dAtom; + + int n_atoms; + +#ifdef IS_MPI + n_atoms = mpiSim->getTotAtoms(); +#else + n_atoms = entry_plug->n_atoms; +#endif // is_mpi + + + // set the string tokenizer + + foo = strtok(readLine, " ,;\t"); + + // check the atom name to the current atom + + if( strcmp( foo, atoms[atomIndex]->getType() ) ){ + sprintf( painCave.errMsg, + "Initialize from file error. Atom %s at index %d " + "in file %s does not" + " match the BASS atom %s.\n", + foo, atomIndex, c_in_name, atoms[atomIndex]->getType() ); + return strdup( painCave.errMsg ); + } + + // get the positions + + foo = strtok(NULL, " ,;\t"); + if(foo == NULL){ + sprintf( painCave.errMsg, + "error in reading postition x from %s\n" + "natoms = %d, index = %d\n", + c_in_name, n_atoms, atomIndex ); + return strdup( painCave.errMsg ); + } + rx = atof( foo ); + + foo = strtok(NULL, " ,;\t"); + if(foo == NULL){ + sprintf( painCave.errMsg, + "error in reading postition y from %s\n" + "natoms = %d, index = %d\n", + c_in_name, n_atoms, atomIndex ); + return strdup( painCave.errMsg ); + } + ry = atof( foo ); + + foo = strtok(NULL, " ,;\t"); + if(foo == NULL){ + sprintf( painCave.errMsg, + "error in reading postition z from %s\n" + "natoms = %d, index = %d\n", + c_in_name, n_atoms, atomIndex ); + return strdup( painCave.errMsg ); + } + rz = atof( foo ); + + + // get the velocities + + foo = strtok(NULL, " ,;\t"); + if(foo == NULL){ + sprintf( painCave.errMsg, + "error in reading velocity x from %s\n" + "natoms = %d, index = %d\n", + c_in_name, n_atoms, atomIndex ); + return strdup( painCave.errMsg ); + } + vx = atof( foo ); + + foo = strtok(NULL, " ,;\t"); + if(foo == NULL){ + sprintf( painCave.errMsg, + "error in reading velocity y from %s\n" + "natoms = %d, index = %d\n", + c_in_name, n_atoms, atomIndex ); + return strdup( painCave.errMsg ); + } + vy = atof( foo ); + + foo = strtok(NULL, " ,;\t"); + if(foo == NULL){ + sprintf( painCave.errMsg, + "error in reading velocity z from %s\n" + "natoms = %d, index = %d\n", + c_in_name, n_atoms, atomIndex ); + return strdup( painCave.errMsg ); + } + vz = atof( foo ); + + + // get the quaternions + + if( atoms[atomIndex]->isDirectional() ){ + foo = strtok(NULL, " ,;\t"); if(foo == NULL){ + sprintf(painCave.errMsg, + "error in reading quaternion 0 from %s\n" + "natoms = %d, index = %d\n", + c_in_name, n_atoms, atomIndex ); + return strdup( painCave.errMsg ); + } + q[0] = atof( foo ); + + foo = strtok(NULL, " ,;\t"); + if(foo == NULL){ sprintf( painCave.errMsg, - "error in reading postition x from %s\n" + "error in reading quaternion 1 from %s\n" "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); + c_in_name, n_atoms, atomIndex ); + return strdup( painCave.errMsg ); } - (void)sscanf( foo, "%lf", &rx ); - + q[1] = atof( foo ); + foo = strtok(NULL, " ,;\t"); if(foo == NULL){ sprintf( painCave.errMsg, - "error in reading postition y from %s\n" + "error in reading quaternion 2 from %s\n" "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); + c_in_name, n_atoms, atomIndex ); + return strdup( painCave.errMsg ); } - (void)sscanf( foo, "%lf", &ry ); - + q[2] = atof( foo ); + foo = strtok(NULL, " ,;\t"); if(foo == NULL){ sprintf( painCave.errMsg, - "error in reading postition z from %s\n" + "error in reading quaternion 3 from %s\n" "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); + c_in_name, n_atoms, atomIndex ); + return strdup( painCave.errMsg ); } - (void)sscanf( foo, "%lf", &rz ); - - // get the velocities - + q[3] = atof( foo ); + + // get the angular velocities + foo = strtok(NULL, " ,;\t"); if(foo == NULL){ sprintf( painCave.errMsg, - "error in reading velocity x from %s\n" + "error in reading angular momentum jx from %s\n" "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); + c_in_name, n_atoms, atomIndex ); + return strdup( painCave.errMsg ); } - (void)sscanf( foo, "%lf", &vx ); - + jx = atof( foo ); + foo = strtok(NULL, " ,;\t"); if(foo == NULL){ sprintf( painCave.errMsg, - "error in reading velocity y from %s\n" + "error in reading angular momentum jy from %s\n" "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); + c_in_name, n_atoms, atomIndex ); + return strdup( painCave.errMsg ); } - (void)sscanf( foo, "%lf", &vy ); - + jy = atof(foo ); + foo = strtok(NULL, " ,;\t"); if(foo == NULL){ sprintf( painCave.errMsg, - "error in reading velocity z from %s\n" + "error in reading angular momentum jz from %s\n" "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); + c_in_name, n_atoms, atomIndex ); + return strdup( painCave.errMsg ); } - (void)sscanf( foo, "%lf", &vz ); - - - // get the quaternions - - if( atoms[i]->isDirectional() ){ + jz = atof( foo ); - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf(painCave.errMsg, - "error in reading quaternion 0 from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &q[0] ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading quaternion 1 from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &q[1] ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading quaternion 2 from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &q[2] ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading quaternion 3 from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &q[3] ); - - // get the angular velocities - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading angular momentum jx from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &jx ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading angular momentum jy from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &jy ); - - foo = strtok(NULL, " ,;\t"); - if(foo == NULL){ - sprintf( painCave.errMsg, - "error in reading angular momentum jz from %s\n" - "natoms = %d, index = %d\n", - c_in_name, n_atoms, i ); - painCave.isFatal = 1; - simError(); - } - (void)sscanf( foo, "%lf", &jz ); - - dAtom = ( DirectionalAtom* )atoms[i]; + dAtom = ( DirectionalAtom* )atoms[atomIndex]; - // check that the quaternion vector is normalized + // check that the quaternion vector is normalized - qSqr = (q[0] * q[0]) + (q[1] * q[1]) + (q[2] * q[2]) + (q[3] * q[3]); + qSqr = (q[0] * q[0]) + (q[1] * q[1]) + (q[2] * q[2]) + (q[3] * q[3]); - qLength = sqrt( qSqr ); - q[0] = q[0] / qLength; - q[1] = q[1] / qLength; - q[2] = q[2] / qLength; - q[3] = q[3] / qLength; + qLength = sqrt( qSqr ); + q[0] = q[0] / qLength; + q[1] = q[1] / qLength; + q[2] = q[2] / qLength; + q[3] = q[3] / qLength; - dAtom->setQ( q ); + dAtom->setQ( q ); - // add the angular velocities + // add the angular velocities - dAtom->setJx( jx ); - dAtom->setJy( jy ); - dAtom->setJz( jz ); - } + dAtom->setJx( jx ); + dAtom->setJy( jy ); + dAtom->setJz( jz ); + } - // add the positions and velocities to the atom + // add the positions and velocities to the atom - atoms[i]->setX( rx ); - atoms[i]->setY( ry ); - atoms[i]->setZ( rz ); + atoms[atomIndex]->setX( rx ); + atoms[atomIndex]->setY( ry ); + atoms[atomIndex]->setZ( rz ); - atoms[i]->set_vx( vx ); - atoms[i]->set_vy( vy ); - atoms[i]->set_vz( vz ); - - } -#endif -} + atoms[atomIndex]->set_vx( vx ); + atoms[atomIndex]->set_vy( vy ); + atoms[atomIndex]->set_vz( vz ); -char* IntitializeFromFile::parseDumpLine(char* readLine); + return NULL; +}