From de3a5cfbff066f9f2f4eaceb9a2980c8fb8ffe17 Mon Sep 17 00:00:00 2001 From: Ravindra Shinde Date: Thu, 4 Mar 2021 14:22:26 +0100 Subject: [PATCH] more failsafe procedures --- src/iochamp.f90 | 11 +++-------- src/keywords_m.F90 | 19 ++++++++++++++++--- src/test-champ.inp | 4 ++-- src/test-champ.out | 35 ++--------------------------------- 4 files changed, 23 insertions(+), 46 deletions(-) diff --git a/src/iochamp.f90 b/src/iochamp.f90 index 5721ceb..f44cfb2 100644 --- a/src/iochamp.f90 +++ b/src/iochamp.f90 @@ -216,7 +216,7 @@ PROGRAM iochamp ia = 1 open (unit=12,file=file_molecule, iostat=iostat, action='read' ) - if (iostat .ne. 0) error stop "Problem in opening the molecule file" + if (iostat .ne. 0) call die(file_molecule, "Problem in opening the molecule file") read(12,*) natoms print*, "natoms ", natoms if (.not. allocated(cent)) allocate(cent(3,natoms)) @@ -267,7 +267,7 @@ PROGRAM iochamp endif enddo endif - write(6,*) 'Coordinates from Molecule block: External file' + write(6,*) 'Coordinates from Molecule block: ' do ia= 1, natoms write(6,'(A4,3F10.6)') symbol(ia), (cent(i,ia),i=1,3) enddo @@ -373,14 +373,9 @@ PROGRAM iochamp write(6,*) '------------------------------------------------------' write(6,*) 'Reading the determinants block from an external file ' - ia = 1 -! call io_status() - ! print*, "printing label ", bfdf%label , trim(bfdf%mark%pline%line) - - ! print*, "pline obtained", (fdf_bline(bfdf, pline)) open (unit=11,file=file_determinants, iostat=iostat, action='read' ) - if (iostat .ne. 0) error stop "Problem in opening the determinant file" + if (iostat .ne. 0) call die(file_determinants, "Problem in opening the determinant file") read(11,*) temp1, temp2, nelectrons, temp3, nalpha read(11,*) temp1, ndeterminants, nexcitation diff --git a/src/keywords_m.F90 b/src/keywords_m.F90 index 2a32a86..f205b65 100644 --- a/src/keywords_m.F90 +++ b/src/keywords_m.F90 @@ -136,11 +136,14 @@ MODULE keywords public :: opt_method public :: multiple_adiag -! public :: nvalence public :: excess_charge public :: multiplicity - +! Gaussian ECP pseudopotential keywords + public :: necp_term + public :: necp_power + public :: ecp_coef + public :: ecp_exponent ! Following not yet added ! rlobx(y) Lobachevsky parameters for Fock expansion @@ -269,6 +272,7 @@ MODULE keywords integer, target :: ndet integer, pointer :: ndeterminants => ndet + integer :: nbasis integer, target :: norb @@ -332,8 +336,17 @@ MODULE keywords character(len=20) :: opt_method -! integer :: nvalence + integer :: multiplicity integer :: excess_charge +! Gaussian ECP pseudopotential keywords + integer, allocatable :: necp_term(:,:) + integer, allocatable :: necp_power(:,:,:) + real(dp), allocatable :: ecp_coef(:,:,:) + real(dp), allocatable :: ecp_exponent(:,:,:) + + + + end module \ No newline at end of file diff --git a/src/test-champ.inp b/src/test-champ.inp index c981c10..cefaf5c 100644 --- a/src/test-champ.inp +++ b/src/test-champ.inp @@ -9,7 +9,7 @@ basis BFD-T-normf0 load molecule caffeine.xyz load basis BFD-T-normf0.bas -#load determinants TZ_1M_500.det +load determinants TZ_1M_500.det %block molecule < caffeine.xyz @@ -17,7 +17,7 @@ load basis BFD-T-normf0.bas -#%block pseudopotential +#%block determinants #%end block diff --git a/src/test-champ.out b/src/test-champ.out index 9cae397..5cc3277 100644 --- a/src/test-champ.out +++ b/src/test-champ.out @@ -1,9 +1,9 @@ title A Sample QMC input file parsed by libfdf interfaced to CHAMP pool ./pool -molecule caffeine.xyz +molecule caffein.xyz pseudopot default.psp # default value basis BFD-T-normf0.bas -determinants default.det # default value +determinants TZ_1M_500.det orbitals default.orb # default value jastrow default.jas # default value jastrow_deriv default.jasder # default value @@ -32,34 +32,3 @@ etrial -408.1744362 eV # above item originally: etrial -15.00000000 Ha excess_charge 0 # default value multiplicity 1 # default value -%block molecule -%block molecule - 24 - molecule 1,3,7-Trimethylpurine-2,6-dione - N 1.5808 0.7027 -0.2279 - C 1.7062 -0.7374 -0.2126 - N 0.5340 -1.5671 -0.3503 - C 0.3231 1.3600 0.0274 - C -0.8123 0.4553 0.0817 - C -0.6967 -0.9322 -0.0662 - N -2.1886 0.6990 0.2783 - C -2.8512 -0.5205 0.2532 - N -1.9537 -1.5188 0.0426 - C 0.6568 -3.0274 -0.1675 - O 2.8136 -1.2558 -0.1693 - O 0.2849 2.5744 0.1591 - C -2.8096 2.0031 0.5032 - C 2.8301 1.5004 -0.1968 - H -3.9271 -0.6787 0.3762 - H 1.4823 -3.4046 -0.7865 - H -0.2708 -3.5204 -0.4868 - H 0.8567 -3.2990 0.8788 - H -2.4123 2.7478 -0.2017 - H -2.6042 2.3621 1.5221 - H -3.8973 1.9344 0.3695 - H 3.5959 1.0333 -0.8314 - H 3.2249 1.5791 0.8255 - H 2.6431 2.5130 -0.5793 -%endblock molecule -#:block? determinants F -#:defined? determinants F