49 |
|
use status |
50 |
|
use atype_module |
51 |
|
use vector_class |
52 |
+ |
use fForceOptions |
53 |
|
#ifdef IS_MPI |
54 |
|
use mpiSimulation |
55 |
|
#endif |
147 |
|
public :: getSCCut |
148 |
|
! public :: setSCDefaultCutoff |
149 |
|
! public :: setSCUniformCutoff |
150 |
< |
public :: useGeometricMixing |
150 |
> |
|
151 |
|
|
152 |
|
contains |
153 |
|
|
177 |
|
|
178 |
|
! check to see if this is the first time into |
179 |
|
if (.not.associated(SCList%SCTypes)) then |
180 |
< |
call getMatchingElementList(atypes, "is_SuttonChen", .true., nSCtypes, MatchList) |
180 |
> |
call getMatchingElementList(atypes, "is_SC", .true., nSCtypes, MatchList) |
181 |
|
SCList%nSCtypes = nSCtypes |
182 |
|
allocate(SCList%SCTypes(nSCTypes)) |
183 |
|
nAtypes = getSize(atypes) |
222 |
|
real(kind=dp) :: cutValue |
223 |
|
|
224 |
|
scID = SCList%atidToSCType(atomID) |
225 |
< |
cutValue = SCList%SCTypes(scID)%sc_rcut |
225 |
> |
cutValue = 2.0_dp * SCList%SCTypes(scID)%alpha |
226 |
|
end function getSCCut |
227 |
|
|
228 |
|
|
244 |
|
if (.not. allocated(MixingMap)) then |
245 |
|
allocate(MixingMap(nSCtypes, nSCtypes)) |
246 |
|
endif |
247 |
< |
|
247 |
> |
useGeometricDistanceMixing = usesGeometricDistanceMixing() |
248 |
|
do i = 1, nSCtypes |
249 |
|
|
250 |
|
e1 = SCList%SCtypes(i)%epsilon |
397 |
|
|
398 |
|
end subroutine setCutoffSC |
399 |
|
|
399 |
– |
subroutine useGeometricMixing() |
400 |
– |
useGeometricDistanceMixing = .true. |
401 |
– |
haveMixingMap = .false. |
402 |
– |
return |
403 |
– |
end subroutine useGeometricMixing |
404 |
– |
|
405 |
– |
|
406 |
– |
|
407 |
– |
|
408 |
– |
|
409 |
– |
|
410 |
– |
|
411 |
– |
|
412 |
– |
|
400 |
|
subroutine clean_SC() |
401 |
|
|
402 |
|
! clean non-IS_MPI first |
418 |
|
|
419 |
|
|
420 |
|
!! Calculates rho_r |
421 |
< |
subroutine calc_sc_prepair_rho(atom1,atom2,d,r,rijsq) |
421 |
> |
subroutine calc_sc_prepair_rho(atom1,atom2,d,r,rijsq, rcut) |
422 |
|
integer :: atom1,atom2 |
423 |
|
real(kind = dp), dimension(3) :: d |
424 |
|
real(kind = dp), intent(inout) :: r |
425 |
< |
real(kind = dp), intent(inout) :: rijsq |
425 |
> |
real(kind = dp), intent(inout) :: rijsq, rcut |
426 |
|
! value of electron density rho do to atom i at atom j |
427 |
|
real(kind = dp) :: rho_i_at_j |
428 |
|
! value of electron density rho do to atom j at atom i |
439 |
|
|
440 |
|
! check to see if we need to be cleaned at the start of a force loop |
441 |
|
|
442 |
+ |
if (.not.haveMixingMap) call createMixingMap() |
443 |
|
|
444 |
|
|
457 |
– |
|
445 |
|
#ifdef IS_MPI |
446 |
|
Atid1 = Atid_row(Atom1) |
447 |
|
Atid2 = Atid_col(Atom2) |
537 |
|
|
538 |
|
|
539 |
|
!! Does Sutton-Chen pairwise Force calculation. |
540 |
< |
subroutine do_sc_pair(atom1, atom2, d, rij, r2, sw, vpair, fpair, & |
540 |
> |
subroutine do_sc_pair(atom1, atom2, d, rij, r2, rcut, sw, vpair, fpair, & |
541 |
|
pot, f, do_pot) |
542 |
|
!Arguments |
543 |
|
integer, intent(in) :: atom1, atom2 |
544 |
< |
real( kind = dp ), intent(in) :: rij, r2 |
544 |
> |
real( kind = dp ), intent(in) :: rij, r2, rcut |
545 |
|
real( kind = dp ) :: pot, sw, vpair |
546 |
|
real( kind = dp ), dimension(3,nLocal) :: f |
547 |
|
real( kind = dp ), intent(in), dimension(3) :: d |