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 |
33 |
< |
real(kind=dp), public, dimension(3), save :: box |
34 |
< |
|
33 |
> |
real(kind=dp), public, dimension(3,3), save :: Hmat, HmatInv |
34 |
> |
logical, public, save :: boxIsOrthorhombic |
35 |
|
|
36 |
|
public :: SimulationSetup |
37 |
|
public :: getNlocal |
38 |
|
public :: setBox |
39 |
– |
public :: setBox_3d |
40 |
– |
public :: getBox |
39 |
|
public :: setRcut |
40 |
|
public :: getRcut |
41 |
|
public :: getRlist |
52 |
|
public :: SimRequiresPrepairCalc |
53 |
|
public :: SimRequiresPostpairCalc |
54 |
|
public :: SimUsesDirectionalAtoms |
57 |
– |
|
58 |
– |
interface getBox |
59 |
– |
module procedure getBox_3d |
60 |
– |
module procedure getBox_1d |
61 |
– |
end interface |
55 |
|
|
63 |
– |
interface setBox |
64 |
– |
module procedure setBox_3d |
65 |
– |
module procedure setBox_1d |
66 |
– |
end interface |
67 |
– |
|
56 |
|
contains |
57 |
|
|
58 |
|
subroutine SimulationSetup(setThisSim, CnGlobal, CnLocal, c_idents, & |
91 |
|
rcut2 = thisSim%rcut * thisSim%rcut |
92 |
|
rcut6 = rcut2 * rcut2 * rcut2 |
93 |
|
rlist2 = thisSim%rlist * thisSim%rlist |
106 |
– |
box = thisSim%box |
94 |
|
|
95 |
|
nExcludes_Global = CnGlobalExcludes |
96 |
|
nExcludes_Local = CnLocalExcludes |
181 |
|
|
182 |
|
end subroutine SimulationSetup |
183 |
|
|
184 |
< |
subroutine setBox_3d(new_box_size) |
185 |
< |
real(kind=dp), dimension(3) :: new_box_size |
184 |
> |
subroutine setBox(cHmat, cHmatInv, cBoxIsOrthorhombic) |
185 |
> |
real(kind=dp), dimension(3,3) :: cHmat, cHmatInv |
186 |
> |
integer :: cBoxIsOrthorhombic |
187 |
|
integer :: smallest, status, i |
188 |
< |
|
189 |
< |
thisSim%box = new_box_size |
190 |
< |
box = thisSim%box |
191 |
< |
|
188 |
> |
|
189 |
> |
Hmat = cHmat |
190 |
> |
HmatInv = cHmatInv |
191 |
> |
if (cBoxIsOrthorhombic .eq. 0 ) then |
192 |
> |
boxIsOrthorhombic = .false. |
193 |
> |
else |
194 |
> |
boxIsOrthorhombic = .true. |
195 |
> |
endif |
196 |
> |
|
197 |
|
return |
198 |
< |
end subroutine setBox_3d |
198 |
> |
end subroutine setBox |
199 |
|
|
207 |
– |
subroutine setBox_1d(dim, new_box_size) |
208 |
– |
integer :: dim, status |
209 |
– |
real(kind=dp) :: new_box_size |
210 |
– |
thisSim%box(dim) = new_box_size |
211 |
– |
box(dim) = thisSim%box(dim) |
212 |
– |
end subroutine setBox_1d |
213 |
– |
|
200 |
|
subroutine setRcut(new_rcut, status) |
201 |
|
real(kind = dp) :: new_rcut |
202 |
|
integer :: myStatus, status |
206 |
|
status = 0 |
207 |
|
return |
208 |
|
end subroutine setRcut |
223 |
– |
|
224 |
– |
function getBox_3d() result(thisBox) |
225 |
– |
real( kind = dp ), dimension(3) :: thisBox |
226 |
– |
thisBox = thisSim%box |
227 |
– |
end function getBox_3d |
228 |
– |
|
229 |
– |
function getBox_1d(dim) result(thisBox) |
230 |
– |
integer, intent(in) :: dim |
231 |
– |
real( kind = dp ) :: thisBox |
232 |
– |
|
233 |
– |
thisBox = thisSim%box(dim) |
234 |
– |
end function getBox_1d |
209 |
|
|
210 |
|
subroutine getRcut(thisrcut,rc2,rc6,status) |
211 |
|
real( kind = dp ), intent(out) :: thisrcut |