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

Comparing trunk/OOPSE/libmdtools/NPTi.cpp (file contents):
Revision 575 by gezelter, Tue Jul 8 21:06:14 2003 UTC vs.
Revision 577 by gezelter, Wed Jul 9 01:41:11 2003 UTC

# Line 65 | Line 65 | void NPTi::moveA() {
65  
66      // position whole step    
67  
68 <    for( j=atomIndex; j<(atomIndex+3); j=j+3 ) {
69 <      rj[0] = pos[j];
70 <      rj[1] = pos[j+1];
71 <      rj[2] = pos[j+2];
68 >    rj[0] = pos[atomIndex];
69 >    rj[1] = pos[atomIndex+1];
70 >    rj[2] = pos[atomIndex+2];
71 >    
72 >    info->wrapVector(rj);
73  
74 <      info->wrapVector(rj);
75 <
76 <      pos[j] += dt * (vel[j] + eta*rj[0]);
76 <      pos[j+1] += dt * (vel[j+1] + eta*rj[1]);
77 <      pos[j+2] += dt * (vel[j+2] + eta*rj[2]);
78 <    }
79 <
80 <    // Scale the box after all the positions have been moved:
81 <
82 <    info->scaleBox(exp(dt*eta));
74 >    pos[atomIndex] += dt * (vel[atomIndex] + eta*rj[0]);
75 >    pos[atomIndex+1] += dt * (vel[atomIndex+1] + eta*rj[1]);
76 >    pos[atomIndex+2] += dt * (vel[atomIndex+2] + eta*rj[2]);
77    
78      if( atoms[i]->isDirectional() ){
79  
# Line 132 | Line 126 | void NPTi::moveA() {
126      }
127      
128    }
129 +  // Scale the box after all the positions have been moved:
130 +
131 +  info->scaleBox(exp(dt*eta));
132 +
133   }
134  
135   void NPTi::moveB( void ){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines