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.7 2003-07-15 17:10:50 gezelter Exp $, $Date: 2003-07-15 17:10:50 $, $Name: not supported by cvs2svn $, $Revision: 1.7 $ |
5 |
> |
!! @version $Id: calc_LJ_FF.F90,v 1.9 2003-07-16 16:40:03 chuckv Exp $, $Date: 2003-07-16 16:40:03 $, $Name: not supported by cvs2svn $, $Revision: 1.9 $ |
6 |
|
|
7 |
|
module lj |
8 |
|
use definitions |
21 |
|
#include "fForceField.h" |
22 |
|
|
23 |
|
integer, save :: LJ_Mixing_Policy |
24 |
< |
integer, save :: LJ_rcut |
24 |
> |
real(kind=DP), save :: LJ_rcut |
25 |
|
|
26 |
|
!! Logical has lj force field module been initialized? |
27 |
|
|
85 |
|
subroutine LJ_new_rcut(rcut, status) |
86 |
|
integer :: status, myStatus |
87 |
|
real(kind=dp) :: rcut |
88 |
< |
|
89 |
< |
LJ_rcut = rcut |
88 |
> |
|
89 |
|
status = 0 |
91 |
– |
call createMixingList(myStatus) |
92 |
– |
if (myStatus /= 0) then |
93 |
– |
status = -1 |
94 |
– |
return |
95 |
– |
end if |
90 |
|
|
91 |
+ |
if ( rcut .ne. LJ_rcut ) then |
92 |
+ |
LJ_rcut = rcut |
93 |
+ |
call createMixingList(myStatus) |
94 |
+ |
if (myStatus /= 0) then |
95 |
+ |
status = -1 |
96 |
+ |
return |
97 |
+ |
end if |
98 |
+ |
endif |
99 |
+ |
|
100 |
+ |
|
101 |
|
return |
102 |
|
end subroutine LJ_new_rcut |
103 |
|
|
119 |
|
|
120 |
|
if (.not. associated(ljMixed)) then |
121 |
|
allocate(ljMixed(nAtypes, nAtypes)) |
122 |
< |
else |
119 |
< |
status = -1 |
120 |
< |
return |
121 |
< |
end if |
122 |
> |
endif |
123 |
|
|
124 |
|
rcut6 = LJ_rcut**6 |
125 |
|
|