39 |
|
|
40 |
|
logical :: do_pot, do_stress |
41 |
|
|
42 |
< |
integer atom1, atom2, me1, me2 |
42 |
> |
integer atom1, atom2, me1, me2, id1, id2 |
43 |
|
real(kind=dp) :: rij, mu1, mu2 |
44 |
|
real(kind=dp) :: dfact1, dfact2, dip2, r2, r3, r5 |
45 |
|
real(kind=dp) :: dudx, dudy, dudz, dudu1x, dudu1y, dudu1z |
175 |
|
t(2,atom2) = t(2,atom2) - ul2(3)*dudu2x + ul2(1)*dudu2z |
176 |
|
t(3,atom2) = t(3,atom2) - ul2(1)*dudu2y + ul2(2)*dudu2x |
177 |
|
#endif |
178 |
< |
|
178 |
> |
|
179 |
> |
#ifdef IS_MPI |
180 |
> |
id1 = tagRow(atom1) |
181 |
> |
id2 = tagColumn(atom2) |
182 |
> |
#else |
183 |
> |
id1 = atom1 |
184 |
> |
id2 = atom2 |
185 |
> |
#endif |
186 |
|
if (do_stress) then |
187 |
|
|
188 |
< |
if (molMembershipList(atom1) .ne. molMembershipList(atom2)) then |
188 |
> |
if (molMembershipList(id1) .ne. molMembershipList(id2)) then |
189 |
|
|
190 |
|
! because the d vector is the rj - ri vector, and |
191 |
|
! because dudx, dudy, dudz are the (positive) force on |