forked from dftbplus/skprogs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hand over WS compression to slateratom
- Loading branch information
Showing
9 changed files
with
319 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
!> Module that builds up various supervectors. | ||
module confinement | ||
|
||
use common_accuracy, only : dp | ||
use utilities, only : fak | ||
use globals, only : TConf | ||
use core_overlap, only : v | ||
|
||
implicit none | ||
private | ||
|
||
public :: confType | ||
public :: getConf_power | ||
|
||
|
||
!> Enumerator for type of confinement potential. | ||
type :: TConfEnum | ||
|
||
!> no compression | ||
integer :: none = 0 | ||
|
||
!> power compression | ||
integer :: power = 1 | ||
|
||
!> Woods-Saxon compression | ||
integer :: ws = 2 | ||
|
||
end type TConfEnum | ||
|
||
!> Container for enumerated types of confinement potentials. | ||
type(TConfEnum), parameter :: confType = TConfEnum() | ||
|
||
|
||
contains | ||
|
||
!> Calculates analytic matrix elements of confining potential. | ||
!! No checking for power, e.g. power==0 or power<0 etc. ! | ||
pure subroutine getConf_power(vconf, max_l, num_alpha, alpha, poly_order, conf) | ||
|
||
!> confinement supervector | ||
real(dp), intent(out) :: vconf(0:,:,:) | ||
|
||
!> maximum angular momentum | ||
integer, intent(in) :: max_l | ||
|
||
!> number of exponents in each shell | ||
integer, intent(in) :: num_alpha(0:) | ||
|
||
!> basis exponents | ||
real(dp), intent(in) :: alpha(0:,:) | ||
|
||
!> highest polynomial order + l in each shell | ||
integer, intent(in) :: poly_order(0:) | ||
|
||
!> confinement radii (power compression) | ||
type(TConf), intent(in) :: conf | ||
|
||
!! temporary storage | ||
real(dp) :: alpha1 | ||
|
||
!! auxiliary variables | ||
integer :: ii, jj, kk, ll, mm, nn, oo, nlp, nlq | ||
|
||
vconf(:,:,:) = 0.0_dp | ||
|
||
do ii = 0, max_l | ||
if (conf%power(ii) > 1.0e-06_dp) then | ||
nn = 0 | ||
do jj = 1, num_alpha(ii) | ||
do ll = 1, poly_order(ii) | ||
nn = nn + 1 | ||
oo = 0 | ||
nlp = ll + ii | ||
do kk = 1, num_alpha(ii) | ||
alpha1 = 0.5_dp * (alpha(ii, jj) + alpha(ii, kk)) | ||
do mm = 1, poly_order(ii) | ||
oo = oo + 1 | ||
nlq = mm + ii | ||
vconf(ii, nn, oo) = 1.0_dp / sqrt(v(alpha(ii, jj), 2 * nlp)& | ||
& * v(alpha(ii, kk), 2 * nlq)) / (conf%r0(ii) * 2.0_dp)**conf%power(ii)& | ||
& * v(alpha1, nlp + nlq + conf%power(ii)) | ||
end do | ||
end do | ||
end do | ||
end do | ||
end if | ||
end do | ||
|
||
end subroutine getConf_power | ||
|
||
end module confinement |
Oops, something went wrong.