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(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 |
|
|
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 ){ |