mirror of
https://github.com/pfloos/quack
synced 2024-11-04 21:23:55 +01:00
numgrid works
This commit is contained in:
parent
f6323a55e4
commit
1e65d1cf1f
@ -1,4 +1,5 @@
|
|||||||
subroutine allocate_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_mom,min_exponent,max_exponent,nGrid)
|
subroutine allocate_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_mom,min_exponent,max_exponent, &
|
||||||
|
radial_precision,nRad,nAng,nGrid)
|
||||||
|
|
||||||
! Allocate quadrature grid with numgrid (Radovan Bast)
|
! Allocate quadrature grid with numgrid (Radovan Bast)
|
||||||
|
|
||||||
@ -22,11 +23,14 @@ subroutine allocate_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_m
|
|||||||
double precision,intent(in) :: min_exponent(nNuc,maxL+1)
|
double precision,intent(in) :: min_exponent(nNuc,maxL+1)
|
||||||
double precision,intent(in) :: max_exponent(nNuc)
|
double precision,intent(in) :: max_exponent(nNuc)
|
||||||
|
|
||||||
|
double precision :: radial_precision
|
||||||
|
integer,intent(in) :: nRad
|
||||||
|
integer,intent(in) :: nAng
|
||||||
|
|
||||||
! Local variables
|
! Local variables
|
||||||
|
|
||||||
integer :: iNuc
|
integer :: iNuc
|
||||||
|
|
||||||
double precision :: radial_precision
|
|
||||||
integer :: min_num_angular_points
|
integer :: min_num_angular_points
|
||||||
integer :: max_num_angular_points
|
integer :: max_num_angular_points
|
||||||
integer :: num_points
|
integer :: num_points
|
||||||
@ -40,9 +44,8 @@ subroutine allocate_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_m
|
|||||||
|
|
||||||
! Set useful variables
|
! Set useful variables
|
||||||
|
|
||||||
radial_precision = 1d-12
|
min_num_angular_points = nAng
|
||||||
min_num_angular_points = 6 ! SG-0
|
max_num_angular_points = nAng
|
||||||
max_num_angular_points = 170 ! SG-3
|
|
||||||
|
|
||||||
! Get total number of grid points
|
! Get total number of grid points
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
subroutine build_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_mom,min_exponent,max_exponent, &
|
subroutine build_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_mom,min_exponent,max_exponent, &
|
||||||
nGrid,weight,root)
|
radial_precision,nRad,nAng,nGrid,weight,root)
|
||||||
|
|
||||||
! Compute quadrature grid with numgrid (Radovan Bast)
|
! Compute quadrature grid with numgrid (Radovan Bast)
|
||||||
|
|
||||||
@ -23,6 +23,9 @@ subroutine build_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_mom,
|
|||||||
double precision,intent(in) :: min_exponent(nNuc,maxL+1)
|
double precision,intent(in) :: min_exponent(nNuc,maxL+1)
|
||||||
double precision,intent(in) :: max_exponent(nNuc)
|
double precision,intent(in) :: max_exponent(nNuc)
|
||||||
|
|
||||||
|
double precision,intent(in) :: radial_precision
|
||||||
|
integer,intent(in) :: nRad
|
||||||
|
integer,intent(in) :: nAng
|
||||||
integer,intent(in) :: nGrid
|
integer,intent(in) :: nGrid
|
||||||
|
|
||||||
! Local variables
|
! Local variables
|
||||||
@ -30,7 +33,6 @@ subroutine build_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_mom,
|
|||||||
integer :: iNuc
|
integer :: iNuc
|
||||||
integer :: iG
|
integer :: iG
|
||||||
|
|
||||||
double precision :: radial_precision
|
|
||||||
integer :: min_num_angular_points
|
integer :: min_num_angular_points
|
||||||
integer :: max_num_angular_points
|
integer :: max_num_angular_points
|
||||||
integer :: num_points
|
integer :: num_points
|
||||||
@ -45,9 +47,8 @@ subroutine build_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_mom,
|
|||||||
|
|
||||||
! Set useful variables
|
! Set useful variables
|
||||||
|
|
||||||
radial_precision = 1d-12
|
min_num_angular_points = nAng
|
||||||
min_num_angular_points = 6 ! SG-0
|
max_num_angular_points = nAng
|
||||||
max_num_angular_points = 170 ! SG-3
|
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! Main loop over atoms
|
! Main loop over atoms
|
||||||
@ -76,7 +77,7 @@ subroutine build_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_mom,
|
|||||||
rNuc(:,3), &
|
rNuc(:,3), &
|
||||||
int(ZNuc(:)), &
|
int(ZNuc(:)), &
|
||||||
root(1,iG+1:num_points), &
|
root(1,iG+1:num_points), &
|
||||||
root(3,iG+1:num_points), &
|
root(2,iG+1:num_points), &
|
||||||
root(3,iG+1:num_points), &
|
root(3,iG+1:num_points), &
|
||||||
weight(iG+1:num_points) )
|
weight(iG+1:num_points) )
|
||||||
|
|
||||||
|
@ -32,10 +32,15 @@ program eDFT
|
|||||||
character(len=7) :: method
|
character(len=7) :: method
|
||||||
integer :: x_rung,c_rung
|
integer :: x_rung,c_rung
|
||||||
character(len=12) :: x_DFA ,c_DFA
|
character(len=12) :: x_DFA ,c_DFA
|
||||||
|
|
||||||
integer :: SGn
|
integer :: SGn
|
||||||
integer :: nRad,nAng,nGrid
|
double precision :: radial_precision
|
||||||
|
integer :: nRad
|
||||||
|
integer :: nAng
|
||||||
|
integer :: nGrid
|
||||||
double precision,allocatable :: root(:,:)
|
double precision,allocatable :: root(:,:)
|
||||||
double precision,allocatable :: weight(:)
|
double precision,allocatable :: weight(:)
|
||||||
|
|
||||||
double precision,allocatable :: AO(:,:)
|
double precision,allocatable :: AO(:,:)
|
||||||
double precision,allocatable :: dAO(:,:,:)
|
double precision,allocatable :: dAO(:,:,:)
|
||||||
|
|
||||||
@ -128,14 +133,16 @@ program eDFT
|
|||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! Construct quadrature grid
|
! Construct quadrature grid
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! call read_grid(SGn,nRad,nAng,nGrid)
|
call read_grid(SGn,nRad,nAng,nGrid)
|
||||||
|
radial_precision = 1d-7
|
||||||
|
|
||||||
call allocate_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_mom,min_exponent,max_exponent,nGrid)
|
call allocate_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_mom,min_exponent,max_exponent, &
|
||||||
|
radial_precision,nRad,nAng,nGrid)
|
||||||
|
|
||||||
allocate(root(ncart,nGrid),weight(nGrid))
|
allocate(root(ncart,nGrid),weight(nGrid))
|
||||||
|
|
||||||
call build_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_mom,min_exponent,max_exponent, &
|
call build_grid(nNuc,ZNuc,rNuc,nShell,TotAngMomShell,ExpShell,max_ang_mom,min_exponent,max_exponent, &
|
||||||
nGrid,weight,root)
|
radial_precision,nRad,nAng,nGrid,weight,root)
|
||||||
|
|
||||||
! call quadrature_grid(nRad,nAng,nGrid,root,weight)
|
! call quadrature_grid(nRad,nAng,nGrid,root,weight)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user