10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-10-02 06:20:59 +02:00

Indentation

This commit is contained in:
Anthony Scemama 2017-11-29 13:56:48 +01:00
parent 4a7a80679b
commit 2dea5ea1af
3 changed files with 512 additions and 511 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,24 @@
BEGIN_PROVIDER [ integer, mo_tot_num ] BEGIN_PROVIDER [ integer, mo_tot_num ]
implicit none implicit none
BEGIN_DOC BEGIN_DOC
! Number of MOs ! Number of MOs
END_DOC END_DOC
logical :: has logical :: has
PROVIDE ezfio_filename PROVIDE ezfio_filename
if (mpi_master) then if (mpi_master) then
call ezfio_has_mo_basis_mo_tot_num(has) call ezfio_has_mo_basis_mo_tot_num(has)
endif endif
IRP_IF MPI IRP_IF MPI
include 'mpif.h' include 'mpif.h'
integer :: ierr integer :: ierr
call MPI_BCAST( has, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST( has, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
if (ierr /= MPI_SUCCESS) then if (ierr /= MPI_SUCCESS) then
stop 'Unable to read mo_tot_num with MPI' stop 'Unable to read mo_tot_num with MPI'
endif endif
IRP_ENDIF IRP_ENDIF
if (.not.has) then if (.not.has) then
mo_tot_num = ao_ortho_canonical_num mo_tot_num = ao_ortho_canonical_num
else else
if (mpi_master) then if (mpi_master) then
call ezfio_get_mo_basis_mo_tot_num(mo_tot_num) call ezfio_get_mo_basis_mo_tot_num(mo_tot_num)
@ -32,7 +32,7 @@ BEGIN_PROVIDER [ integer, mo_tot_num ]
endif endif
call write_int(6,mo_tot_num,'mo_tot_num') call write_int(6,mo_tot_num,'mo_tot_num')
ASSERT (mo_tot_num > 0) ASSERT (mo_tot_num > 0)
END_PROVIDER END_PROVIDER

View File

@ -7,61 +7,61 @@ BEGIN_PROVIDER [ double precision, nucl_coord, (nucl_num,3) ]
PROVIDE ezfio_filename nucl_label nucl_charge PROVIDE ezfio_filename nucl_label nucl_charge
if (mpi_master) then if (mpi_master) then
double precision, allocatable :: buffer(:,:) double precision, allocatable :: buffer(:,:)
nucl_coord = 0.d0 nucl_coord = 0.d0
allocate (buffer(nucl_num,3)) allocate (buffer(nucl_num,3))
buffer = 0.d0 buffer = 0.d0
logical :: has logical :: has
call ezfio_has_nuclei_nucl_coord(has) call ezfio_has_nuclei_nucl_coord(has)
if (.not.has) then if (.not.has) then
print *, irp_here print *, irp_here
stop 1 stop 1
endif endif
call ezfio_get_nuclei_nucl_coord(buffer) call ezfio_get_nuclei_nucl_coord(buffer)
integer :: i,j integer :: i,j
do i=1,3 do i=1,3
do j=1,nucl_num do j=1,nucl_num
nucl_coord(j,i) = buffer(j,i) nucl_coord(j,i) = buffer(j,i)
enddo enddo
enddo enddo
deallocate(buffer) deallocate(buffer)
character*(64), parameter :: f = '(A16, 4(1X,F12.6))' character*(64), parameter :: f = '(A16, 4(1X,F12.6))'
character*(64), parameter :: ft= '(A16, 4(1X,A12 ))' character*(64), parameter :: ft= '(A16, 4(1X,A12 ))'
double precision, parameter :: a0= 0.529177249d0 double precision, parameter :: a0= 0.529177249d0
call write_time(output_Nuclei) call write_time(output_Nuclei)
write(output_Nuclei,'(A)') '' write(output_Nuclei,'(A)') ''
write(output_Nuclei,'(A)') 'Nuclear Coordinates (Angstroms)' write(output_Nuclei,'(A)') 'Nuclear Coordinates (Angstroms)'
write(output_Nuclei,'(A)') '===============================' write(output_Nuclei,'(A)') '==============================='
write(output_Nuclei,'(A)') '' write(output_Nuclei,'(A)') ''
write(output_Nuclei,ft) & write(output_Nuclei,ft) &
'================','============','============','============','============' '================','============','============','============','============'
write(output_Nuclei,*) & write(output_Nuclei,*) &
' Atom Charge X Y Z ' ' Atom Charge X Y Z '
write(output_Nuclei,ft) & write(output_Nuclei,ft) &
'================','============','============','============','============' '================','============','============','============','============'
do i=1,nucl_num do i=1,nucl_num
write(output_Nuclei,f) nucl_label(i), nucl_charge(i), & write(output_Nuclei,f) nucl_label(i), nucl_charge(i), &
nucl_coord(i,1)*a0, & nucl_coord(i,1)*a0, &
nucl_coord(i,2)*a0, & nucl_coord(i,2)*a0, &
nucl_coord(i,3)*a0 nucl_coord(i,3)*a0
enddo enddo
write(output_Nuclei,ft) & write(output_Nuclei,ft) &
'================','============','============','============','============' '================','============','============','============','============'
write(output_Nuclei,'(A)') '' write(output_Nuclei,'(A)') ''
endif endif
IRP_IF MPI IRP_IF MPI
include 'mpif.h' include 'mpif.h'
integer :: ierr integer :: ierr
call MPI_BCAST( nucl_coord, 3*nucl_num, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST( nucl_coord, 3*nucl_num, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
if (ierr /= MPI_SUCCESS) then if (ierr /= MPI_SUCCESS) then
stop 'Unable to read nucl_coord with MPI' stop 'Unable to read nucl_coord with MPI'
endif endif
IRP_ENDIF IRP_ENDIF
END_PROVIDER END_PROVIDER
@ -146,29 +146,30 @@ BEGIN_PROVIDER [ double precision, nuclear_repulsion ]
END_DOC END_DOC
PROVIDE mpi_master nucl_coord nucl_charge nucl_num PROVIDE mpi_master nucl_coord nucl_charge nucl_num
IF (disk_access_nuclear_repulsion.EQ.'Read') THEN if (disk_access_nuclear_repulsion.EQ.'Read') then
LOGICAL :: has logical :: has
if (mpi_master) then
call ezfio_has_nuclei_nuclear_repulsion(has)
if (has) then
call ezfio_get_nuclei_nuclear_repulsion(nuclear_repulsion)
else
print *, 'nuclei/nuclear_repulsion not found in EZFIO file'
stop 1
endif
print*, 'Read nuclear_repulsion'
endif
IRP_IF MPI
include 'mpif.h'
integer :: ierr
call MPI_BCAST( nuclear_repulsion, 1, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
if (ierr /= MPI_SUCCESS) then
stop 'Unable to read nuclear_repulsion with MPI'
endif
IRP_ENDIF
if (mpi_master) then
ELSE call ezfio_has_nuclei_nuclear_repulsion(has)
if (has) then
call ezfio_get_nuclei_nuclear_repulsion(nuclear_repulsion)
else
print *, 'nuclei/nuclear_repulsion not found in EZFIO file'
stop 1
endif
print*, 'Read nuclear_repulsion'
endif
IRP_IF MPI
include 'mpif.h'
integer :: ierr
call MPI_BCAST( nuclear_repulsion, 1, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
if (ierr /= MPI_SUCCESS) then
stop 'Unable to read nuclear_repulsion with MPI'
endif
IRP_ENDIF
else
integer :: k,l integer :: k,l
double precision :: Z12, r2, x(3) double precision :: Z12, r2, x(3)
@ -187,17 +188,17 @@ BEGIN_PROVIDER [ double precision, nuclear_repulsion ]
enddo enddo
enddo enddo
nuclear_repulsion *= 0.5d0 nuclear_repulsion *= 0.5d0
END IF end if
call write_time(output_Nuclei) call write_time(output_Nuclei)
call write_double(output_Nuclei,nuclear_repulsion, & call write_double(output_Nuclei,nuclear_repulsion, &
'Nuclear repulsion energy') 'Nuclear repulsion energy')
IF (disk_access_nuclear_repulsion.EQ.'Write') THEN if (disk_access_nuclear_repulsion.EQ.'Write') then
if (mpi_master) then if (mpi_master) then
call ezfio_set_nuclei_nuclear_repulsion(nuclear_repulsion) call ezfio_set_nuclei_nuclear_repulsion(nuclear_repulsion)
endif endif
END IF endif
END_PROVIDER END_PROVIDER
BEGIN_PROVIDER [ character*(128), element_name, (78)] BEGIN_PROVIDER [ character*(128), element_name, (78)]