ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/DirectionalAtom.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/DirectionalAtom.cpp (file contents):
Revision 1097 by gezelter, Mon Apr 12 20:32:20 2004 UTC vs.
Revision 1452 by tim, Mon Aug 23 15:11:36 2004 UTC

# Line 35 | Line 35 | void DirectionalAtom::setCoords(void){
35                       &trq,
36                       &Amat,
37                       &mu,  
38 <                     &ul );
38 >                     &ul,
39 >                     &quat);
40    }
41    else{
42      sprintf( painCave.errMsg,
# Line 431 | Line 432 | void DirectionalAtom::getTrq( double theT[3] ){
432      
433      sprintf( painCave.errMsg,
434               "Attempt to get Trq for atom %d before coords set.\n",
435 +             index );
436 +    painCave.isFatal = 1;
437 +    simError();
438 +  }
439 + }
440 +
441 + void DirectionalAtom::setTrq( double theT[3] ){
442 +  
443 +  if( hasCoords ){
444 +    trq[offsetX] = theT[0];
445 +    trq[offsetY] = theT[1];
446 +    trq[offsetZ] = theT[2];
447 +  }
448 +  else{
449 +    
450 +    sprintf( painCave.errMsg,
451 +             "Attempt to add Trq for atom %d before coords set.\n",
452               index );
453      painCave.isFatal = 1;
454      simError();
# Line 539 | Line 557 | void DirectionalAtom::getEulerAngles(double myEuler[3]
557    
558    
559    double phi,theta,psi,eps;
560 <  double pi;
543 <  double cphi,ctheta,cpsi;
544 <  double sphi,stheta,spsi;
545 <  double b[3];
546 <  int flip[3];
560 >  double ctheta,stheta;
561  
562    // set the tolerance for Euler angles and rotation elements
563    
# Line 583 | Line 597 | void DirectionalAtom::getEulerAngles(double myEuler[3]
597    myEuler[2] = psi;
598    
599    return;
600 + }
601 +
602 + double DirectionalAtom::getZangle( ){
603 +  
604 +  if( hasCoords ){
605 +    return zAngle;
606 +  }
607 +  else{
608 +    
609 +    sprintf( painCave.errMsg,
610 +             "Attempt to get zAngle for atom %d before coords set.\n",
611 +             index );
612 +    painCave.isFatal = 1;
613 +    simError();
614 +    return 0;
615 +  }
616   }
617  
618 + void DirectionalAtom::setZangle( double zAng ){
619 +  
620 +  if( hasCoords ){
621 +    zAngle = zAng;
622 +  }
623 +  else{
624 +    
625 +    sprintf( painCave.errMsg,
626 +             "Attempt to set zAngle for atom %d before coords set.\n",
627 +             index );
628 +    painCave.isFatal = 1;
629 +    simError();
630 +  }
631 + }
632 +
633 + void DirectionalAtom::addZangle( double zAng ){
634 +  
635 +  if( hasCoords ){
636 +    zAngle += zAng;
637 +  }
638 +  else{
639 +    
640 +    sprintf( painCave.errMsg,
641 +             "Attempt to add zAngle to atom %d before coords set.\n",
642 +             index );
643 +    painCave.isFatal = 1;
644 +    simError();
645 +  }
646 + }
647 +
648   double DirectionalAtom::max(double x, double  y) {  
649    return (x > y) ? x : y;
650   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines