| 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, 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, & |
| 182 |
|
|
| 183 |
|
end subroutine SimulationSetup |
| 184 |
|
|
| 185 |
< |
subroutine setBox_3d(new_box_size) |
| 186 |
< |
real(kind=dp), dimension(3) :: new_box_size |
| 185 |
> |
subroutine setBox(cHmat, cHmatInv, cBoxIsOrthorhombic) |
| 186 |
> |
real(kind=dp), dimension(3,3) :: cHmat, cHamtInv |
| 187 |
> |
integer :: cBoxIsOrthorhombic |
| 188 |
|
integer :: smallest, status, i |
| 189 |
|
|
| 190 |
< |
thisSim%box = new_box_size |
| 191 |
< |
box = thisSim%box |
| 190 |
> |
Hmat = cHmat |
| 191 |
> |
HmatInv = cHmatInv |
| 192 |
> |
if(cBoxisOrthorhombic .eq. 0 )then |
| 193 |
> |
boxIsOrthorhombic = .false. |
| 194 |
> |
else boxIsOrthorhombic = .true. |
| 195 |
> |
endif |
| 196 |
> |
|
| 197 |
|
|
| 198 |
|
return |
| 199 |
< |
end subroutine setBox_3d |
| 199 |
> |
end subroutine setBox |
| 200 |
|
|
| 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 |
– |
|
| 201 |
|
subroutine setRcut(new_rcut, status) |
| 202 |
|
real(kind = dp) :: new_rcut |
| 203 |
|
integer :: myStatus, status |
| 207 |
|
status = 0 |
| 208 |
|
return |
| 209 |
|
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 |
| 210 |
|
|
| 211 |
|
subroutine getRcut(thisrcut,rc2,rc6,status) |
| 212 |
|
real( kind = dp ), intent(out) :: thisrcut |