| 127 | 
  | 
void Verlet::integrate( void ){ | 
| 128 | 
  | 
   | 
| 129 | 
  | 
  int i, j; /* loop counters */ | 
| 130 | 
< | 
   | 
| 130 | 
> | 
  int calcPot; | 
| 131 | 
> | 
 | 
| 132 | 
  | 
  double kE; | 
| 133 | 
  | 
 | 
| 134 | 
  | 
  double *Rx = new double[c_natoms]; | 
| 164 | 
  | 
  // the first time integrate is called, the forces need to be initialized  | 
| 165 | 
  | 
 | 
| 166 | 
  | 
   | 
| 167 | 
< | 
  myFF->doForces(); | 
| 167 | 
> | 
  myFF->doForces(1); | 
| 168 | 
  | 
   | 
| 169 | 
  | 
  if( entry_plug->setTemp ){ | 
| 170 | 
  | 
    tStats->velocitize(); | 
| 171 | 
  | 
  } | 
| 172 | 
  | 
   | 
| 173 | 
  | 
  dump_out->writeDump( 0.0 ); | 
| 174 | 
+ | 
 | 
| 175 | 
  | 
  e_out->writeStat( 0.0 ); | 
| 176 | 
+ | 
  calcPot = 0; | 
| 177 | 
  | 
 | 
| 178 | 
  | 
  if( c_is_constrained ){ | 
| 179 | 
  | 
    for(i = 0; i < n_loops; i++){ | 
| 215 | 
  | 
 | 
| 216 | 
  | 
      // calculate the forces | 
| 217 | 
  | 
       | 
| 218 | 
< | 
      myFF->doForces(); | 
| 218 | 
> | 
      myFF->doForces(calcPot); | 
| 219 | 
  | 
       | 
| 220 | 
  | 
      // finish the constrain move ( same as above. ) | 
| 221 | 
  | 
 | 
| 257 | 
  | 
        if( !(time % vel_n) ) tStats->velocitize(); | 
| 258 | 
  | 
      } | 
| 259 | 
  | 
      if( !(time % sample_n) ) dump_out->writeDump( time * dt ); | 
| 260 | 
< | 
      if( !(time % status_n) ) e_out->writeStat( time * dt ); | 
| 260 | 
> | 
      if( !((time+1) % status_n) ) calcPot = 1; | 
| 261 | 
> | 
      if( !(time % status_n) ){ e_out->writeStat( time * dt ); calcPot = 0; } | 
| 262 | 
  | 
    } | 
| 263 | 
  | 
  } | 
| 264 | 
  | 
  else{ | 
| 268 | 
  | 
       | 
| 269 | 
  | 
      // calculate the forces | 
| 270 | 
  | 
       | 
| 271 | 
< | 
      myFF->doForces(); | 
| 271 | 
> | 
      myFF->doForces(calcPot); | 
| 272 | 
  | 
             | 
| 273 | 
  | 
      // complete the verlet move | 
| 274 | 
  | 
       | 
| 279 | 
  | 
      if( entry_plug->setTemp ){ | 
| 280 | 
  | 
        if( !(time % vel_n) ) tStats->velocitize(); | 
| 281 | 
  | 
      } | 
| 282 | 
< | 
      if( !(time % sample_n) ) dump_out->writeDump( time * dt ); | 
| 283 | 
< | 
      if( !(time % status_n) ) e_out->writeStat( time * dt ); | 
| 282 | 
> | 
      if( !(time % sample_n) )  dump_out->writeDump( time * dt ); | 
| 283 | 
> | 
      if( !((time+1) % status_n) ) calcPot = 1; | 
| 284 | 
> | 
      if( !(time % status_n) ){ e_out->writeStat( time * dt ); calcPot = 0; } | 
| 285 | 
  | 
    } | 
| 286 | 
  | 
  } | 
| 287 | 
  | 
   |