190 |
|
real (kind = dp), dimension(3) :: ul2 |
191 |
|
real (kind = dp) :: dtdr |
192 |
|
real (kind = dp) :: dudx, dudy, dudz, u1dotu2 |
193 |
< |
integer :: me1, me2 |
193 |
> |
integer :: me1, me2, id1, id2 |
194 |
|
real (kind = dp) :: mu1, mu2 |
195 |
|
|
196 |
|
if (.not.rf_initialized) then |
257 |
|
#endif |
258 |
|
|
259 |
|
if (do_stress) then |
260 |
– |
if (molMembershipList(atom1) .ne. molMembershipList(atom2)) then |
260 |
|
|
261 |
+ |
#ifdef IS_MPI |
262 |
+ |
id1 = tagRow(atom1) |
263 |
+ |
id2 = tagColumn(atom2) |
264 |
+ |
#else |
265 |
+ |
id1 = atom1 |
266 |
+ |
id2 = atom2 |
267 |
+ |
#endif |
268 |
+ |
|
269 |
+ |
if (molMembershipList(id1) .ne. molMembershipList(id2)) then |
270 |
+ |
|
271 |
|
! because the d vector is the rj - ri vector, and |
272 |
|
! because dudx, dudy, and dudz are the |
273 |
|
! (positive) force on atom i (negative on atom j) we need |