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 578 by gezelter, Wed Jul 9 02:15:29 2003 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines