10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-22 20:35:19 +01:00

Repaired QP

This commit is contained in:
Anthony Scemama 2015-03-26 00:44:37 +01:00
parent 72eb7905bb
commit cfb1aac932
4 changed files with 100 additions and 18 deletions

View File

@ -214,13 +214,13 @@ logical function is_a_two_holes_two_particles(key_in)
integer :: i,i_diff integer :: i,i_diff
i_diff = 0 i_diff = 0
if(N_int == 1)then if(N_int == 1)then
i_diff = i_diff + & i_diff = i_diff &
+ popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) & + popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) &
+ popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) & + popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) &
+ popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) & + popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) &
+ popcnt( iand( iand( xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1))), virt_bitmask(1,2) ), virt_bitmask(1,2)) ) + popcnt( iand( iand( xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1))), virt_bitmask(1,2) ), virt_bitmask(1,2)) )
else if(N_int == 2)then else if(N_int == 2)then
i_diff = i_diff + & i_diff = i_diff &
+ popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) & + popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) &
+ popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) & + popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) &
+ popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) & + popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) &
@ -231,7 +231,7 @@ logical function is_a_two_holes_two_particles(key_in)
+ popcnt( iand( iand( xor(key_in(2,2),iand(key_in(2,2),cas_bitmask(2,2,1))), virt_bitmask(2,2) ), virt_bitmask(2,2)) ) + popcnt( iand( iand( xor(key_in(2,2),iand(key_in(2,2),cas_bitmask(2,2,1))), virt_bitmask(2,2) ), virt_bitmask(2,2)) )
else if(N_int == 3)then else if(N_int == 3)then
i_diff = i_diff + & i_diff = i_diff &
+ popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) & + popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) &
+ popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) & + popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) &
+ popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) & + popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) &
@ -245,7 +245,7 @@ logical function is_a_two_holes_two_particles(key_in)
+ popcnt( iand( iand( xor(key_in(3,1),iand(key_in(3,1),cas_bitmask(3,1,1))), virt_bitmask(3,1) ), virt_bitmask(3,1)) ) & + popcnt( iand( iand( xor(key_in(3,1),iand(key_in(3,1),cas_bitmask(3,1,1))), virt_bitmask(3,1) ), virt_bitmask(3,1)) ) &
+ popcnt( iand( iand( xor(key_in(3,2),iand(key_in(3,2),cas_bitmask(3,2,1))), virt_bitmask(3,2) ), virt_bitmask(3,2)) ) + popcnt( iand( iand( xor(key_in(3,2),iand(key_in(3,2),cas_bitmask(3,2,1))), virt_bitmask(3,2) ), virt_bitmask(3,2)) )
else if(N_int == 4)then else if(N_int == 4)then
i_diff = i_diff + & i_diff = i_diff &
+ popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) & + popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) &
+ popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) & + popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) &
+ popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) & + popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) &
@ -263,7 +263,7 @@ logical function is_a_two_holes_two_particles(key_in)
+ popcnt( iand( iand( xor(key_in(4,1),iand(key_in(4,1),cas_bitmask(4,1,1))), virt_bitmask(4,1) ), virt_bitmask(4,1)) ) & + popcnt( iand( iand( xor(key_in(4,1),iand(key_in(4,1),cas_bitmask(4,1,1))), virt_bitmask(4,1) ), virt_bitmask(4,1)) ) &
+ popcnt( iand( iand( xor(key_in(4,2),iand(key_in(4,2),cas_bitmask(4,2,1))), virt_bitmask(4,2) ), virt_bitmask(4,2)) ) + popcnt( iand( iand( xor(key_in(4,2),iand(key_in(4,2),cas_bitmask(4,2,1))), virt_bitmask(4,2) ), virt_bitmask(4,2)) )
else if(N_int == 5)then else if(N_int == 5)then
i_diff = i_diff + & i_diff = i_diff &
+ popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) & + popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) &
+ popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) & + popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) &
+ popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) & + popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) &
@ -285,7 +285,7 @@ logical function is_a_two_holes_two_particles(key_in)
+ popcnt( iand( iand( xor(key_in(5,1),iand(key_in(5,1),cas_bitmask(5,1,1))), virt_bitmask(5,1) ), virt_bitmask(5,1)) ) & + popcnt( iand( iand( xor(key_in(5,1),iand(key_in(5,1),cas_bitmask(5,1,1))), virt_bitmask(5,1) ), virt_bitmask(5,1)) ) &
+ popcnt( iand( iand( xor(key_in(5,2),iand(key_in(5,2),cas_bitmask(5,2,1))), virt_bitmask(5,2) ), virt_bitmask(5,2)) ) + popcnt( iand( iand( xor(key_in(5,2),iand(key_in(5,2),cas_bitmask(5,2,1))), virt_bitmask(5,2) ), virt_bitmask(5,2)) )
else if(N_int == 6)then else if(N_int == 6)then
i_diff = i_diff + & i_diff = i_diff &
+ popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) & + popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) &
+ popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) & + popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) &
+ popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) & + popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) &
@ -311,7 +311,7 @@ logical function is_a_two_holes_two_particles(key_in)
+ popcnt( iand( iand( xor(key_in(6,1),iand(key_in(6,1),cas_bitmask(6,1,1))), virt_bitmask(6,1) ), virt_bitmask(6,1)) ) & + popcnt( iand( iand( xor(key_in(6,1),iand(key_in(6,1),cas_bitmask(6,1,1))), virt_bitmask(6,1) ), virt_bitmask(6,1)) ) &
+ popcnt( iand( iand( xor(key_in(6,2),iand(key_in(6,2),cas_bitmask(6,2,1))), virt_bitmask(6,2) ), virt_bitmask(6,2)) ) + popcnt( iand( iand( xor(key_in(6,2),iand(key_in(6,2),cas_bitmask(6,2,1))), virt_bitmask(6,2) ), virt_bitmask(6,2)) )
else if(N_int == 7)then else if(N_int == 7)then
i_diff = i_diff + & i_diff = i_diff &
+ popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) & + popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) &
+ popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) & + popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) &
+ popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) & + popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) &
@ -341,7 +341,7 @@ logical function is_a_two_holes_two_particles(key_in)
+ popcnt( iand( iand( xor(key_in(7,1),iand(key_in(7,1),cas_bitmask(7,1,1))), virt_bitmask(7,1) ), virt_bitmask(7,1)) ) & + popcnt( iand( iand( xor(key_in(7,1),iand(key_in(7,1),cas_bitmask(7,1,1))), virt_bitmask(7,1) ), virt_bitmask(7,1)) ) &
+ popcnt( iand( iand( xor(key_in(7,2),iand(key_in(7,2),cas_bitmask(7,2,1))), virt_bitmask(7,2) ), virt_bitmask(7,2)) ) + popcnt( iand( iand( xor(key_in(7,2),iand(key_in(7,2),cas_bitmask(7,2,1))), virt_bitmask(7,2) ), virt_bitmask(7,2)) )
else if(N_int == 8)then else if(N_int == 8)then
i_diff = i_diff + & i_diff = i_diff &
+ popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) & + popcnt( xor( iand(inact_bitmask(1,1), xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1)))), inact_bitmask(1,1)) ) &
+ popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) & + popcnt( xor( iand(inact_bitmask(1,2), xor(key_in(1,2),iand(key_in(1,2),cas_bitmask(1,2,1)))), inact_bitmask(1,2)) ) &
+ popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) & + popcnt( iand( iand( xor(key_in(1,1),iand(key_in(1,1),cas_bitmask(1,1,1))), virt_bitmask(1,1) ), virt_bitmask(1,1)) ) &
@ -378,7 +378,7 @@ logical function is_a_two_holes_two_particles(key_in)
else else
do i = 1, N_int do i = 1, N_int
i_diff = i_diff + & i_diff = i_diff &
+ popcnt( xor( iand(inact_bitmask(i,1), xor(key_in(i,1),iand(key_in(i,1),cas_bitmask(i,1,1)))), inact_bitmask(i,1)) ) & + popcnt( xor( iand(inact_bitmask(i,1), xor(key_in(i,1),iand(key_in(i,1),cas_bitmask(i,1,1)))), inact_bitmask(i,1)) ) &
+ popcnt( xor( iand(inact_bitmask(i,2), xor(key_in(i,2),iand(key_in(i,2),cas_bitmask(i,2,1)))), inact_bitmask(i,2)) ) & + popcnt( xor( iand(inact_bitmask(i,2), xor(key_in(i,2),iand(key_in(i,2),cas_bitmask(i,2,1)))), inact_bitmask(i,2)) ) &
+ popcnt( iand( iand( xor(key_in(i,1),iand(key_in(i,1),cas_bitmask(i,1,1))), virt_bitmask(i,1) ), virt_bitmask(i,1)) ) & + popcnt( iand( iand( xor(key_in(i,1),iand(key_in(i,1),cas_bitmask(i,1,1))), virt_bitmask(i,1) ), virt_bitmask(i,1)) ) &

