10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-23 12:56:14 +01:00

Split Vloc/Vnon_loc

This commit is contained in:
Anthony Scemama 2015-05-11 15:33:08 +02:00
parent e34c22adc2
commit 71a43d2ed1
2 changed files with 22 additions and 77 deletions

View File

@ -9,12 +9,12 @@ Documentation
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
`ao_nucl_elec_integral_pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo_integrals/pot_ao_ints_pseudo.irp.f#L1>`_ `ao_nucl_elec_integral_pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo_integrals/pot_ao_ints_pseudo.irp.f#L1>`_
Undocumented Pseudo-potential integrals (local + non-local)
`ao_nucl_elec_integral_pseudo_local <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo_integrals/pot_ao_ints_pseudo.irp.f#L10>`_ `ao_nucl_elec_integral_pseudo_local <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo_integrals/pot_ao_ints_pseudo.irp.f#L10>`_
Local component of the pseudopotential interaction nuclear electron
`ao_nucl_elec_integral_pseudo_non_local <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo_integrals/pot_ao_ints_pseudo.irp.f#L124>`_ `ao_nucl_elec_integral_pseudo_non_local <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo_integrals/pot_ao_ints_pseudo.irp.f#L114>`_
interaction nuclear electron interaction nuclear electron

View File

@ -1,8 +1,16 @@
BEGIN_PROVIDER [ double precision, ao_nucl_elec_integral_pseudo, (ao_num_align,ao_num)] BEGIN_PROVIDER [ double precision, ao_nucl_elec_integral_pseudo, (ao_num_align,ao_num)]
BEGIN_DOC
! interaction nuclear electron
END_DOC
implicit none implicit none
BEGIN_DOC
! Pseudo-potential
END_DOC
ao_nucl_elec_integral_pseudo = pseudo_integral_local + pseudo_integral_non_local
END_PROVIDER
BEGIN_PROVIDER [ double precision, pseudo_integral_local, (ao_num_align,ao_num)]
implicit none
BEGIN_DOC
! Local pseudo-potential
END_DOC
double precision :: alpha, beta, gama, delta double precision :: alpha, beta, gama, delta
integer :: num_A,num_B integer :: num_A,num_B
double precision :: A_center(3),B_center(3),C_center(3) double precision :: A_center(3),B_center(3),C_center(3)
@ -13,26 +21,8 @@
double precision :: cpu_1, cpu_2, wall_1, wall_2, wall_0 double precision :: cpu_1, cpu_2, wall_1, wall_2, wall_0
integer :: thread_num integer :: thread_num
ao_nucl_elec_integral_pseudo = 0.d0 pseudo_integral_local = 0.d0
!
! | _ _ _. |
! |_ (_) (_ (_| |
!
!! Parameters of the local part of pseudo:
! integer klocmax
! integer, allocatable :: n_k(:,:)
! double precision, allocatable :: v_k(:,:), dz_k(:,:)
!
! call ezfio_get_pseudo_klocmax(klocmax)
!
! allocate(n_k(nucl_num,klocmax),v_k(nucl_num,klocmax), dz_k(nucl_num,klocmax))
!
! call ezfio_get_pseudo_v_k(v_k)
! call ezfio_get_pseudo_n_k(n_k)
! call ezfio_get_pseudo_dz_k(dz_k)
!
!! Dump array !! Dump array
integer, allocatable :: n_k_dump(:) integer, allocatable :: n_k_dump(:)
double precision, allocatable :: v_k_dump(:), dz_k_dump(:) double precision, allocatable :: v_k_dump(:), dz_k_dump(:)
@ -40,34 +30,6 @@
allocate(n_k_dump(1:pseudo_klocmax), v_k_dump(1:pseudo_klocmax), dz_k_dump(1:pseudo_klocmax)) allocate(n_k_dump(1:pseudo_klocmax), v_k_dump(1:pseudo_klocmax), dz_k_dump(1:pseudo_klocmax))
!
! |\ | _ ._ | _ _ _. |
! | \| (_) | | | (_) (_ (_| |
!
!! Parameters of non local part of pseudo:
! integer :: kmax,lmax
! integer, allocatable :: n_kl(:,:,:)
! double precision, allocatable :: v_kl(:,:,:), dz_kl(:,:,:)
!
! call ezfio_get_pseudo_lmaxpo(lmax)
! call ezfio_get_pseudo_kmax(kmax)
! !lmax plus one -> lmax
! lmax = lmax - 1
!
! allocate(n_kl(nucl_num,kmax,0:lmax), v_kl(nucl_num,kmax,0:lmax), dz_kl(nucl_num,kmax,0:lmax))
!
! call ezfio_get_pseudo_n_kl(n_kl)
! call ezfio_get_pseudo_v_kl(v_kl)
! call ezfio_get_pseudo_dz_kl(dz_kl)
!
!
!! Dump array
integer, allocatable :: n_kl_dump(:,:)
double precision, allocatable :: v_kl_dump(:,:), dz_kl_dump(:,:)
allocate(n_kl_dump(pseudo_kmax,0:pseudo_lmax), v_kl_dump(pseudo_kmax,0:pseudo_lmax), dz_kl_dump(pseudo_kmax,0:pseudo_lmax))
! _ ! _
! / _. | _ | ! / _. | _ |
! \_ (_| | (_ |_| | ! \_ (_| | (_ |_| |
@ -82,11 +44,11 @@
!$OMP DEFAULT (NONE) & !$OMP DEFAULT (NONE) &
!$OMP PRIVATE (i,j,k,l,m,alpha,beta,A_center,B_center,C_center,power_A,power_B, & !$OMP PRIVATE (i,j,k,l,m,alpha,beta,A_center,B_center,C_center,power_A,power_B, &
!$OMP num_A,num_B,Z,c,n_pt_in, & !$OMP num_A,num_B,Z,c,n_pt_in, &
!$OMP v_k_dump,n_k_dump, dz_k_dump, n_kl_dump, v_kl_dump, dz_kl_dump, & !$OMP v_k_dump,n_k_dump, dz_k_dump, &
!$OMP wall_0,wall_2,thread_num, output_monoints) & !$OMP wall_0,wall_2,thread_num, output_monoints) &
!$OMP SHARED (ao_num,ao_prim_num,ao_expo_ordered_transp,ao_power,ao_nucl,nucl_coord,ao_coef_normalized_ordered_transp, & !$OMP SHARED (ao_num,ao_prim_num,ao_expo_ordered_transp,ao_power,ao_nucl,nucl_coord,ao_coef_normalized_ordered_transp, &
!$OMP ao_nucl_elec_integral_pseudo,nucl_num,nucl_charge, & !$OMP pseudo_integral_local,nucl_num,nucl_charge, &
!$OMP pseudo_klocmax,pseudo_lmax,pseudo_kmax,pseudo_v_k,pseudo_n_k, pseudo_dz_k, pseudo_n_kl, pseudo_v_kl, pseudo_dz_kl, & !$OMP pseudo_klocmax,pseudo_lmax,pseudo_kmax,pseudo_v_k,pseudo_n_k, pseudo_dz_k, &
!$OMP wall_1) !$OMP wall_1)
!$OMP DO SCHEDULE (guided) !$OMP DO SCHEDULE (guided)
@ -124,15 +86,8 @@
c = c + Vloc(pseudo_klocmax, v_k_dump,n_k_dump, dz_k_dump, & c = c + Vloc(pseudo_klocmax, v_k_dump,n_k_dump, dz_k_dump, &
A_center,power_A,alpha,B_center,power_B,beta,C_center) A_center,power_A,alpha,B_center,power_B,beta,C_center)
n_kl_dump = pseudo_n_kl(k,1:pseudo_kmax,0:pseudo_lmax)
v_kl_dump = pseudo_v_kl(k,1:pseudo_kmax,0:pseudo_lmax)
dz_kl_dump = pseudo_dz_kl(k,1:pseudo_kmax,0:pseudo_lmax)
c = c + Vpseudo(pseudo_lmax,pseudo_kmax,v_kl_dump,n_kl_dump,dz_kl_dump,A_center,power_A,alpha,B_center,power_B,beta,C_center)
enddo enddo
ao_nucl_elec_integral_pseudo(i,j) = ao_nucl_elec_integral_pseudo(i,j) + & pseudo_integral_local(i,j) = pseudo_integral_local(i,j) + &
ao_coef_normalized_ordered_transp(l,j)*ao_coef_normalized_ordered_transp(m,i)*c ao_coef_normalized_ordered_transp(l,j)*ao_coef_normalized_ordered_transp(m,i)*c
enddo enddo
enddo enddo
@ -152,16 +107,6 @@
!$OMP END PARALLEL !$OMP END PARALLEL
! _
! | \ _ _. | | _ _ _. _|_ _
! |_/ (/_ (_| | | (_) (_ (_| |_ (/_
!
! deallocate(n_k,v_k, dz_k)
deallocate(n_k_dump,v_k_dump, dz_k_dump) deallocate(n_k_dump,v_k_dump, dz_k_dump)
! deallocate(n_kl,v_kl, dz_kl)
deallocate(n_kl_dump,v_kl_dump, dz_kl_dump)
END_PROVIDER END_PROVIDER