4 |
|
|
5 |
|
!! @author Charles F. Vardeman II |
6 |
|
!! @author Matthew Meineke |
7 |
< |
!! @version $Id: do_Forces.F90,v 1.1.1.1 2003-03-21 17:42:12 mmeineke Exp $, $Date: 2003-03-21 17:42:12 $, $Name: not supported by cvs2svn $, $Revision: 1.1.1.1 $ |
7 |
> |
!! @version $Id: do_Forces.F90,v 1.2 2003-03-21 22:11:50 chuckv Exp $, $Date: 2003-03-21 22:11:50 $, $Name: not supported by cvs2svn $, $Revision: 1.2 $ |
8 |
|
|
9 |
|
module do_Forces |
10 |
|
use force_globals |
323 |
|
|
324 |
|
inner: do j = i+1, natoms |
325 |
|
|
326 |
< |
if (skipThisPair(i,j)) cycle inner |
327 |
< |
|
326 |
> |
if (skipThisPair(i,j)) cycle inner |
327 |
> |
|
328 |
|
call get_interatomic_vector(q(:,i), q(:,j), d, rijsq) |
329 |
|
|
330 |
+ |
|
331 |
|
if (rijsq < rlistsq) then |
332 |
|
|
333 |
|
nlist = nlist + 1 |
533 |
|
|
534 |
|
call do_dipole_pair(i, j, d, r, rijsq, pot, u_l, f, t, & |
535 |
|
do_pot, do_stress) |
535 |
– |
|
536 |
|
if (FF_uses_RF .and. SimUsesRF()) then |
537 |
– |
|
537 |
|
call accumulate_rf(i, j, r, u_l) |
538 |
|
call rf_correct_forces(i, j, d, r, u_l, f, do_stress) |
540 |
– |
|
539 |
|
endif |
540 |
|
|
541 |
|
endif |
545 |
|
|
546 |
|
call getElementProperty(atypes, me_i, "is_Sticky", is_Sticky_i) |
547 |
|
call getElementProperty(atypes, me_j, "is_Sticky", is_Sticky_j) |
548 |
< |
|
548 |
> |
|
549 |
|
if ( is_Sticky_i .and. is_Sticky_j ) then |
550 |
|
call do_sticky_pair(i, j, d, r, rijsq, A, pot, f, t, & |
551 |
|
do_pot, do_stress) |
647 |
|
end subroutine zero_work_arrays |
648 |
|
|
649 |
|
function skipThisPair(atom1, atom2) result(skip_it) |
652 |
– |
|
650 |
|
integer, intent(in) :: atom1 |
651 |
|
integer, intent(in), optional :: atom2 |
652 |
|
logical :: skip_it |
653 |
|
integer :: unique_id_1, unique_id_2 |
654 |
+ |
integer :: me_i,me_j |
655 |
|
integer :: i |
656 |
|
|
657 |
|
skip_it = .false. |
669 |
|
!! in the normal loop, the atom numbers are unique |
670 |
|
unique_id_1 = atom1 |
671 |
|
#endif |
672 |
< |
|
672 |
> |
|
673 |
|
!! We were called with only one atom, so just check the global exclude |
674 |
|
!! list for this atom |
675 |
|
if (.not. present(atom2)) then |
713 |
|
return |
714 |
|
endif |
715 |
|
enddo |
716 |
< |
|
716 |
> |
|
717 |
|
do i = 1, nExcludes_local |
718 |
|
if (excludesLocal(1,i) == unique_id_1) then |
719 |
|
if (excludesLocal(2,i) == unique_id_2) then |