| 51 |
|
do_pot, do_stress) |
| 52 |
|
|
| 53 |
|
integer, intent(in) :: atom1, atom2 |
| 54 |
+ |
integer :: id1, id2 |
| 55 |
|
real (kind=dp), intent(inout) :: r, r2 |
| 56 |
|
real (kind=dp), dimension(3), intent(in) :: d |
| 57 |
|
real (kind=dp) :: pot |
| 353 |
|
#endif |
| 354 |
|
|
| 355 |
|
if (do_stress) then |
| 356 |
< |
if (molMembershipList(atom1) .ne. molMembershipList(atom2)) then |
| 356 |
> |
|
| 357 |
> |
#ifdef IS_MPI |
| 358 |
> |
id1 = tagRow(atom1) |
| 359 |
> |
id2 = tagColumn(atom2) |
| 360 |
> |
#else |
| 361 |
> |
id1 = atom1 |
| 362 |
> |
id2 = atom2 |
| 363 |
> |
#endif |
| 364 |
|
|
| 365 |
+ |
if (molMembershipList(id1) .ne. molMembershipList(id2)) then |
| 366 |
+ |
|
| 367 |
|
! because the d vector is the rj - ri vector, and |
| 368 |
|
! because dUdx, dUdy, dUdz are the force on atom i, we need a |
| 369 |
|
! negative sign here: |