34 use const_gbl,
only: stdout
36 use scatci_routines,
only: cirmat
56 real(wp) :: core_energy
57 integer :: current_eigenvector = 0
59 real(wp),
allocatable :: eigenvectors(:,:)
60 real(wp),
allocatable :: eigenvalues(:)
91 integer,
intent(in) :: set, nstat, num_csfs
92 real(wp),
intent(in) :: core_energy
93 type(
phase),
intent(in),
target :: phase_
101 this % num_csfs = num_csfs
102 this % core_energy = core_energy
103 this % phase => phase_
110 allocate(this % eigenvectors(this % num_csfs, this % nstat), this % eigenvalues(this % nstat), stat = ifail)
111 call master_memory % track_memory(kind(this % eigenvectors), &
112 size(this % eigenvectors), ifail,
'TARGET_RMAT_CI::EIGENVECTORS')
113 call master_memory % track_memory(kind(this % eigenvalues), &
114 size(this % eigenvalues), ifail,
'TARGET_RMAT_CI::EIGENVALUES')
117 this % eigenvectors(:,:) = 0.0_wp
118 this % eigenvalues(:) = 0.0_wp
131 write (stdout,
'(/," SET",I4,4x,A)') &
133 write (stdout,
'(/," NOCSF=",I5,4x,"NSTAT=",I5,4x,"EN =",F20.10)') &
134 this % num_csfs, this % nstat, this % core_energy
135 write (stdout,
'(/," EIGEN-ENERGIES",/,(16X,5F20.10))') &
136 (this % eigenvalues(i) + this % core_energy, i = 1, this % nstat)
137 write (stdout,
'( " STATE",I3,":",I3," transformation vectors selected")') &
138 this % set, this % nstat
151 do ido = 1, this % nstat
152 write (stdout, *)
' Target state ', this % set, ido
153 do jdo = 1, this % num_csfs
154 write (stdout, *) this % eigenvectors(jdo, ido)
173 integer,
intent(in) :: target_state, configuration_idx
188 class(options),
intent(in) :: option
191 real(wp),
allocatable :: eigenvectors(:)
192 real(wp),
allocatable :: eigenvalues(:)
194 integer :: ido, jdo, kdo, ii, jj, ci_size, nstat, ifail
197 allocate(eigenvalues(option % total_num_tgt_states), eigenvectors(option % total_num_ci_target), stat = ifail)
198 call master_memory % track_memory(kind(eigenvectors),
size(eigenvectors), ifail,
'TARGET_RMAT_CI::READ::EIGENVECTORS')
199 call master_memory % track_memory(kind(eigenvalues),
size(eigenvalues), ifail,
'TARGET_RMAT_CI::READ::EIGENVALUES')
202 call cirmat(option % num_target_sym, &
203 option % ci_target_switch, &
204 option % ci_set_number, &
207 option % ci_sequence_number, &
208 option % num_ci_target_sym, &
210 option % num_target_state_sym, &
211 option % phase_index, &
212 option % num_continuum, &
213 option % sym_group_flag)
219 do ido = 1, option % num_target_sym
220 ci_size = cirmats(ido) % num_csfs
221 nstat = cirmats(ido) % nstat
224 cirmats(ido) % eigenvalues(jdo) = eigenvalues(jj)
225 cirmats(ido) % eigenvectors(1:ci_size,jdo) = eigenvectors(ii+1:ii+ci_size)
231 call master_memory % free_memory(kind(eigenvectors),
size(eigenvectors))
232 call master_memory % free_memory(kind(eigenvalues),
size(eigenvalues))
235 deallocate(eigenvalues)
236 deallocate(eigenvectors)
249 integer,
intent(in) :: num_eigenpairs, vec_dimen
250 real(wp),
intent(in) :: eigenvalues(num_eigenpairs), diagonals(vec_dimen)
252 this % eigenvalues = eigenvalues
269 integer,
intent(in) :: vec_dimen
270 real(wp),
intent(in) :: eigenvector(vec_dimen)
272 this % current_eigenvector = this % current_eigenvector + 1
273 this % eigenvectors(:, this % current_eigenvector) = eigenvector(:)
286 use precisn,
only: wp
288 integer,
intent(in) :: num_eigenpairs, vec_dimen
289 real(wp),
intent(in) :: eigenvalues(num_eigenpairs), diagonals(vec_dimen)
290 real(wp),
allocatable :: ei(:)
291 integer,
allocatable :: iphz(:)
303 real(wp),
intent(inout) :: value
320 real(wp),
intent(inout) :: value