View File

@ -4,6 +4,7 @@ subroutine save_casino
character*(128) :: message character*(128) :: message
integer :: getUnitAndOpen, iunit integer :: getUnitAndOpen, iunit
integer, allocatable :: itmp(:) integer, allocatable :: itmp(:)
integer :: n_ao_new
real, allocatable :: rtmp(:) real, allocatable :: rtmp(:)
PROVIDE ezfio_filename PROVIDE ezfio_filename
@ -75,7 +76,8 @@ subroutine save_casino
icount += 2*ao_l(i)+1 icount += 2*ao_l(i)+1
endif endif
enddo enddo
write(iunit,*) icount n_ao_new = icount
write(iunit,*) n_ao_new
write(iunit,'(A)') 'Number of Gaussian primitives per primitive cell' write(iunit,'(A)') 'Number of Gaussian primitives per primitive cell'
allocate(itmp(ao_num)) allocate(itmp(ao_num))
integer :: l integer :: l
@ -175,6 +177,89 @@ subroutine save_casino
write(iunit,'(A)') write(iunit,'(A)')
write(iunit,'(A)') 'MULTIDETERMINANT INFORMATION'
write(iunit,'(A)') '----------------------------'
write(iunit,'(A)') 'GS'
write(iunit,'(A)') 'ORBITAL COEFFICIENTS'
write(iunit,'(A)') '------------------------'
! Transformation cartesian -> spherical
double precision :: tf2(6,5), tf3(10,7), tf4(15,9)
integer :: check2(3,6), check3(3,10), check4(3,15)
check2(:,1) = (/ 2, 0, 0 /)
check2(:,2) = (/ 1, 1, 0 /)
check2(:,3) = (/ 1, 0, 1 /)
check2(:,4) = (/ 0, 2, 0 /)
check2(:,5) = (/ 0, 1, 1 /)
check2(:,6) = (/ 0, 0, 2 /)
check3(:,1) = (/ 3, 0, 0 /)
check3(:,2) = (/ 2, 1, 0 /)
check3(:,3) = (/ 2, 0, 1 /)
check3(:,4) = (/ 1, 2, 0 /)
check3(:,5) = (/ 1, 1, 1 /)
check3(:,6) = (/ 1, 0, 2 /)
check3(:,7) = (/ 0, 3, 0 /)
check3(:,8) = (/ 0, 2, 1 /)
check3(:,9) = (/ 0, 1, 2 /)
check3(:,10) = (/ 0, 0, 3 /)
check4(:,1) = (/ 4, 0, 0 /)
check4(:,2) = (/ 3, 1, 0 /)
check4(:,3) = (/ 3, 0, 1 /)
check4(:,4) = (/ 2, 2, 0 /)
check4(:,5) = (/ 2, 1, 1 /)
check4(:,6) = (/ 2, 0, 2 /)
check4(:,7) = (/ 1, 3, 0 /)
check4(:,8) = (/ 1, 2, 1 /)
check4(:,9) = (/ 1, 1, 2 /)
check4(:,10) = (/ 1, 0, 3 /)
check4(:,11) = (/ 0, 4, 0 /)
check4(:,12) = (/ 0, 3, 1 /)
check4(:,13) = (/ 0, 2, 2 /)
check4(:,14) = (/ 0, 1, 3 /)
check4(:,15) = (/ 0, 0, 4 /)
! tf2 = (/
! -0.5, 0, 0, -0.5, 0, 1.0, &
! 0, 0, 1.0, 0, 0, 0, &
! 0, 0, 0, 0, 1.0, 0, &
! 0.86602540378443864676, 0, 0, -0.86602540378443864676, 0, 0, &
! 0, 1.0, 0, 0, 0, 0, &
! /)
! tf3 = (/
! 0, 0, -0.67082039324993690892, 0, 0, 0, 0, -0.67082039324993690892, 0, 1.0, &
! -0.61237243569579452455, 0, 0, -0.27386127875258305673, 0, 1.0954451150103322269, 0, 0, 0, 0, &
! 0, -0.27386127875258305673, 0, 0, 0, 0, -0.61237243569579452455, 0, 1.0954451150103322269, 0, &
! 0, 0, 0.86602540378443864676, 0, 0, 0, 0, -0.86602540378443864676, 0, 0, &
! 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, &
! 0.790569415042094833, 0, 0, -1.0606601717798212866, 0, 0, 0, 0, 0, 0, &
! 0, 1.0606601717798212866, 0, 0, 0, 0, -0.790569415042094833, 0, 0, 0, &
! /)
! tf4 = (/
! 0.375, 0, 0, 0.21957751641341996535, 0, -0.87831006565367986142, 0, 0, 0, 0, 0.375, 0, -0.87831006565367986142, 0, 1.0, &
! 0, 0, -0.89642145700079522998, 0, 0, 0, 0, -0.40089186286863657703, 0, 1.19522860933439364, 0, 0, 0, 0, 0, &
! 0, 0, 0, 0, -0.40089186286863657703, 0, 0, 0, 0, 0, 0, -0.89642145700079522998, 0, 1.19522860933439364, 0, &
! -0.5590169943749474241, 0, 0, 0, 0, 0.9819805060619657157, 0, 0, 0, 0, 0.5590169943749474241, 0, -0.9819805060619657157, 0, 0, &
! 0, -0.42257712736425828875, 0, 0, 0, 0, -0.42257712736425828875, 0, 1.1338934190276816816, 0, 0, 0, 0, 0, 0, &
! 0, 0, 0.790569415042094833, 0, 0, 0, 0, -1.0606601717798212866, 0, 0, 0, 0, 0, 0, 0, &
! 0, 0, 0, 0, 1.0606601717798212866, 0, 0, 0, 0, 0, 0, -0.790569415042094833, 0, 0, 0, &
! 0.73950997288745200532, 0, 0, -1.2990381056766579701, 0, 0, 0, 0, 0, 0, 0.73950997288745200532, 0, 0, 0, 0, &
! 0, 1.1180339887498948482, 0, 0, 0, 0, -1.1180339887498948482, 0, 0, 0, 0, 0, 0, 0, 0, &
! /)
!
allocate(rtmp(ao_num*mo_tot_num))
l=0
do i=1,mo_tot_num
do j=1,ao_num
l += 1
rtmp(l) = mo_coef(j,i)
enddo
enddo
write(iunit,'(4(1PE20.13))') rtmp(1:l)
deallocate(rtmp)
close(iunit) close(iunit)
end end

