--- trunk/OOPSE/libmdtools/DumpWriter.cpp 2003/04/03 20:21:54 447 +++ trunk/OOPSE/libmdtools/DumpWriter.cpp 2003/07/02 21:26:55 572 @@ -27,8 +27,6 @@ DumpWriter::DumpWriter( SimInfo* the_entry_plug ){ if(worldRank == 0 ){ #endif // is_mpi - - strcpy( outName, entry_plug->sampleName ); outFile.open(outName, ios::out | ios::trunc ); @@ -41,7 +39,7 @@ DumpWriter::DumpWriter( SimInfo* the_entry_plug ){ painCave.isFatal = 1; simError(); } - + //outFile.setf( ios::scientific ); #ifdef IS_MPI @@ -72,7 +70,7 @@ void DumpWriter::writeDump( double currentTime ){ char tempBuffer[BUFFERSIZE]; char writeLine[BUFFERSIZE]; - int i, j, which_node, done, game_over, which_atom, local_index; + int i, j, which_node, done, which_atom, local_index; double q[4]; DirectionalAtom* dAtom; int nAtoms = entry_plug->n_atoms; @@ -84,9 +82,17 @@ void DumpWriter::writeDump( double currentTime ){ outFile << nAtoms << "\n"; outFile << currentTime << "\t" - << entry_plug->box_x << "\t" - << entry_plug->box_y << "\t" - << entry_plug->box_z << "\n"; + << entry_plug->Hmat[0] << "\t" + << entry_plug->Hmat[1] << "\t" + << entry_plug->Hmat[2] << "\t" + + << entry_plug->Hmat[3] << "\t" + << entry_plug->Hmat[4] << "\t" + << entry_plug->Hmat[5] << "\t" + + << entry_plug->Hmat[6] << "\t" + << entry_plug->Hmat[7] << "\t" + << entry_plug->Hmat[8] << "\n"; for( i=0; igetTotAtoms() << "\n"; - + outFile << currentTime << "\t" - << entry_plug->box_x << "\t" - << entry_plug->box_y << "\t" - << entry_plug->box_z << "\n"; + << entry_plug->Hmat[0] << "\t" + << entry_plug->Hmat[1] << "\t" + << entry_plug->Hmat[2] << "\t" + + << entry_plug->Hmat[3] << "\t" + << entry_plug->Hmat[4] << "\t" + << entry_plug->Hmat[5] << "\t" + + << entry_plug->Hmat[6] << "\t" + << entry_plug->Hmat[7] << "\t" + << entry_plug->Hmat[8] << "\n"; + ; outFile.flush(); for (i = 0 ; i < mpiSim->getTotAtoms(); i++ ) { // Get the Node number which has this atom; @@ -309,7 +324,7 @@ void DumpWriter::writeDump( double currentTime ){ #endif // is_mpi } -void DumpWriter::writeFinal(){ +void DumpWriter::writeFinal(double finalTime){ char finalName[500]; ofstream finalOut; @@ -355,9 +370,18 @@ void DumpWriter::writeFinal(){ finalOut << nAtoms << "\n"; - finalOut << entry_plug->box_x << "\t" - << entry_plug->box_y << "\t" - << entry_plug->box_z << "\n"; + finalOut << finalTime << "\t" + << entry_plug->Hmat[0] << "\t" + << entry_plug->Hmat[1] << "\t" + << entry_plug->Hmat[2] << "\t" + + << entry_plug->Hmat[3] << "\t" + << entry_plug->Hmat[4] << "\t" + << entry_plug->Hmat[5] << "\t" + + << entry_plug->Hmat[6] << "\t" + << entry_plug->Hmat[7] << "\t" + << entry_plug->Hmat[8] << "\n"; for( i=0; igetTotAtoms() << "\n"; - finalOut << entry_plug->box_x << "\t" - << entry_plug->box_y << "\t" - << entry_plug->box_z << "\n"; + finalOut << finalTime << "\t" + << entry_plug->Hmat[0] << "\t" + << entry_plug->Hmat[1] << "\t" + << entry_plug->Hmat[2] << "\t" + + << entry_plug->Hmat[3] << "\t" + << entry_plug->Hmat[4] << "\t" + << entry_plug->Hmat[5] << "\t" + + << entry_plug->Hmat[6] << "\t" + << entry_plug->Hmat[7] << "\t" + << entry_plug->Hmat[8] << "\n"; for (i = 0 ; i < mpiSim->getTotAtoms(); i++ ) { // Get the Node number which has this molecule: