Skip to content

Commit

Permalink
radsize changeable by commandline rpacor available from ~/.cefinerc u…
Browse files Browse the repository at this point in the history
…pdate r2scan-3c info
  • Loading branch information
fabothch committed Jan 12, 2021
1 parent 5a97960 commit a7c02fd
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ cml-input: cefine -h
-func <string>
-bas <string>
-grid <string>
-radsize <integer>
-mp2 (do RI-MP2)
-scs (do RI-SCS-MP2)
-sos (do RI-SOS-MP2)
Expand Down Expand Up @@ -118,6 +119,7 @@ cml-input: cefine -h
ricore INTEGER
twoint INTEGER
maxcor INTEGER
rpacor INTEGER
fp REAL
vdw on # sets DFT-D2(BJ)
echo on # more printing
Expand Down
45 changes: 43 additions & 2 deletions cefine.f90
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ Program comand_line_define
logical cosx ! SAW: added seminumerical exchange = COSX
logical modbas !basis defined in input
logical modgrid !grid defined in input
logical modrad !radsize defined in input
logical noauxg !remove g-fkt from auxbasis
logical modaux !aux handling defined in input
logical hf3c ! perform HF-3c calculation
logical donl ! perform nl non-self-consistent
logical gcpinfo !for pbe-3c, pbe0-3c, b3-lyp-3c (echo into control)
integer ricore, scfconv, intmem, thime, maxcor, rpacor
integer ricore, scfconv, intmem, thime, maxcor, rpacor,radsize
integer charge, maxiter, nheavy, nopen, nat
integer kfrag, libnr, l, ntypes, irare, att(20)
real*8 desythr,xx(5),thize,cosmodk,dum,fp
Expand All @@ -60,7 +61,7 @@ Program comand_line_define

pr=.true.
! .'--------------------------------------------'
if(pr) write(*,*)'Command line define V2.22, SG,HK 2006-18 August 2018 (-h for help) '
if(pr) write(*,*)'Command line define V2.23, SG,HK 2006-18 August 2018 (-h for help) '
! write(*,*)
! .'--------------------------------------------'
io=1
Expand Down Expand Up @@ -151,6 +152,7 @@ Program comand_line_define
modaux=.false.
noauxg=.false.
modgrid=.false.
modrad=.false.
hf3c=.false.
!FB NL
donl=.false.
Expand Down Expand Up @@ -184,6 +186,10 @@ Program comand_line_define
call readl(atmp,xx,nn)
maxcor=idint(xx(nn))
endif
if(index(atmp,'rpacor').ne.0)then
call readl(atmp,xx,nn)
rpacor=idint(xx(nn))
endif
if(index(atmp,'twoint').ne.0)then
call readl(atmp,xx,nn)
intmem=idint(xx(nn))
Expand All @@ -200,6 +206,11 @@ Program comand_line_define
egrid=.true.
modgrid=.true.
endif
if(index(atmp,'radsize').ne.0)then
call readl(atmp,xx,nn)
radsize=xx(nn)
modrad=.true.
endif
if(index(atmp,'vdw').ne.0) then
if(index(atmp,'on').ne.0)BJ=.true.
endif
Expand Down Expand Up @@ -237,6 +248,7 @@ Program comand_line_define
write(*,*)' -func <string>'
write(*,*)' -bas <string>'
write(*,*)' -grid <string>'
write(*,*)' -radsize <integer>'
write(*,*)' -mp2 (do RI-MP2)'
write(*,*)' -scs (do RI-SCS-MP2)'
write(*,*)' -sos (do RI-SOS-MP2)'
Expand Down Expand Up @@ -305,6 +317,7 @@ Program comand_line_define
write(*,*)'ricore INTEGER'
write(*,*)'twoint INTEGER'
write(*,*)'maxcor INTEGER'
write(*,*)'rpacor INTEGER'
write(*,*)'fp REAL'
write(*,*)'vdw on # sets DFT-D2(BJ) '
write(*,*)'echo on # more printing'
Expand Down Expand Up @@ -453,6 +466,12 @@ Program comand_line_define
call readl(arg(i+1),xx,nn)
scfconv=idint(xx(1))
endif
!FB radsize
if(index(arg(i),'-radsize').ne.0)then
call readl(arg(i+1),xx,nn)
radsize=idint(xx(1))
modrad=.true.
endif
!JGB K tolerance
if(index(arg(i),'-ktol').ne.0)then
call readl(arg(i+1),xx,nn)
Expand Down Expand Up @@ -609,6 +628,20 @@ Program comand_line_define
DESY=.false.
endif

!FB define r2scan-3c defaults
if(func.eq.'r2scan3c') func='r2scan-3c'
if(func.eq.'r2scan-3c') then
!uses gcp
write(*,*) "Use R2SCAN-3C with radsize 10 for gas-phase optimizations and grid m4!"
if(.not.modbas) bas='def2-mTZVPP'
if(.not.modgrid) grid='m4'
if(.not.novdw) then
D4=.true.
donl=.false.
BJ=.false.
ATM=.false.
endif
endif

!JGB define PBEh-3c defaults
if(func.eq.'pbeh3c') func='pbeh-3c'
Expand Down Expand Up @@ -1368,6 +1401,14 @@ Program comand_line_define
if(gcpinfo)then
call system("echo '$gcp dft/sv(p)' >> control")
endif

!FB change radsize (radial grid points) this is independent
! of gridsize !!!
if(modrad) then
write(atmp,"(a,i0,a)") "sed -i '/gridsize/a\ radsize ",radsize,"' control"
call system(trim(atmp))
endif


!JGB modify K tolerance
if(extol.gt.0.0d0) then
Expand Down

0 comments on commit a7c02fd

Please sign in to comment.