2009-05-11 23:43:45 +02:00
|
|
|
BEGIN_PROVIDER [ integer, nucl_num ]
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
BEGIN_DOC
|
|
|
|
! Number of nuclei
|
|
|
|
END_DOC
|
|
|
|
|
|
|
|
!$OMP CRITICAL (qcio_critical)
|
|
|
|
call qcio_get_geometry_num_atom(nucl_num)
|
|
|
|
!$OMP END CRITICAL (qcio_critical)
|
|
|
|
assert (nucl_num > 0)
|
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|
|
|
|
BEGIN_PROVIDER [ real, nucl_charge, (nucl_num) ]
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
BEGIN_DOC
|
|
|
|
! Nuclear charge
|
|
|
|
END_DOC
|
|
|
|
|
2009-05-18 15:00:54 +02:00
|
|
|
double precision,allocatable :: buffer(:)
|
|
|
|
allocate(buffer(nucl_num))
|
2009-05-11 23:43:45 +02:00
|
|
|
!$OMP CRITICAL (qcio_critical)
|
|
|
|
call qcio_get_geometry_charge(buffer)
|
|
|
|
!$OMP END CRITICAL (qcio_critical)
|
|
|
|
|
|
|
|
integer :: i
|
|
|
|
do i=1,nucl_num
|
|
|
|
nucl_charge(i) = buffer(i)
|
|
|
|
enddo
|
2009-05-18 15:00:54 +02:00
|
|
|
deallocate(buffer)
|
2009-05-11 23:43:45 +02:00
|
|
|
END_PROVIDER
|
|
|
|
|
|
|
|
BEGIN_PROVIDER [ real, nucl_coord, (nucl_num,3) ]
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
BEGIN_DOC
|
|
|
|
! Nuclear coordinates
|
|
|
|
END_DOC
|
2009-05-18 15:00:54 +02:00
|
|
|
double precision, allocatable :: buffer(:,:)
|
|
|
|
allocate (buffer(3,nucl_num))
|
2009-05-11 23:43:45 +02:00
|
|
|
|
|
|
|
!$OMP CRITICAL (qcio_critical)
|
|
|
|
call qcio_get_geometry_coord(buffer)
|
|
|
|
!$OMP END CRITICAL (qcio_critical)
|
|
|
|
|
|
|
|
integer :: i,j
|
|
|
|
do i=1,3
|
|
|
|
do j=1,nucl_num
|
|
|
|
nucl_coord(j,i) = buffer(i,j)
|
|
|
|
enddo
|
|
|
|
enddo
|
2009-05-18 15:00:54 +02:00
|
|
|
deallocate(buffer)
|
2009-05-11 23:43:45 +02:00
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|
|
|
|
BEGIN_PROVIDER [ real, nucl_dist_2, (nucl_num,nucl_num) ]
|
|
|
|
&BEGIN_PROVIDER [ real, nucl_dist_vec, (nucl_num,nucl_num,3) ]
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! nucl_dist_2 : Nucleus-nucleus distances squared
|
|
|
|
! nucl_dist_vec : Nucleus-nucleus distances vectors
|
|
|
|
END_DOC
|
|
|
|
|
|
|
|
integer :: ie1, ie2, l
|
|
|
|
|
|
|
|
do ie2 = 1,nucl_num
|
|
|
|
do ie1 = 1,nucl_num
|
|
|
|
nucl_dist_2(ie1,ie2) = 0.d0
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
do l=1,3
|
|
|
|
do ie2 = 1,nucl_num
|
|
|
|
do ie1 = 1,nucl_num
|
|
|
|
nucl_dist_vec(ie1,ie2,l) = nucl_coord(ie1,l) - nucl_coord(ie2,l)
|
|
|
|
enddo
|
|
|
|
do ie1 = 1,nucl_num
|
|
|
|
nucl_dist_2(ie1,ie2) = nucl_dist_2(ie1,ie2) &
|
|
|
|
+ nucl_dist_vec(ie1,ie2,l)*nucl_dist_vec(ie1,ie2,l)
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
END_PROVIDER
|
|
|
|
|
|
|
|
BEGIN_PROVIDER [ real, nucl_dist, (nucl_num,nucl_num) ]
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! Nucleus-nucleus distances
|
|
|
|
END_DOC
|
|
|
|
integer :: ie1, ie2
|
|
|
|
do ie2 = 1,nucl_num
|
|
|
|
do ie1 = 1,nucl_num
|
|
|
|
nucl_dist(ie1,ie2) = sqrt(nucl_dist_2(ie1,ie2))
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
END_PROVIDER
|
|
|
|
|