| 27 |
|
integer, allocatable, dimension(:), public :: excludesGlobal |
| 28 |
|
integer, allocatable, dimension(:), public :: molMembershipList |
| 29 |
|
|
| 30 |
– |
real(kind=dp), save :: rcut2 = 0.0_DP |
| 31 |
– |
real(kind=dp), save :: rcut6 = 0.0_DP |
| 32 |
– |
real(kind=dp), save :: rlist2 = 0.0_DP |
| 30 |
|
real(kind=dp), public, dimension(3,3), save :: Hmat, HmatInv |
| 31 |
|
logical, public, save :: boxIsOrthorhombic |
| 32 |
|
|
| 33 |
|
public :: SimulationSetup |
| 34 |
|
public :: getNlocal |
| 35 |
|
public :: setBox |
| 39 |
– |
public :: setRcut |
| 40 |
– |
public :: getRcut |
| 41 |
– |
public :: getRlist |
| 42 |
– |
public :: getRrf |
| 43 |
– |
public :: getRt |
| 36 |
|
public :: getDielect |
| 37 |
|
public :: SimUsesPBC |
| 38 |
|
public :: SimUsesLJ |
| 80 |
|
nGlobal = CnGlobal |
| 81 |
|
|
| 82 |
|
thisSim = setThisSim |
| 91 |
– |
rcut2 = thisSim%rcut * thisSim%rcut |
| 92 |
– |
rcut6 = rcut2 * rcut2 * rcut2 |
| 93 |
– |
rlist2 = thisSim%rlist * thisSim%rlist |
| 83 |
|
|
| 84 |
|
nExcludes_Global = CnGlobalExcludes |
| 85 |
|
nExcludes_Local = CnLocalExcludes |
| 142 |
|
deallocate(c_idents_Row) |
| 143 |
|
endif |
| 144 |
|
|
| 145 |
< |
#else |
| 145 |
> |
#endif |
| 146 |
> |
|
| 147 |
> |
! We build the local atid's for both mpi and nonmpi |
| 148 |
|
do i = 1, nLocal |
| 149 |
|
|
| 150 |
|
me = getFirstMatchingElement(atypes, "c_ident", c_idents(i)) |
| 151 |
|
atid(i) = me |
| 152 |
|
|
| 153 |
|
enddo |
| 163 |
– |
#endif |
| 154 |
|
|
| 155 |
|
|
| 156 |
|
|
| 157 |
+ |
|
| 158 |
|
do i = 1, nExcludes_Local |
| 159 |
|
excludesLocal(1,i) = CexcludesLocal(1,i) |
| 160 |
|
excludesLocal(2,i) = CexcludesLocal(2,i) |
| 187 |
|
|
| 188 |
|
return |
| 189 |
|
end subroutine setBox |
| 199 |
– |
|
| 200 |
– |
subroutine setRcut(new_rcut, status) |
| 201 |
– |
real(kind = dp) :: new_rcut |
| 202 |
– |
integer :: myStatus, status |
| 203 |
– |
thisSim%rcut = new_rcut |
| 204 |
– |
rcut2 = thisSim%rcut * thisSim%rcut |
| 205 |
– |
rcut6 = rcut2 * rcut2 * rcut2 |
| 206 |
– |
status = 0 |
| 207 |
– |
return |
| 208 |
– |
end subroutine setRcut |
| 209 |
– |
|
| 210 |
– |
subroutine getRcut(thisrcut,rc2,rc6,status) |
| 211 |
– |
real( kind = dp ), intent(out) :: thisrcut |
| 212 |
– |
real( kind = dp ), intent(out), optional :: rc2 |
| 213 |
– |
real( kind = dp ), intent(out), optional :: rc6 |
| 214 |
– |
integer, optional :: status |
| 215 |
– |
|
| 216 |
– |
if (present(status)) status = 0 |
| 217 |
– |
|
| 218 |
– |
if (.not.simulation_setup_complete ) then |
| 219 |
– |
if (present(status)) status = -1 |
| 220 |
– |
return |
| 221 |
– |
end if |
| 222 |
– |
|
| 223 |
– |
thisrcut = thisSim%rcut |
| 224 |
– |
if(present(rc2)) rc2 = rcut2 |
| 225 |
– |
if(present(rc6)) rc6 = rcut6 |
| 226 |
– |
end subroutine getRcut |
| 227 |
– |
|
| 228 |
– |
subroutine getRlist(thisrlist,rl2,status) |
| 229 |
– |
real( kind = dp ), intent(out) :: thisrlist |
| 230 |
– |
real( kind = dp ), intent(out), optional :: rl2 |
| 190 |
|
|
| 232 |
– |
integer, optional :: status |
| 233 |
– |
|
| 234 |
– |
if (present(status)) status = 0 |
| 235 |
– |
|
| 236 |
– |
if (.not.simulation_setup_complete ) then |
| 237 |
– |
if (present(status)) status = -1 |
| 238 |
– |
return |
| 239 |
– |
end if |
| 240 |
– |
|
| 241 |
– |
thisrlist = thisSim%rlist |
| 242 |
– |
if(present(rl2)) rl2 = rlist2 |
| 243 |
– |
end subroutine getRlist |
| 244 |
– |
|
| 245 |
– |
function getRrf() result(rrf) |
| 246 |
– |
real( kind = dp ) :: rrf |
| 247 |
– |
rrf = thisSim%rrf |
| 248 |
– |
write(*,*) 'getRrf = ', rrf |
| 249 |
– |
end function getRrf |
| 250 |
– |
|
| 251 |
– |
function getRt() result(rt) |
| 252 |
– |
real( kind = dp ) :: rt |
| 253 |
– |
rt = thisSim%rt |
| 254 |
– |
write(*,*) 'getRt = ', rt |
| 255 |
– |
end function getRt |
| 256 |
– |
|
| 191 |
|
function getDielect() result(dielect) |
| 192 |
|
real( kind = dp ) :: dielect |
| 193 |
|
dielect = thisSim%dielect |