View File

@ -132,7 +132,7 @@
! <fortran> ! <fortran>
double precision function gammp(a,x) double precision function gammp(a,x)
implicit double precision (a-h,o-z) implicit double precision (a-h,o-z)
if(x.lt.0..or.a.le.0.)pause if(x.lt.0..or.a.le.0.)stop 'error in gammp'
if(x.lt.a+1.)then if(x.lt.a+1.)then
call gser(gammp,a,x,gln) call gser(gammp,a,x,gln)
else else
@ -169,7 +169,7 @@
parameter (itmax=100,eps=3.e-7) parameter (itmax=100,eps=3.e-7)
gln=gammln(a) gln=gammln(a)
if(x.le.0.)then if(x.le.0.)then
if(x.lt.0.)pause if(x.lt.0.) stop 'error in gser'
gamser=0. gamser=0.
return return
endif endif
@ -182,7 +182,7 @@
sum=sum+del sum=sum+del
if(abs(del).lt.abs(sum)*eps)go to 1 if(abs(del).lt.abs(sum)*eps)go to 1
11 continue 11 continue
pause 'a too large, itmax too small' stop 'a too large, itmax too small'
1 gamser=sum*exp(-x+a*log(x)-gln) 1 gamser=sum*exp(-x+a*log(x)-gln)
return return
end end
@ -233,7 +233,7 @@
gold=g gold=g
endif endif
11 continue 11 continue
pause 'a too large, itmax too small' stop 'a too large, itmax too small'
1 gammcf=exp(-x+a*log(x)-gln)*g 1 gammcf=exp(-x+a*log(x)-gln)*g
return return
end end

View File

@ -17,16 +17,13 @@ BEGIN_PROVIDER [ logical, abort_here ]
END_PROVIDER END_PROVIDER
subroutine trap_signals subroutine trap_signals
use ifport
implicit none implicit none
BEGIN_DOC BEGIN_DOC
! What to do when a signal is caught. Here, trap Ctrl-C and call the control_C subroutine. ! What to do when a signal is caught. Here, trap Ctrl-C and call the control_C subroutine.
END_DOC END_DOC
integer, external :: catch_signal integer, external :: catch_signal
integer :: err, flag
integer, parameter :: sigusr2 = 12 integer, parameter :: sigusr2 = 12
flag = -1 call signal (sigusr2, catch_signal)
err = signal (sigusr2, catch_signal, flag)
end subroutine trap_signals end subroutine trap_signals
integer function catch_signal(signum) integer function catch_signal(signum)