Skip to content

Commit

Permalink
Allow n3 zero freqs (for frozen atoms)
Browse files Browse the repository at this point in the history
Signed-off-by: Igor S. Gerasimov <[email protected]>
  • Loading branch information
foxtran committed Mar 5, 2025
1 parent 4e88569 commit ea6e8a2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/hessian.F90
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ subroutine numhess( &
real(wp) :: sum1,sum2,trdip(3),dipole(3)
real(wp) :: trpol(3),sl(3,3)
integer :: n3,i,j,k,ic,jc,ia,ja,ii,jj,info,lwork,a,b,ri,rj
integer :: nread,lowmode
integer :: nread,lowmode,nskip
integer :: nonfrozh
integer :: fixmode
integer :: skiplist(6), nskip
integer, allocatable :: skiplist(:)
integer, allocatable :: nb(:,:)
integer, allocatable :: indx(:),molvec(:),izero(:)
real(wp),allocatable :: bond(:,:)
Expand Down Expand Up @@ -445,17 +445,14 @@ subroutine numhess( &
isqm = 0.0_wp
j = 0
nskip = 0
allocate(skiplist(n3), source = 0)
do k=1, n3
if (abs(res%freq(k)) > 0.05_wp) then
j = j + 1
h(1:n3,j) = res%hess(1:n3,k)
isqm( j) = res%freq( k)
else
nskip = nskip + 1
if(nskip > 6) then
call env%error('internal error while sorting hessian', source)
return
end if
skiplist(nskip) = k
endif
enddo
Expand All @@ -465,6 +462,7 @@ subroutine numhess( &
isqm( j) = 0.0_wp
nskip = nskip - 1
end do
deallocate(skiplist)
end if
res%hess = h
res%freq = isqm
Expand Down

0 comments on commit ea6e8a2

Please sign in to comment.