--- trunk/OOPSE/libmdtools/DumpWriter.cpp 2003/04/07 20:06:31 469 +++ trunk/OOPSE/libmdtools/DumpWriter.cpp 2003/07/02 21:26:55 572 @@ -23,14 +23,10 @@ DumpWriter::DumpWriter( SimInfo* the_entry_plug ){ entry_plug = the_entry_plug; - std::cerr << "Look at me I'm a freebird!\n"; - #ifdef IS_MPI if(worldRank == 0 ){ #endif // is_mpi - - strcpy( outName, entry_plug->sampleName ); outFile.open(outName, ios::out | ios::trunc ); @@ -44,8 +40,6 @@ DumpWriter::DumpWriter( SimInfo* the_entry_plug ){ simError(); } - std::cerr << "me TOO!\n"; - //outFile.setf( ios::scientific ); #ifdef IS_MPI @@ -88,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; @@ -313,7 +324,7 @@ void DumpWriter::writeDump( double currentTime ){ #endif // is_mpi } -void DumpWriter::writeFinal(){ +void DumpWriter::writeFinal(double finalTime){ char finalName[500]; ofstream finalOut; @@ -359,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: