diis Subroutine

public subroutine diis(p, b, f, niter)

Direct inversion of iterative subspace [DIIS] procedure Implement Eqs. (1)-(4) Pulay J. Comp. Chem. 3. 556 (1982) Feb.25.2015 : K.H : (1) Half of operation (w.r. i and j ) can be skipped using symmetry. (2) You do not need full matrix multiplication (dimension=B%N_basis) since we just need the trace this amounts to ~10 sec gain per iteration for 180 atom (660basis) calculations

BMatrix(j,i)=MatTrace( F%Errsave(:,:,i) .mt. F%Errsave(:,:,j) ) BMatrix(i,j)=BMatrix(j,i)

Arguments

Type IntentOptional Attributes Name
type(param), intent(in) :: p
type(basis), intent(in) :: b
type(wf_data), intent(inout) :: f
integer, intent(in) :: niter