1
0
mirror of https://github.com/TREX-CoE/fparser.git synced 2024-11-03 12:43:58 +01:00

more failsafe procedures

This commit is contained in:
Ravindra Shinde 2021-03-04 14:22:26 +01:00
parent d6cb6538e7
commit de3a5cfbff
4 changed files with 23 additions and 46 deletions

View File

@ -216,7 +216,7 @@ PROGRAM iochamp
ia = 1 ia = 1
open (unit=12,file=file_molecule, iostat=iostat, action='read' ) 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 read(12,*) natoms
print*, "natoms ", natoms print*, "natoms ", natoms
if (.not. allocated(cent)) allocate(cent(3,natoms)) if (.not. allocated(cent)) allocate(cent(3,natoms))
@ -267,7 +267,7 @@ PROGRAM iochamp
endif endif
enddo enddo
endif endif
write(6,*) 'Coordinates from Molecule block: External file' write(6,*) 'Coordinates from Molecule block: '
do ia= 1, natoms do ia= 1, natoms
write(6,'(A4,3F10.6)') symbol(ia), (cent(i,ia),i=1,3) write(6,'(A4,3F10.6)') symbol(ia), (cent(i,ia),i=1,3)
enddo enddo
@ -373,14 +373,9 @@ PROGRAM iochamp
write(6,*) '------------------------------------------------------' write(6,*) '------------------------------------------------------'
write(6,*) 'Reading the determinants block from an external file ' 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' ) 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, temp2, nelectrons, temp3, nalpha
read(11,*) temp1, ndeterminants, nexcitation read(11,*) temp1, ndeterminants, nexcitation

View File

@ -136,11 +136,14 @@ MODULE keywords
public :: opt_method public :: opt_method
public :: multiple_adiag public :: multiple_adiag
! public :: nvalence
public :: excess_charge public :: excess_charge
public :: multiplicity public :: multiplicity
! Gaussian ECP pseudopotential keywords
public :: necp_term
public :: necp_power
public :: ecp_coef
public :: ecp_exponent
! Following not yet added ! Following not yet added
! rlobx(y) Lobachevsky parameters for Fock expansion ! rlobx(y) Lobachevsky parameters for Fock expansion
@ -269,6 +272,7 @@ MODULE keywords
integer, target :: ndet integer, target :: ndet
integer, pointer :: ndeterminants => ndet integer, pointer :: ndeterminants => ndet
integer :: nbasis integer :: nbasis
integer, target :: norb integer, target :: norb
@ -332,8 +336,17 @@ MODULE keywords
character(len=20) :: opt_method character(len=20) :: opt_method
! integer :: nvalence
integer :: multiplicity integer :: multiplicity
integer :: excess_charge 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 end module

View File

@ -9,7 +9,7 @@ basis BFD-T-normf0
load molecule caffeine.xyz load molecule caffeine.xyz
load basis BFD-T-normf0.bas load basis BFD-T-normf0.bas
#load determinants TZ_1M_500.det load determinants TZ_1M_500.det
%block molecule < caffeine.xyz %block molecule < caffeine.xyz
@ -17,7 +17,7 @@ load basis BFD-T-normf0.bas
#%block pseudopotential #%block determinants
#%end block #%end block

View File

@ -1,9 +1,9 @@
title A Sample QMC input file parsed by libfdf interfaced to CHAMP title A Sample QMC input file parsed by libfdf interfaced to CHAMP
pool ./pool pool ./pool
molecule caffeine.xyz molecule caffein.xyz
pseudopot default.psp # default value pseudopot default.psp # default value
basis BFD-T-normf0.bas basis BFD-T-normf0.bas
determinants default.det # default value determinants TZ_1M_500.det
orbitals default.orb # default value orbitals default.orb # default value
jastrow default.jas # default value jastrow default.jas # default value
jastrow_deriv default.jasder # default value jastrow_deriv default.jasder # default value
@ -32,34 +32,3 @@ etrial -408.1744362 eV
# above item originally: etrial -15.00000000 Ha # above item originally: etrial -15.00000000 Ha
excess_charge 0 # default value excess_charge 0 # default value
multiplicity 1 # 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