| 327 | 
  | 
  double pos[3]; // position place holders | 
| 328 | 
  | 
  double vel[3]; // velocity placeholders | 
| 329 | 
  | 
  double q[4]; // the quaternions | 
| 330 | 
< | 
  double jx, jy, jz; // angular velocity placeholders; | 
| 330 | 
> | 
  double ji[3]; // angular velocity placeholders; | 
| 331 | 
  | 
  double qSqr, qLength; // needed to normalize the quaternion vector. | 
| 332 | 
  | 
 | 
| 333 | 
  | 
  Atom **atoms = simnfo->atoms; | 
| 490 | 
  | 
               c_in_name, n_atoms, atomIndex ); | 
| 491 | 
  | 
      return strdup( painCave.errMsg ); | 
| 492 | 
  | 
    } | 
| 493 | 
< | 
    jx = atof( foo ); | 
| 493 | 
> | 
    ji[0] = atof( foo ); | 
| 494 | 
  | 
 | 
| 495 | 
  | 
    foo = strtok(NULL, " ,;\t"); | 
| 496 | 
  | 
    if(foo == NULL){ | 
| 500 | 
  | 
               c_in_name, n_atoms, atomIndex ); | 
| 501 | 
  | 
      return strdup( painCave.errMsg ); | 
| 502 | 
  | 
    } | 
| 503 | 
< | 
    jy = atof(foo ); | 
| 503 | 
> | 
    ji[1] = atof(foo ); | 
| 504 | 
  | 
 | 
| 505 | 
  | 
    foo = strtok(NULL, " ,;\t"); | 
| 506 | 
  | 
    if(foo == NULL){ | 
| 510 | 
  | 
               c_in_name, n_atoms, atomIndex ); | 
| 511 | 
  | 
      return strdup( painCave.errMsg ); | 
| 512 | 
  | 
    } | 
| 513 | 
< | 
    jz = atof( foo ); | 
| 513 | 
> | 
    ji[2] = atof( foo ); | 
| 514 | 
  | 
 | 
| 515 | 
  | 
    dAtom = ( DirectionalAtom* )atoms[atomIndex]; | 
| 516 | 
  | 
 | 
| 528 | 
  | 
 | 
| 529 | 
  | 
    // add the angular velocities | 
| 530 | 
  | 
 | 
| 531 | 
< | 
    dAtom->setJx( jx ); | 
| 532 | 
< | 
    dAtom->setJy( jy ); | 
| 533 | 
< | 
    dAtom->setJz( jz ); | 
| 531 | 
> | 
    dAtom->setJ( ji ); | 
| 532 | 
  | 
  } | 
| 533 | 
  | 
 | 
| 534 | 
  | 
  // add the positions and velocities to the atom | 
| 616 | 
  | 
      return NULL; | 
| 617 | 
  | 
     | 
| 618 | 
  | 
    //get eta | 
| 619 | 
< | 
    for(int i = 0 ; i < 9; i++){ | 
| 620 | 
< | 
      foo = strtok(NULL, " ,;\t"); | 
| 621 | 
< | 
      if(foo == NULL){ | 
| 622 | 
< | 
        sprintf( painCave.errMsg, | 
| 623 | 
< | 
                 "error in reading eta[%d] from %s\n", i, c_in_name ); | 
| 624 | 
< | 
        return strdup( painCave.errMsg ); | 
| 619 | 
> | 
    foo = strtok(NULL, " ,;\t\n"); | 
| 620 | 
> | 
    if(foo != NULL ){ | 
| 621 | 
> | 
   | 
| 622 | 
> | 
      for(int i = 0 ; i < 9; i++){ | 
| 623 | 
> | 
         | 
| 624 | 
> | 
        if(foo == NULL){ | 
| 625 | 
> | 
          sprintf( painCave.errMsg, | 
| 626 | 
> | 
                   "error in reading eta[%d] from %s\n", i, c_in_name ); | 
| 627 | 
> | 
          return strdup( painCave.errMsg ); | 
| 628 | 
> | 
        } | 
| 629 | 
> | 
        eta[i] = atof( foo ); | 
| 630 | 
> | 
        foo = strtok(NULL, " ,;\t\n"); | 
| 631 | 
  | 
      } | 
| 628 | 
– | 
      eta[i] = atof( foo ); | 
| 632 | 
  | 
    } | 
| 633 | 
+ | 
    else | 
| 634 | 
+ | 
      return NULL; | 
| 635 | 
  | 
     | 
| 636 | 
  | 
    //push eta into SimInfo::properties which can be | 
| 637 | 
  | 
    //retrieved by integrator later |