diff --git a/Makefile b/Makefile index 559ec11..bf3167b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ -IRPF90 = irpf90 -DMPI #-a -d +IRPF90 = irpf90 -DMPI#-a -d FC = mpif90 FCFLAGS= -O3 -xT +#FC = gfortran -g -ffree-line-length-none +#FCFLAGS= + SRC= OBJ= LIB=-lqcio diff --git a/debug.irp.f b/debug.irp.f index a030024..4ecd631 100644 --- a/debug.irp.f +++ b/debug.irp.f @@ -3,6 +3,11 @@ program debug PROVIDE ao_prim_num_max integer :: i,j integer :: k + print *, '' + print *, 'Occupation numbers' + do k=1,mo_num + print *, k, mo_occ(k) + enddo read(*,*) i,j print *, '' @@ -44,4 +49,5 @@ program debug print *, 'EPLF grid Npoints :', grid_eplf_x_num, grid_eplf_y_num, grid_eplf_z_num print *, 'EPLF grid step :', grid_eplf_step(:) print *, 'EPLF grid origin :', grid_eplf_origin(:) + end diff --git a/eplf.irp.f b/eplf.irp.f index 1368039..4e98347 100644 --- a/eplf.irp.f +++ b/eplf.irp.f @@ -3,7 +3,7 @@ BEGIN_PROVIDER [ real, eplf_gamma ] BEGIN_DOC ! Value of the gaussian for the EPLF END_DOC - eplf_gamma = 1000. + eplf_gamma = 10. END_PROVIDER BEGIN_PROVIDER [ double precision, ao_eplf_integral_matrix, (ao_num,ao_num) ] @@ -21,7 +21,7 @@ BEGIN_PROVIDER [ double precision, ao_eplf_integral_matrix, (ao_num,ao_num) ] enddo END_PROVIDER -BEGIN_PROVIDER [ double precision, mo_eplf_integral_matrix, (mo_occ_num,mo_occ_num) ] +BEGIN_PROVIDER [ double precision, mo_eplf_integral_matrix, (mo_num,mo_num) ] implicit none BEGIN_DOC ! Array of all the for EPLF @@ -29,14 +29,14 @@ BEGIN_PROVIDER [ double precision, mo_eplf_integral_matrix, (mo_occ_num,mo_occ_n integer :: i, j, k, l PROVIDE ao_eplf_integral_matrix PROVIDE mo_coef - do i=1,mo_occ_num - do j=i,mo_occ_num + do i=1,mo_num + do j=i,mo_num mo_eplf_integral_matrix(j,i) = 0. enddo do k=1,ao_num if (mo_coef(k,i) /= 0.) then - do j=i,mo_occ_num + do j=i,mo_num do l=1,ao_num mo_eplf_integral_matrix(j,i) = mo_eplf_integral_matrix(j,i) + & mo_coef(k,i)*mo_coef(l,j)*ao_eplf_integral_matrix(k,l) @@ -45,7 +45,7 @@ BEGIN_PROVIDER [ double precision, mo_eplf_integral_matrix, (mo_occ_num,mo_occ_n endif enddo - do j=i,mo_occ_num + do j=i,mo_num mo_eplf_integral_matrix(i,j) = mo_eplf_integral_matrix(j,i) enddo enddo @@ -111,10 +111,10 @@ BEGIN_PROVIDER [ real, eplf_value ] ab = eplf_up_dn aa = min(1.d0,aa) ab = min(1.d0,ab) - aa = max(1.d-30,aa) - ab = max(1.d-30,ab) - aa = -dlog(aa)/eplf_gamma - ab = -dlog(ab)/eplf_gamma + aa = max(tiny(1.d0),aa) + ab = max(tiny(1.d0),ab) + aa = -(dlog(aa)/eplf_gamma)+tiny(1.d0) + ab = -(dlog(ab)/eplf_gamma)+tiny(1.d0) aa = dsqrt(aa) ab = dsqrt(ab) @@ -161,13 +161,15 @@ double precision function ao_eplf_integral_numeric(i,j,gmma,center) implicit none integer, intent(in) :: i, j integer :: p,q,k - double precision :: integral(ao_prim_num_max,ao_prim_num_max) + double precision :: integral double precision :: ao_eplf_integral_primitive_oneD_numeric real :: gmma, center(3) + + ao_eplf_integral_numeric = 0. do q=1,ao_prim_num(j) do p=1,ao_prim_num(i) - integral(p,q) = & + integral = & ao_eplf_integral_primitive_oneD_numeric( & ao_expo(p,i), & nucl_coord(ao_nucl(i),1), & @@ -195,19 +197,7 @@ double precision function ao_eplf_integral_numeric(i,j,gmma,center) ao_power(j,3), & gmma, & center(3)) - enddo - enddo - - do q=1,ao_prim_num(j) - do p=1,ao_prim_num(i) - integral(p,q) = integral(p,q)*ao_coef(p,i)*ao_coef(q,j) - enddo - enddo - - ao_eplf_integral_numeric = 0. - do q=1,ao_prim_num(j) - do p=1,ao_prim_num(i) - ao_eplf_integral_numeric = ao_eplf_integral_numeric + integral(p,q) + ao_eplf_integral_numeric = ao_eplf_integral_numeric + integral*ao_coef(p,i)*ao_coef(q,j) enddo enddo @@ -277,7 +267,7 @@ double precision function ao_eplf_integral(i,j,gmma,center) implicit none integer, intent(in) :: i, j integer :: p,q,k - double precision :: integral(ao_prim_num_max,ao_prim_num_max) + double precision :: integral double precision :: ao_eplf_integral_primitive_oneD real :: gmma, center(3) @@ -286,10 +276,11 @@ double precision function ao_eplf_integral(i,j,gmma,center) ASSERT(i<=ao_num) ASSERT(j<=ao_num) + ao_eplf_integral = 0. do q=1,ao_prim_num(j) do p=1,ao_prim_num(i) - integral(p,q) = & - ao_eplf_integral_primitive_oneD( & + integral = & + ao_eplf_integral_primitive_oneD( & ao_expo(p,i), & nucl_coord(ao_nucl(i),1), & ao_power(i,1), & @@ -298,7 +289,7 @@ double precision function ao_eplf_integral(i,j,gmma,center) ao_power(j,1), & gmma, & center(1)) * & - ao_eplf_integral_primitive_oneD( & + ao_eplf_integral_primitive_oneD( & ao_expo(p,i), & nucl_coord(ao_nucl(i),2), & ao_power(i,2), & @@ -307,7 +298,7 @@ double precision function ao_eplf_integral(i,j,gmma,center) ao_power(j,2), & gmma, & center(2)) * & - ao_eplf_integral_primitive_oneD( & + ao_eplf_integral_primitive_oneD( & ao_expo(p,i), & nucl_coord(ao_nucl(i),3), & ao_power(i,3), & @@ -316,19 +307,7 @@ double precision function ao_eplf_integral(i,j,gmma,center) ao_power(j,3), & gmma, & center(3)) - enddo - enddo - - do q=1,ao_prim_num(j) - do p=1,ao_prim_num(i) - integral(p,q) = integral(p,q)*ao_coef(p,i)*ao_coef(q,j) - enddo - enddo - - ao_eplf_integral = 0. - do q=1,ao_prim_num(j) - do p=1,ao_prim_num(i) - ao_eplf_integral = ao_eplf_integral + integral(p,q) + ao_eplf_integral = ao_eplf_integral + integral*ao_coef(p,i)*ao_coef(q,j) enddo enddo diff --git a/mo.irp.f b/mo.irp.f index 8632030..f00c858 100644 --- a/mo.irp.f +++ b/mo.irp.f @@ -28,6 +28,26 @@ BEGIN_PROVIDER [ integer, mo_active_num ] END_PROVIDER +BEGIN_PROVIDER [ real, mo_occ, (mo_num) ] + implicit none + + BEGIN_DOC +! Occupation numbers of molecular orbitals + END_DOC + + double precision, allocatable :: buffer(:) + allocate ( buffer(mo_tot_num) ) +!$OMP CRITICAL (qcio_critical) + call qcio_get_mo_occupation(buffer) +!$OMP END CRITICAL (qcio_critical) + integer :: i + do i=1,mo_num + mo_occ(i) = buffer(i) + enddo + deallocate(buffer) + +END_PROVIDER + BEGIN_PROVIDER [ integer, mo_num ] implicit none @@ -40,15 +60,6 @@ BEGIN_PROVIDER [ integer, mo_num ] END_PROVIDER -BEGIN_PROVIDER [ integer, mo_occ_num ] - implicit none - BEGIN_DOC -! Number of occupied molecular orbitals - END_DOC - mo_occ_num = mo_closed_num + mo_active_num -END_PROVIDER - - BEGIN_PROVIDER [ real, mo_coef, (ao_num,mo_num) ] implicit none @@ -57,7 +68,8 @@ BEGIN_PROVIDER [ real, mo_coef, (ao_num,mo_num) ] END_DOC integer :: i, j - double precision :: buffer(ao_num,mo_tot_num) + double precision, allocatable :: buffer(:,:) + allocate (buffer(ao_num,mo_tot_num)) !$OMP CRITICAL (qcio_critical) call qcio_get_mo_matrix(buffer) @@ -67,6 +79,7 @@ BEGIN_PROVIDER [ real, mo_coef, (ao_num,mo_num) ] mo_coef(i,j) = buffer(i,j) enddo enddo + deallocate (buffer) END_PROVIDER @@ -113,7 +126,11 @@ BEGIN_PROVIDER [ logical, mo_is_closed, (mo_num) ] ! mo_is_active : True if mo(i) is an active orbital END_DOC - character :: buffer(mo_tot_num) + character, allocatable :: buffer(:) + allocate (buffer(mo_num)) +!$OMP CRITICAL (qcio_critical) + call qcio_get_mo_classif(buffer) +!$OMP END CRITICAL integer :: i do i=1,mo_num @@ -128,6 +145,7 @@ BEGIN_PROVIDER [ logical, mo_is_closed, (mo_num) ] mo_is_active(i) = .False. endif enddo + deallocate (buffer) END_PROVIDER BEGIN_PROVIDER [ integer, mo_tot_num ] diff --git a/nuclei.irp.f b/nuclei.irp.f index 8122719..b272800 100644 --- a/nuclei.irp.f +++ b/nuclei.irp.f @@ -19,7 +19,8 @@ BEGIN_PROVIDER [ real, nucl_charge, (nucl_num) ] ! Nuclear charge END_DOC - double precision :: buffer(nucl_num) + double precision,allocatable :: buffer(:) + allocate(buffer(nucl_num)) !$OMP CRITICAL (qcio_critical) call qcio_get_geometry_charge(buffer) !$OMP END CRITICAL (qcio_critical) @@ -28,6 +29,7 @@ BEGIN_PROVIDER [ real, nucl_charge, (nucl_num) ] do i=1,nucl_num nucl_charge(i) = buffer(i) enddo + deallocate(buffer) END_PROVIDER BEGIN_PROVIDER [ real, nucl_coord, (nucl_num,3) ] @@ -36,7 +38,8 @@ BEGIN_PROVIDER [ real, nucl_coord, (nucl_num,3) ] BEGIN_DOC ! Nuclear coordinates END_DOC - double precision :: buffer(3,nucl_num) + double precision, allocatable :: buffer(:,:) + allocate (buffer(3,nucl_num)) !$OMP CRITICAL (qcio_critical) call qcio_get_geometry_coord(buffer) @@ -48,6 +51,7 @@ BEGIN_PROVIDER [ real, nucl_coord, (nucl_num,3) ] nucl_coord(j,i) = buffer(i,j) enddo enddo + deallocate(buffer) END_PROVIDER diff --git a/test/QCIO_File/ao/num_orb_sym.gz b/test/QCIO_File/ao/num_orb_sym.gz index 487db48..b69f7e1 100644 Binary files a/test/QCIO_File/ao/num_orb_sym.gz and b/test/QCIO_File/ao/num_orb_sym.gz differ diff --git a/test/QCIO_File/ao/transformation.gz b/test/QCIO_File/ao/transformation.gz index 10cdf0c..5587faf 100644 Binary files a/test/QCIO_File/ao/transformation.gz and b/test/QCIO_File/ao/transformation.gz differ diff --git a/test/QCIO_File/basis/atom.gz b/test/QCIO_File/basis/atom.gz index 6411836..c4bc79b 100644 Binary files a/test/QCIO_File/basis/atom.gz and b/test/QCIO_File/basis/atom.gz differ diff --git a/test/QCIO_File/basis/coefficient.gz b/test/QCIO_File/basis/coefficient.gz index 62a8110..d313af5 100644 Binary files a/test/QCIO_File/basis/coefficient.gz and b/test/QCIO_File/basis/coefficient.gz differ diff --git a/test/QCIO_File/basis/exponent.gz b/test/QCIO_File/basis/exponent.gz index c38630a..dfa775b 100644 Binary files a/test/QCIO_File/basis/exponent.gz and b/test/QCIO_File/basis/exponent.gz differ diff --git a/test/QCIO_File/basis/num_prim.gz b/test/QCIO_File/basis/num_prim.gz index 21ed3b9..9c0971b 100644 Binary files a/test/QCIO_File/basis/num_prim.gz and b/test/QCIO_File/basis/num_prim.gz differ diff --git a/test/QCIO_File/basis/power.gz b/test/QCIO_File/basis/power.gz index bae4b79..48ccbb1 100644 Binary files a/test/QCIO_File/basis/power.gz and b/test/QCIO_File/basis/power.gz differ diff --git a/test/QCIO_File/geometry/atomic_number.gz b/test/QCIO_File/geometry/atomic_number.gz index dfe77a0..0257a43 100644 Binary files a/test/QCIO_File/geometry/atomic_number.gz and b/test/QCIO_File/geometry/atomic_number.gz differ diff --git a/test/QCIO_File/geometry/charge.gz b/test/QCIO_File/geometry/charge.gz index 38b4553..ae7084d 100644 Binary files a/test/QCIO_File/geometry/charge.gz and b/test/QCIO_File/geometry/charge.gz differ diff --git a/test/QCIO_File/geometry/coord.gz b/test/QCIO_File/geometry/coord.gz index 9cb53d4..964c9c0 100644 Binary files a/test/QCIO_File/geometry/coord.gz and b/test/QCIO_File/geometry/coord.gz differ diff --git a/test/QCIO_File/geometry/label.gz b/test/QCIO_File/geometry/label.gz index 3c717db..19fb67b 100644 Binary files a/test/QCIO_File/geometry/label.gz and b/test/QCIO_File/geometry/label.gz differ diff --git a/test/QCIO_File/mo/classif.gz b/test/QCIO_File/mo/classif.gz index ec4d5fe..dc0d235 100644 Binary files a/test/QCIO_File/mo/classif.gz and b/test/QCIO_File/mo/classif.gz differ diff --git a/test/QCIO_File/mo/eigenvalue.gz b/test/QCIO_File/mo/eigenvalue.gz index 1ec75ac..506e33e 100644 Binary files a/test/QCIO_File/mo/eigenvalue.gz and b/test/QCIO_File/mo/eigenvalue.gz differ diff --git a/test/QCIO_File/mo/fitcusp b/test/QCIO_File/mo/fitcusp index 62a6e3c..cf84443 100644 --- a/test/QCIO_File/mo/fitcusp +++ b/test/QCIO_File/mo/fitcusp @@ -1 +1 @@ -T +F diff --git a/test/QCIO_File/mo/label.gz b/test/QCIO_File/mo/label.gz index 9f5048c..7019a7c 100644 Binary files a/test/QCIO_File/mo/label.gz and b/test/QCIO_File/mo/label.gz differ diff --git a/test/QCIO_File/mo/matrix.gz b/test/QCIO_File/mo/matrix.gz index 80fdd81..91aaed4 100644 Binary files a/test/QCIO_File/mo/matrix.gz and b/test/QCIO_File/mo/matrix.gz differ diff --git a/test/QCIO_File/mo/num_orb_sym.gz b/test/QCIO_File/mo/num_orb_sym.gz index bef9dd8..0f642ab 100644 Binary files a/test/QCIO_File/mo/num_orb_sym.gz and b/test/QCIO_File/mo/num_orb_sym.gz differ diff --git a/test/QCIO_File/mo/symmetry.gz b/test/QCIO_File/mo/symmetry.gz index d2ead9d..f577f8d 100644 Binary files a/test/QCIO_File/mo/symmetry.gz and b/test/QCIO_File/mo/symmetry.gz differ diff --git a/test/QCIO_File/random/number b/test/QCIO_File/random/number index 484d3ef..851112b 100644 --- a/test/QCIO_File/random/number +++ b/test/QCIO_File/random/number @@ -1 +1 @@ - 0.539373520750000E+11 + 0.549308735950000E+11 diff --git a/test/QCIO_File/random/seed.gz b/test/QCIO_File/random/seed.gz index d7af3b3..be82c27 100644 Binary files a/test/QCIO_File/random/seed.gz and b/test/QCIO_File/random/seed.gz differ diff --git a/test/QCIO_File/simulation/sampling b/test/QCIO_File/simulation/sampling index e9a63a1..f0f292f 100644 --- a/test/QCIO_File/simulation/sampling +++ b/test/QCIO_File/simulation/sampling @@ -1 +1 @@ -Langevin +Langevin diff --git a/test/QCIO_File/simulation/time_step b/test/QCIO_File/simulation/time_step index 252b7fc..73773ba 100644 --- a/test/QCIO_File/simulation/time_step +++ b/test/QCIO_File/simulation/time_step @@ -1 +1 @@ - 0.596046447753906E+00 + 2.000000000000000E-01 diff --git a/test/QCIO_File/walker/coord.gz b/test/QCIO_File/walker/coord.gz index 00bc4c6..0d08e82 100644 Binary files a/test/QCIO_File/walker/coord.gz and b/test/QCIO_File/walker/coord.gz differ diff --git a/test/QCIO_File/walker/num_walk b/test/QCIO_File/walker/num_walk index 2dc6a89..cca84bf 100644 --- a/test/QCIO_File/walker/num_walk +++ b/test/QCIO_File/walker/num_walk @@ -1 +1 @@ - 10 + 10 diff --git a/test/QCIO_File/wf/determinant.gz b/test/QCIO_File/wf/determinant.gz index 9b1be90..437c063 100644 Binary files a/test/QCIO_File/wf/determinant.gz and b/test/QCIO_File/wf/determinant.gz differ