--- trunk/mdtools/md_code/Symplectic.cpp 2002/07/09 18:40:59 11 +++ trunk/mdtools/md_code/Symplectic.cpp 2002/07/09 21:46:32 25 @@ -129,6 +129,7 @@ void Symplectic::integrate( void ){ double angle; // the angle through which to rotate the rotation matrix double A[3][3]; // the rotation matrix + int time; double dt = entry_plug->dt; double runTime = entry_plug->run_time; @@ -170,6 +171,9 @@ void Symplectic::integrate( void ){ tStats->velocitize(); } + dump_out->writeDump( 0.0 ); + e_out->writeStat( 0.0 ); + if( n_constrained ){ double *Rx = new double[nAtoms]; @@ -358,12 +362,14 @@ void Symplectic::integrate( void ){ dAtom->setJz( ji[2] ); } } - - if( entry_plug->setTemp ){ - if( !(tl % vel_n) ) tStats->velocitize(); + + time = tl + 1; + + if( entry_plug->setTemp ){ + if( !(time % vel_n) ) tStats->velocitize(); } - if( !(tl % sample_n) ) dump_out->writeDump( tl * dt ); - if( !(tl % status_n) ) e_out->writeStat( tl * dt ); + if( !(time % sample_n) ) dump_out->writeDump( time * dt ); + if( !(time % status_n) ) e_out->writeStat( time * dt ); } } else{ @@ -521,12 +527,14 @@ void Symplectic::integrate( void ){ dAtom->setJz( ji[2] ); } } - + + time = tl + 1; + if( entry_plug->setTemp ){ - if( !(tl % vel_n) ) tStats->velocitize(); + if( !(time % vel_n) ) tStats->velocitize(); } - if( !(tl % sample_n) ) dump_out->writeDump( tl * dt ); - if( !(tl % status_n) ) e_out->writeStat( tl * dt ); + if( !(time % sample_n) ) dump_out->writeDump( time * dt ); + if( !(time % status_n) ) e_out->writeStat( time * dt ); } }