Skip to content

Commit

Permalink
XAS_TDP| fix regtests
Browse files Browse the repository at this point in the history
  • Loading branch information
abussy committed Nov 17, 2020
1 parent 6c4d5ae commit 5d0e1c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/xas_tdp_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ SUBROUTINE xas_tdp_core(xas_tdp_section, qs_env)
nbatch, nex_atom, output_unit, tmp_index
INTEGER, ALLOCATABLE, DIMENSION(:) :: batch_atoms, ex_atoms_of_kind
INTEGER, DIMENSION(:), POINTER :: atoms_of_kind
LOGICAL :: do_os, end_of_batch
LOGICAL :: do_os, end_of_batch, unique
TYPE(admm_type), POINTER :: admm_env
TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
TYPE(dbcsr_p_type), DIMENSION(:), POINTER :: matrix_ks
Expand Down Expand Up @@ -380,6 +380,7 @@ SUBROUTINE xas_tdp_core(xas_tdp_section, qs_env)
iatom = iatom + 1
batch_atoms(iatom) = ex_atoms_of_kind(iat)
END DO
CALL sort_unique(batch_atoms, unique)
!compute RI 3c exchange integrals on batch, if so required
IF (xas_tdp_control%do_hfx) THEN
Expand All @@ -393,8 +394,8 @@ SUBROUTINE xas_tdp_core(xas_tdp_section, qs_env)
END IF
! Loop over atoms of batch
DO iat = bo(1), bo(2)
iatom = ex_atoms_of_kind(iat)
DO iat = 1, batch_size
iatom = batch_atoms(iat)
tmp_index = locate(xas_tdp_env%ex_atom_indices, iatom)
Expand Down Expand Up @@ -494,7 +495,7 @@ SUBROUTINE xas_tdp_core(xas_tdp_section, qs_env)
END DO ! state type
end_of_batch = .FALSE.
IF (iat == bo(2)) end_of_batch = .TRUE.
IF (iat == batch_size) end_of_batch = .TRUE.
CALL free_exat_memory(xas_tdp_env, iatom, end_of_batch)
END DO ! atom of batch
DEALLOCATE (batch_atoms)
Expand Down
4 changes: 2 additions & 2 deletions tests/QS/regtest-xastdp/H2O-32-ot_solver.inp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
&XAS_TDP
&DONOR_STATES
DEFINE_EXCITED BY_INDEX
ATOM_LIST 1 2 3 4
STATE_TYPES 1s 1s 1s 1s
ATOM_LIST 1 4
STATE_TYPES 1s 1s
N_SEARCH 32
LOCALIZE
&END DONOR_STATES
Expand Down

0 comments on commit 5d0e1c1

Please sign in to comment.