2 |
|
!! Corresponds to the force field defined in lj_FF.cpp |
3 |
|
!! @author Charles F. Vardeman II |
4 |
|
!! @author Matthew Meineke |
5 |
< |
!! @version $Id: calc_LJ_FF.F90,v 1.3 2003-03-10 23:19:23 gezelter Exp $, $Date: 2003-03-10 23:19:23 $, $Name: not supported by cvs2svn $, $Revision: 1.3 $ |
5 |
> |
!! @version $Id: calc_LJ_FF.F90,v 1.4 2003-03-11 23:13:06 gezelter Exp $, $Date: 2003-03-11 23:13:06 $, $Name: not supported by cvs2svn $, $Revision: 1.4 $ |
6 |
|
|
7 |
|
|
8 |
|
|
11 |
|
use definitions |
12 |
|
use forceGlobals |
13 |
|
use atype_typedefs |
14 |
< |
use generic_atypes |
14 |
> |
use vector_class |
15 |
|
#ifdef IS_MPI |
16 |
|
use mpiSimulation |
17 |
|
#endif |
131 |
|
end subroutine createMixingList |
132 |
|
|
133 |
|
|
134 |
< |
subroutine do_lj_pair(atom1, atom2, atype1, atype2, dx, dy, dz, rij, & |
135 |
< |
pot, f) |
134 |
> |
subroutine do_lj_pair(atom1, atom2, d, rij, pot, f) |
135 |
|
|
136 |
|
integer, intent(in) :: atom1, atom2 |
137 |
< |
real( kind = dp ), intent(in) :: dx, dy, dz, rij |
137 |
> |
real( kind = dp ), intent(in) :: rij |
138 |
|
real( kind = dp ) :: pot |
139 |
|
real( kind = dp ), dimension(3, getNlocal()) :: f |
140 |
< |
type (atype), pointer :: atype1 |
142 |
< |
type (atype), pointer :: atype2 |
140 |
> |
real( kind = dp ), intent(in), dimension(3) :: d |
141 |
|
|
142 |
|
! local Variables |
143 |
|
real( kind = dp ) :: drdx, drdy, drdz |
185 |
|
|
186 |
|
dudr = 24.0E0_DP * epsilon * (t6 - 2.0E0_DP*t12) / rij |
187 |
|
|
188 |
< |
drdx = -dx / rij |
189 |
< |
drdy = -dy / rij |
190 |
< |
drdz = -dz / rij |
188 |
> |
drdx = -d(1) / rij |
189 |
> |
drdy = -d(2) / rij |
190 |
> |
drdz = -d(3) / rij |
191 |
|
|
192 |
|
fx = dudr * drdx |
193 |
|
fy = dudr * drdy |
218 |
|
#endif |
219 |
|
|
220 |
|
if (doStress()) then |
221 |
< |
tau_Temp(1) = tau_Temp(1) + fx * dx |
222 |
< |
tau_Temp(2) = tau_Temp(2) + fx * dy |
223 |
< |
tau_Temp(3) = tau_Temp(3) + fx * dz |
224 |
< |
tau_Temp(4) = tau_Temp(4) + fy * dx |
225 |
< |
tau_Temp(5) = tau_Temp(5) + fy * dy |
226 |
< |
tau_Temp(6) = tau_Temp(6) + fy * dz |
227 |
< |
tau_Temp(7) = tau_Temp(7) + fz * dx |
228 |
< |
tau_Temp(8) = tau_Temp(8) + fz * dy |
229 |
< |
tau_Temp(9) = tau_Temp(9) + fz * dz |
221 |
> |
tau_Temp(1) = tau_Temp(1) + fx * d(1) |
222 |
> |
tau_Temp(2) = tau_Temp(2) + fx * d(2) |
223 |
> |
tau_Temp(3) = tau_Temp(3) + fx * d(3) |
224 |
> |
tau_Temp(4) = tau_Temp(4) + fy * d(1) |
225 |
> |
tau_Temp(5) = tau_Temp(5) + fy * d(2) |
226 |
> |
tau_Temp(6) = tau_Temp(6) + fy * d(3) |
227 |
> |
tau_Temp(7) = tau_Temp(7) + fz * d(1) |
228 |
> |
tau_Temp(8) = tau_Temp(8) + fz * d(2) |
229 |
> |
tau_Temp(9) = tau_Temp(9) + fz * d(3) |
230 |
|
virial_Temp = virial_Temp + (tau_Temp(1) + tau_Temp(5) + tau_Temp(9)) |
231 |
|
endif |
232 |
|
|