Skip to content

Commit 103f533

Browse files
authored
(#294) Changed behaviour for basis files and int_basis.
* Changed behaviour for int_basis and basis files. * Fixed small report when basis are not found.
1 parent 77b1b4e commit 103f533

File tree

3 files changed

+31
-19
lines changed

3 files changed

+31
-19
lines changed

lioamber/basis_data.f90

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module basis_data
3434
! norm : Normalize integrals (deprecated).
3535
character(len=100) :: basis_set = "DZVP"
3636
character(len=100) :: fitting_set = "DZVP Coulomb Fitting"
37-
logical :: int_basis = .false.
37+
logical :: int_basis = .true.
3838
double precision :: rMax = 16.0D0
3939
double precision :: rMaxs = 5.0D0
4040
logical :: norm = .true.
@@ -526,14 +526,14 @@ subroutine check_basis(atom_bas_done, atom_fit_done, n_atoms, atom_Z, iostatus)
526526
iostatus = 0
527527
do iatom = 1, n_atoms
528528
if ( .not. atom_bas_done(atom_Z(iatom)) ) then
529-
call atom_name(iatom, iatom_name)
529+
call atom_name(atom_Z(iatom), iatom_name)
530530
write(*,'(A)') " Error: Basis set not found for ", &
531531
trim(iatom_name), "."
532532
iostatus = 1
533533
return
534534
endif
535535
if ( .not. atom_fit_done(atom_Z(iatom)) ) then
536-
call atom_name(iatom, iatom_name)
536+
call atom_name(atom_Z(iatom), iatom_name)
537537
write(*,'(A)') " Error: Fitting set not found for ", &
538538
trim(iatom_name), "."
539539
iostatus = 1

lioamber/init_lio.f90

+27-14
Original file line numberDiff line numberDiff line change
@@ -257,20 +257,28 @@ subroutine init_lio_amber(natomin, Izin, nclatom, charge_i, basis_i &
257257
Fulltimer_ECP, cut2_0, cut3_0
258258

259259
implicit none
260-
integer , intent(in) :: charge_i, nclatom, natomin, Izin(natomin)
261-
character(len=20) :: basis_i, fcoord_i, fmulliken_i, frestart_i, &
262-
frestartin_i, inputFile
263-
logical :: verbose_i, OPEN_i, VCINP_i, predcoef_i, writexyz_i, &
264-
DIIS_i, field_i, exter_i, writedens_i, tdrestart_i
265-
integer :: NMAX_i, NUNP_i, ndiis_i, Iexch_i, IGRID_i, IGRID2_i, &
266-
timedep_i, ntdstep_i, NBCH_i, propagator_i, ierr
267-
real*8 :: GOLD_i, told_i, rmax_i, rmaxs_i, tdstep_i, &
268-
a0_i, epsilon_i, Fx_i, Fy_i, Fz_i
260+
! Variables received from &lio namelist in amber input file.
261+
character(len=20), intent(in) :: basis_i, fcoord_i, fmulliken_i, &
262+
frestart_i, frestartin_i
263+
integer , intent(in) :: charge_i, nclatom, natomin, Izin(natomin),&
264+
NMAX_i, NUNP_i, ndiis_i, Iexch_i, IGRID_i,&
265+
IGRID2_i, timedep_i, ntdstep_i, NBCH_i, &
266+
propagator_i
267+
logical , intent(in) :: verbose_i, OPEN_i, VCINP_i, predcoef_i, &
268+
writexyz_i, DIIS_i, field_i, exter_i, &
269+
writedens_i, tdrestart_i
270+
real(kind=8) , intent(in) :: GOLD_i, told_i, rmax_i, rmaxs_i, tdstep_i,&
271+
a0_i, epsilon_i, Fx_i, Fy_i, Fz_i
272+
269273
! Deprecated or removed variables
270-
character(len=20) :: output_i
271-
integer :: idip_i
272-
logical :: intsoldouble_i, dens_i, integ_i
273-
double precision :: dgtrig_i
274+
character(len=20), intent(in) :: output_i
275+
integer , intent(in) :: idip_i
276+
logical , intent(in) :: intsoldouble_i, dens_i, integ_i
277+
real(kind=8) , intent(in) :: dgtrig_i
278+
279+
character(len=20) :: inputFile
280+
integer :: ierr
281+
logical :: file_exists
274282

275283
! Gives default values to variables.
276284
call lio_defaults()
@@ -301,8 +309,13 @@ subroutine init_lio_amber(natomin, Izin, nclatom, charge_i, basis_i &
301309
inputFile = 'lio.in'
302310
call read_options(inputFile, ierr)
303311
if (ierr > 0) return
304-
if ((.not. int_basis) .and. (basis_i .ne. 'basis')) basis_set = basis_i
305312

313+
inquire(file = basis_i, exist = file_exists)
314+
if (file_exists) then
315+
write(*,'(A)') "LIO - Custom basis set found, using present file."
316+
int_basis = .false.
317+
basis_set = basis_i
318+
endif
306319

307320
! Initializes LIO. The last argument indicates LIO is not being used alone.
308321
call init_lio_common(natomin, Izin, nclatom, 1)

liosolo/liosolo.f90

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ program liosolo
2626
call get_command_argument(i+1,inpfile)
2727
case("-b")
2828
call get_command_argument(i+1,basis_set)
29+
int_basis = .false.
2930
case("-bs")
3031
call get_command_argument(i+1,basis_set)
3132
case("-fs")
3233
call get_command_argument(i+1,fitting_set)
33-
case("-ib")
34-
int_basis=.true.
3534
case("-c")
3635
call get_command_argument(i+1,inpcoords)
3736
case("-v")

0 commit comments

Comments
 (0)